From 599219206a04413b3a08dc042b3f4995bbd99f45 Mon Sep 17 00:00:00 2001 From: Tom Beckenham <34339192+tombeckenham@users.noreply.github.com> Date: Fri, 22 May 2026 15:10:04 +1000 Subject: [PATCH 1/9] feat(schemas): add @tanstack/ai-schemas with nightly OpenAPI sync (closes #619) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a separate `@tanstack/ai-schemas` package that ships per-endpoint JSON Schema + Zod definitions for every supported provider, generated nightly from upstream OpenAPI specs. Architecture ported from fal-ai/fal-js PR #212 and generalised to multi-provider. Pipeline: `fetch-schemas` (per-provider fetchers) → `generate-schemas` (`@hey-api/openapi-ts` with the Zod 4 plugin) → `generate-endpoint-maps` (bundles `$ref` closures under `$defs`, emits endpoint-id-keyed maps and namespaced top-level barrels). Providers wired up with working generation: - OpenAI: `github.com/openai/openai-openapi` raw YAML - Anthropic: Stainless OpenAPI resolved via anthropic-sdk-typescript/.stats.yml - Gemini: Google Discovery doc → OpenAPI converted in-pipeline - ElevenLabs: `api.elevenlabs.io/openapi.json` - FAL: per-model OpenAPI from `api.fal.ai/v1/models` (skips when FAL_KEY absent) .github/workflows/sync-schemas.yml runs daily and opens an automated PR when any upstream spec diff lands, following the same pattern as sync-models.yml. Per repo coupling rules: media-generation + adapter-configuration SKILL.md cross-reference the new package; new docs/advanced/ai-schemas.md page added under the Advanced section. Co-Authored-By: Claude Opus 4.7 (1M context) --- .changeset/initial-ai-schemas.md | 16 + .github/workflows/sync-schemas.yml | 95 + docs/advanced/ai-schemas.md | 90 + docs/config.json | 4 + knip.json | 8 + packages/typescript/ai-schemas/README.md | 106 + .../ai-schemas/openapi-ts.config.ts | 62 + packages/typescript/ai-schemas/package.json | 90 + .../ai-schemas/scripts/fetch-schemas.ts | 99 + .../scripts/generate-endpoint-maps.ts | 601 + .../ai-schemas/scripts/load-all-specs.ts | 13 + .../ai-schemas/scripts/merge-openapi-specs.ts | 478 + .../ai-schemas/scripts/providers.ts | 47 + .../ai-schemas/scripts/providers/anthropic.ts | 92 + .../scripts/providers/elevenlabs.ts | 67 + .../ai-schemas/scripts/providers/fal.ts | 216 + .../ai-schemas/scripts/providers/gemini.ts | 302 + .../ai-schemas/scripts/providers/index.ts | 14 + .../ai-schemas/scripts/providers/openai.ts | 74 + .../specs/anthropic/anthropic.openapi.json | 50734 +++ .../specs/elevenlabs/elevenlabs.openapi.json | 88585 +++++ .../specs/gemini/gemini.discovery.json | 7765 + .../scripts/specs/gemini/gemini.openapi.json | 7565 + .../scripts/specs/openai/openai.openapi.json | 61723 ++++ packages/typescript/ai-schemas/src/index.ts | 4 + .../ai-schemas/src/openai-strict.ts | 145 + .../anthropic/endpoint-schema-map.ts | 283 + .../providers/anthropic/endpoint-zod-map.ts | 279 + .../src/providers/anthropic/index.ts | 5 + .../src/providers/anthropic/schemas-index.ts | 5 + .../src/providers/anthropic/schemas.gen.ts | 143193 +++++++++ .../src/providers/anthropic/zod.gen.ts | 12059 + .../elevenlabs/endpoint-schema-map.ts | 693 + .../providers/elevenlabs/endpoint-zod-map.ts | 669 + .../src/providers/elevenlabs/index.ts | 5 + .../src/providers/elevenlabs/schemas-index.ts | 5 + .../src/providers/elevenlabs/schemas.gen.ts | 113252 +++++++ .../src/providers/elevenlabs/zod.gen.ts | 22290 ++ .../providers/gemini/endpoint-schema-map.ts | 322 + .../src/providers/gemini/endpoint-zod-map.ts | 315 + .../ai-schemas/src/providers/gemini/index.ts | 5 + .../src/providers/gemini/schemas-index.ts | 5 + .../src/providers/gemini/schemas.gen.ts | 34292 ++ .../src/providers/gemini/zod.gen.ts | 3774 + .../providers/openai/endpoint-schema-map.ts | 705 + .../src/providers/openai/endpoint-zod-map.ts | 674 + .../ai-schemas/src/providers/openai/index.ts | 5 + .../src/providers/openai/schemas-index.ts | 5 + .../src/providers/openai/schemas.gen.ts | 250047 +++++++++++++++ .../src/providers/openai/zod.gen.ts | 17675 + packages/typescript/ai-schemas/src/schemas.ts | 9 + packages/typescript/ai-schemas/src/zod.ts | 8 + .../ai-schemas/tests/openai-strict.test.ts | 74 + packages/typescript/ai-schemas/tsconfig.json | 8 + packages/typescript/ai-schemas/vite.config.ts | 44 + .../ai-core/adapter-configuration/SKILL.md | 6 + .../skills/ai-core/media-generation/SKILL.md | 24 + pnpm-lock.yaml | 266 +- 58 files changed, 819992 insertions(+), 4 deletions(-) create mode 100644 .changeset/initial-ai-schemas.md create mode 100644 .github/workflows/sync-schemas.yml create mode 100644 docs/advanced/ai-schemas.md create mode 100644 packages/typescript/ai-schemas/README.md create mode 100644 packages/typescript/ai-schemas/openapi-ts.config.ts create mode 100644 packages/typescript/ai-schemas/package.json create mode 100644 packages/typescript/ai-schemas/scripts/fetch-schemas.ts create mode 100644 packages/typescript/ai-schemas/scripts/generate-endpoint-maps.ts create mode 100644 packages/typescript/ai-schemas/scripts/load-all-specs.ts create mode 100644 packages/typescript/ai-schemas/scripts/merge-openapi-specs.ts create mode 100644 packages/typescript/ai-schemas/scripts/providers.ts create mode 100644 packages/typescript/ai-schemas/scripts/providers/anthropic.ts create mode 100644 packages/typescript/ai-schemas/scripts/providers/elevenlabs.ts create mode 100644 packages/typescript/ai-schemas/scripts/providers/fal.ts create mode 100644 packages/typescript/ai-schemas/scripts/providers/gemini.ts create mode 100644 packages/typescript/ai-schemas/scripts/providers/index.ts create mode 100644 packages/typescript/ai-schemas/scripts/providers/openai.ts create mode 100644 packages/typescript/ai-schemas/scripts/specs/anthropic/anthropic.openapi.json create mode 100644 packages/typescript/ai-schemas/scripts/specs/elevenlabs/elevenlabs.openapi.json create mode 100644 packages/typescript/ai-schemas/scripts/specs/gemini/gemini.discovery.json create mode 100644 packages/typescript/ai-schemas/scripts/specs/gemini/gemini.openapi.json create mode 100644 packages/typescript/ai-schemas/scripts/specs/openai/openai.openapi.json create mode 100644 packages/typescript/ai-schemas/src/index.ts create mode 100644 packages/typescript/ai-schemas/src/openai-strict.ts create mode 100644 packages/typescript/ai-schemas/src/providers/anthropic/endpoint-schema-map.ts create mode 100644 packages/typescript/ai-schemas/src/providers/anthropic/endpoint-zod-map.ts create mode 100644 packages/typescript/ai-schemas/src/providers/anthropic/index.ts create mode 100644 packages/typescript/ai-schemas/src/providers/anthropic/schemas-index.ts create mode 100644 packages/typescript/ai-schemas/src/providers/anthropic/schemas.gen.ts create mode 100644 packages/typescript/ai-schemas/src/providers/anthropic/zod.gen.ts create mode 100644 packages/typescript/ai-schemas/src/providers/elevenlabs/endpoint-schema-map.ts create mode 100644 packages/typescript/ai-schemas/src/providers/elevenlabs/endpoint-zod-map.ts create mode 100644 packages/typescript/ai-schemas/src/providers/elevenlabs/index.ts create mode 100644 packages/typescript/ai-schemas/src/providers/elevenlabs/schemas-index.ts create mode 100644 packages/typescript/ai-schemas/src/providers/elevenlabs/schemas.gen.ts create mode 100644 packages/typescript/ai-schemas/src/providers/elevenlabs/zod.gen.ts create mode 100644 packages/typescript/ai-schemas/src/providers/gemini/endpoint-schema-map.ts create mode 100644 packages/typescript/ai-schemas/src/providers/gemini/endpoint-zod-map.ts create mode 100644 packages/typescript/ai-schemas/src/providers/gemini/index.ts create mode 100644 packages/typescript/ai-schemas/src/providers/gemini/schemas-index.ts create mode 100644 packages/typescript/ai-schemas/src/providers/gemini/schemas.gen.ts create mode 100644 packages/typescript/ai-schemas/src/providers/gemini/zod.gen.ts create mode 100644 packages/typescript/ai-schemas/src/providers/openai/endpoint-schema-map.ts create mode 100644 packages/typescript/ai-schemas/src/providers/openai/endpoint-zod-map.ts create mode 100644 packages/typescript/ai-schemas/src/providers/openai/index.ts create mode 100644 packages/typescript/ai-schemas/src/providers/openai/schemas-index.ts create mode 100644 packages/typescript/ai-schemas/src/providers/openai/schemas.gen.ts create mode 100644 packages/typescript/ai-schemas/src/providers/openai/zod.gen.ts create mode 100644 packages/typescript/ai-schemas/src/schemas.ts create mode 100644 packages/typescript/ai-schemas/src/zod.ts create mode 100644 packages/typescript/ai-schemas/tests/openai-strict.test.ts create mode 100644 packages/typescript/ai-schemas/tsconfig.json create mode 100644 packages/typescript/ai-schemas/vite.config.ts diff --git a/.changeset/initial-ai-schemas.md b/.changeset/initial-ai-schemas.md new file mode 100644 index 000000000..3e855b9ea --- /dev/null +++ b/.changeset/initial-ai-schemas.md @@ -0,0 +1,16 @@ +--- +"@tanstack/ai-schemas": minor +--- + +Initial release of `@tanstack/ai-schemas` — JSON Schema and Zod schemas for AI provider endpoints, generated nightly from upstream OpenAPI specs. + +Covers OpenAI, Anthropic, Gemini, ElevenLabs, and FAL. Architecture ported from fal-ai/fal-js PR #212; extended to every provider that publishes an OpenAPI spec. + +Sources: +- OpenAI: `github.com/openai/openai-openapi` +- Anthropic: `docs.anthropic.com/openapi.json` +- Gemini: Google Generative Language Discovery doc, converted to OpenAPI in-pipeline +- ElevenLabs: `api.elevenlabs.io/openapi.json` +- FAL: per-model OpenAPI from the FAL models API (requires `FAL_KEY`) + +The `.github/workflows/sync-schemas.yml` workflow runs daily and opens a PR when any provider's spec changes. Resolves #619. diff --git a/.github/workflows/sync-schemas.yml b/.github/workflows/sync-schemas.yml new file mode 100644 index 000000000..860c80157 --- /dev/null +++ b/.github/workflows/sync-schemas.yml @@ -0,0 +1,95 @@ +name: Sync Provider Schemas + +on: + schedule: + # 05:00 UTC daily — one hour before sync-models.yml so the two automated + # PRs don't contend on the changeset / branch push at the same minute. + - cron: '0 5 * * *' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: write + pull-requests: write + +jobs: + sync: + name: Sync Schemas + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + persist-credentials: true + + - name: Setup Tools + uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main + + - name: Fetch provider OpenAPI specs + run: pnpm --filter @tanstack/ai-schemas fetch-schemas + env: + FAL_KEY: ${{ secrets.FAL_KEY }} + + - name: Generate JSON Schemas + Zod + run: pnpm --filter @tanstack/ai-schemas generate-schemas + + - name: Generate endpoint maps and barrels + run: pnpm --filter @tanstack/ai-schemas generate-endpoint-maps + + - name: Check for package changes + id: changes + run: | + if git diff --quiet -- packages/typescript/ai-schemas/; then + echo "changed=false" >> $GITHUB_OUTPUT + else + echo "changed=true" >> $GITHUB_OUTPUT + fi + + - name: Write changeset and commit + if: steps.changes.outputs.changed == 'true' + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + mkdir -p .changeset + cat > .changeset/automated-sync-schemas.md <<'EOF' + --- + "@tanstack/ai-schemas": patch + --- + + Nightly sync of provider OpenAPI schemas. + EOF + git add packages/typescript/ai-schemas/ .changeset/ + git commit -m "chore(schemas): sync provider OpenAPI schemas" + git push --force origin HEAD:automated/sync-schemas + + - name: Create or update PR + if: steps.changes.outputs.changed == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: | + BRANCH="automated/sync-schemas" + EXISTING_PR=$(gh pr list --head "$BRANCH" --base main --json number --jq '.[0].number' 2>/dev/null || true) + if [ -z "$EXISTING_PR" ] || [ "$EXISTING_PR" = "null" ]; then + BODY=$(cat <<'PRBODY' + Automated nightly sync of provider OpenAPI schemas. + + - Fetches upstream specs (OpenAI, Anthropic, Gemini, ElevenLabs, FAL). + - Runs `@hey-api/openapi-ts` to regenerate JSON Schemas + Zod. + - Bundles each schema's `$defs` closure and regenerates endpoint maps. + - Patch changeset for `@tanstack/ai-schemas`. + + Providers with missing secrets are skipped; the diff reflects only the + providers whose specs the workflow could fetch. + PRBODY + ) + gh pr create \ + --title "chore(schemas): sync provider OpenAPI schemas" \ + --body "$BODY" \ + --base main \ + --head "$BRANCH" + fi diff --git a/docs/advanced/ai-schemas.md b/docs/advanced/ai-schemas.md new file mode 100644 index 000000000..6db298efe --- /dev/null +++ b/docs/advanced/ai-schemas.md @@ -0,0 +1,90 @@ +--- +title: '@tanstack/ai-schemas: provider endpoint schemas' +id: ai-schemas +--- + +`@tanstack/ai-schemas` is a separate package that ships **JSON Schema** and **Zod** schemas for every endpoint of every supported provider (OpenAI, Anthropic, Gemini, ElevenLabs, FAL). The schemas are generated nightly from each provider's official OpenAPI spec, so they track upstream changes automatically. + +It complements the `model-meta.ts` shipped with each provider adapter: where `model-meta` describes coarse facts (context window, modalities, pricing), `ai-schemas` describes the rich per-endpoint constraint surface — allowed video durations, image sizes, voice IDs, prompt-length caps, etc. + +## When to reach for it + +- **Runtime validation before submitting a request** — surface bad inputs client-side instead of paying a round-trip and waiting on a vague upstream error. +- **Discovering allowed values** — populate dropdowns or pick lists with the exact enum a model accepts. +- **Feeding an LLM tool API** — each JSON Schema is self-contained (its `$ref` closure is bundled under `$defs`), so it can be passed straight to OpenAI / Anthropic / Gemini tool-use APIs without extra resolution. +- **Optimising prompts across models** — the schemas expose every model's constraints in a comparable shape, which is the foundation for prompt-portability helpers. + +## Install + +```bash +pnpm add @tanstack/ai-schemas +# Optional: only required if you import from `./zod` or `./zod/{provider}` +pnpm add zod +``` + +## Validate a video-generation request + +```ts +import { videoEndpointZodMap } from '@tanstack/ai-schemas/zod/fal-video' + +const result = videoEndpointZodMap[ + 'fal-ai/kling-video/o3/pro/text-to-video' +].input.safeParse({ + prompt: 'A mecha lands on the ground to save the city, in anime style', + duration: '8', + aspect_ratio: '9:16', +}) + +if (!result.success) console.error(result.error.issues) +``` + +## Discover what a model supports + +```ts +import { KlingVideoO3ProTextToVideoInputSchema } from '@tanstack/ai-schemas/schemas/fal-video' + +KlingVideoO3ProTextToVideoInputSchema.properties.duration.enum +// ['3', '4', …, '15'] + +KlingVideoO3ProTextToVideoInputSchema.properties.aspect_ratio.enum +// ['16:9', '9:16', '1:1'] +``` + +## OpenAI structured-outputs strict mode + +```ts +import { toOpenAIStrict } from '@tanstack/ai-schemas/openai-strict' +import { Veo3InputSchema } from '@tanstack/ai-schemas/schemas/fal-video' + +await openai.chat.completions.create({ + model: 'gpt-5', + messages: [...], + response_format: { + type: 'json_schema', + json_schema: { + name: 'veo3_input', + schema: toOpenAIStrict(Veo3InputSchema), + strict: true, + }, + }, +}) +``` + +## How it stays current + +The `.github/workflows/sync-schemas.yml` workflow runs daily and: + +1. Fetches upstream OpenAPI specs for every provider. +2. Re-runs `@hey-api/openapi-ts` to regenerate JSON Schemas + Zod. +3. Bundles each schema's `$ref` closure, regenerates endpoint maps. +4. If anything changed: bumps the package patch version, writes a changeset, opens an automated PR. + +Provider sources: + +| Provider | Source | Notes | +| ---------- | ------------------------------------------------------------------------------- | ---------------------------------------------------- | +| OpenAI | `github.com/openai/openai-openapi` | Public, no API key required. | +| Anthropic | Stainless-generated OpenAPI (resolved via `anthropic-sdk-typescript/.stats.yml`) | Public. | +| Gemini | `generativelanguage.googleapis.com/$discovery/rest?version=v1beta` | Google Discovery doc converted to OpenAPI in pipeline. | +| ElevenLabs | `api.elevenlabs.io/openapi.json` | Public. | +| FAL | `api.fal.ai/v1/models?status=active&expand=openapi-3.0` (per-model) | Needs `FAL_KEY`. Per-category split (`fal-image`, `fal-video`, etc.). | diff --git a/docs/config.json b/docs/config.json index 370c839a5..f3ed43ee6 100644 --- a/docs/config.json +++ b/docs/config.json @@ -223,6 +223,10 @@ { "label": "Extend Adapter", "to": "advanced/extend-adapter" + }, + { + "label": "Provider Endpoint Schemas", + "to": "advanced/ai-schemas" } ] }, diff --git a/knip.json b/knip.json index f0de2fd92..83ce8a3c1 100644 --- a/knip.json +++ b/knip.json @@ -43,6 +43,14 @@ }, "packages/typescript/ai-vue-ui": { "ignore": ["src/use-chat-context.ts"] + }, + "packages/typescript/ai-schemas": { + "ignore": [ + "src/providers/**/*.gen.ts", + "scripts/**", + "openapi-ts.config.ts" + ], + "ignoreDependencies": ["zod"] } } } diff --git a/packages/typescript/ai-schemas/README.md b/packages/typescript/ai-schemas/README.md new file mode 100644 index 000000000..f42c5dd8d --- /dev/null +++ b/packages/typescript/ai-schemas/README.md @@ -0,0 +1,106 @@ +# @tanstack/ai-schemas + +Runtime schemas for AI provider endpoints. Ships **JSON Schema** definitions for tooling plus **Zod** schemas for runtime validation — no hand-maintained TypeScript types. Derive types from Zod with `z.infer`. + +Schemas are generated nightly from each provider's official OpenAPI spec (or equivalent), so the package tracks upstream changes automatically. + +## Install + +```bash +pnpm add @tanstack/ai-schemas +# Zod is an optional peer; only required if you import from `./zod` or `./zod/{provider}`. +pnpm add zod +``` + +## Providers covered + +| Provider | Source | Notes | +| ---------- | ------------------------------------------------------------------------------- | ---------------------------------------------------- | +| OpenAI | `github.com/openai/openai-openapi` (raw `openapi.yaml`) | Public, no API key required. | +| Anthropic | Official OpenAPI from `anthropic-sdk-typescript` repo | Public. | +| Gemini | `generativelanguage.googleapis.com/$discovery/rest?version=v1beta` | Google Discovery doc converted to OpenAPI in-pipeline. | +| ElevenLabs | `api.elevenlabs.io/openapi.json` | Public. | +| FAL | `api.fal.ai/v1/models?status=active&expand=openapi-3.0` (per-model OpenAPI) | Needs `FAL_KEY` to fetch. Per-category split. | + +OpenAI-compatible providers (Groq, xAI/Grok) reuse the OpenAI schemas. + +## Entry points + +ES modules only, per-provider subpath exports: + +```ts +// Default entry — namespaced JSON Schemas across providers. +import { OpenAi, Anthropic, Gemini, Fal, ElevenLabs } from '@tanstack/ai-schemas' + +// Per-provider JSON Schemas (no `zod` peer required). +import { openaiEndpointSchemaMap } from '@tanstack/ai-schemas/schemas/openai' + +// Per-provider Zod (requires `zod ^4`). +import { openaiEndpointZodMap } from '@tanstack/ai-schemas/zod/openai' + +// OpenAI structured-outputs strict-mode helper. +import { toOpenAIStrict } from '@tanstack/ai-schemas/openai-strict' +``` + +For multi-category providers (currently just FAL), schemas are further split: + +```ts +import { videoEndpointZodMap } from '@tanstack/ai-schemas/zod/fal-video' +import { imageEndpointSchemaMap } from '@tanstack/ai-schemas/schemas/fal-image' +``` + +## Examples + +Validate a video generation request before hitting the network: + +```ts +import { videoEndpointZodMap } from '@tanstack/ai-schemas/zod/fal-video' + +const result = videoEndpointZodMap[ + 'fal-ai/kling-video/o3/pro/text-to-video' +].input.safeParse({ + prompt: 'A mecha lands on the ground to save the city, in anime style', + duration: '8', + aspect_ratio: '9:16', +}) + +if (!result.success) console.error(result.error.issues) +``` + +Discover what a model supports (build a duration picker): + +```ts +import { KlingVideoO3ProTextToVideoInputSchema } from '@tanstack/ai-schemas/schemas/fal-video' + +KlingVideoO3ProTextToVideoInputSchema.properties.duration.enum +// ['3', '4', …, '15'] +``` + +## Bundle size and tree-shaking + +The package is `sideEffects: false` and JSON Schemas ship self-contained — each schema bundles its `$ref` closure under `$defs`. Importing one schema pulls only that schema's transitive closure, not the whole category. See the [fal-ai/schemas reference](https://github.com/fal-ai/fal-js/pull/212) for the design rationale. + +## How updates work + +The `.github/workflows/sync-schemas.yml` workflow runs nightly: + +1. `fetch-schemas` — pulls upstream OpenAPI specs (or equivalents) per provider. +2. `generate-schemas` — runs `@hey-api/openapi-ts` to emit per-provider `schemas.gen.ts` (JSON Schemas) and `zod.gen.ts` (Zod). +3. `generate-endpoint-maps` — emits endpoint-id-keyed maps and bundles `$defs` closures into each JSON Schema. + +If any provider's spec changes, the workflow bumps the package version, creates a changeset, and opens an automated PR. + +## Local development + +```bash +# Pull every provider's spec. +pnpm fetch-schemas + +# Pull a single provider. +pnpm fetch-schemas --provider=openai + +# Full regeneration. +pnpm update-schemas +``` + +`FAL_KEY` must be set in your environment to fetch FAL specs. diff --git a/packages/typescript/ai-schemas/openapi-ts.config.ts b/packages/typescript/ai-schemas/openapi-ts.config.ts new file mode 100644 index 000000000..6f0f4fffd --- /dev/null +++ b/packages/typescript/ai-schemas/openapi-ts.config.ts @@ -0,0 +1,62 @@ +/** + * @hey-api/openapi-ts driver. + * + * For each (provider, category) tuple discovered by the provider registry, + * emit JSON Schemas + Zod into src/providers/{id}/{category?}/. The post- + * process step (scripts/generate-endpoint-maps.ts) rewrites the generated + * schemas.gen.ts to bundle $ref closures and emits endpoint maps. + */ + +import { loadAllProviderSpecs } from './scripts/load-all-specs.js' + +const originalWarn = console.warn +console.warn = (...args: Array) => { + const message = args[0] + if (typeof message === 'string' && message.includes('Transformers warning:')) { + return + } + originalWarn.apply(console, args) +} + +const originalLog = console.log +console.log = (...args: Array) => { + const message = args[0] + if ( + typeof message === 'string' && + message.includes('raw OpenAPI specification') + ) { + return + } + originalLog.apply(console, args) +} + +export default loadAllProviderSpecs().map(({ providerId, category, mergedSpec }) => { + const outputPath = category + ? `./src/providers/${providerId}/${category}` + : `./src/providers/${providerId}` + return { + input: mergedSpec, + output: { + path: outputPath, + indexFile: false, + postProcess: ['prettier'], + }, + plugins: [ + { name: '@hey-api/schemas', type: 'json' }, + { name: 'zod', compatibilityVersion: 4 }, + ], + parser: { + filters: { + // Most providers expose Input/Output suffixes; non-matching schemas + // are dropped from the codegen output to keep bundles lean. + schemas: { include: '/Input$|Output$|Request$|Response$/' }, + operations: { + include: ['/post .*/'], + exclude: ['/get .*/'], + }, + orphans: false, + preserveOrder: true, + }, + }, + } +}) diff --git a/packages/typescript/ai-schemas/package.json b/packages/typescript/ai-schemas/package.json new file mode 100644 index 000000000..a4f1a7190 --- /dev/null +++ b/packages/typescript/ai-schemas/package.json @@ -0,0 +1,90 @@ +{ + "name": "@tanstack/ai-schemas", + "version": "0.1.0", + "description": "JSON Schema and Zod schemas for AI provider endpoints (OpenAI, Anthropic, Gemini, FAL, ElevenLabs, …), generated nightly from upstream OpenAPI specs.", + "author": "", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/TanStack/ai.git", + "directory": "packages/typescript/ai-schemas" + }, + "type": "module", + "sideEffects": false, + "module": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts", + "exports": { + ".": { + "types": "./dist/esm/index.d.ts", + "import": "./dist/esm/index.js" + }, + "./schemas": { + "types": "./dist/esm/schemas.d.ts", + "import": "./dist/esm/schemas.js" + }, + "./zod": { + "types": "./dist/esm/zod.d.ts", + "import": "./dist/esm/zod.js" + }, + "./openai-strict": { + "types": "./dist/esm/openai-strict.d.ts", + "import": "./dist/esm/openai-strict.js" + }, + "./schemas/*": { + "types": "./dist/esm/providers/*/schemas-index.d.ts", + "import": "./dist/esm/providers/*/schemas-index.js" + }, + "./zod/*": { + "types": "./dist/esm/providers/*/index.d.ts", + "import": "./dist/esm/providers/*/index.js" + } + }, + "files": [ + "dist", + "src" + ], + "scripts": { + "build": "vite build", + "clean": "premove ./build ./dist", + "lint:fix": "eslint ./src --fix", + "test:build": "publint --strict", + "test:eslint": "eslint ./src", + "test:lib": "vitest --passWithNoTests", + "test:lib:dev": "pnpm test:lib --watch", + "test:types": "tsc", + "fetch-schemas": "tsx scripts/fetch-schemas.ts", + "generate-schemas": "openapi-ts", + "generate-endpoint-maps": "tsx scripts/generate-endpoint-maps.ts", + "update-schemas": "pnpm fetch-schemas && pnpm generate-schemas && pnpm generate-endpoint-maps" + }, + "keywords": [ + "ai", + "schemas", + "json-schema", + "zod", + "openapi", + "openai", + "anthropic", + "gemini", + "fal", + "elevenlabs", + "tanstack" + ], + "peerDependencies": { + "zod": "^4.0.0" + }, + "peerDependenciesMeta": { + "zod": { + "optional": true + } + }, + "devDependencies": { + "@hey-api/openapi-ts": "^0.97.2", + "@vitest/coverage-v8": "4.0.14", + "prettier": "^3.7.4", + "tsx": "^4.21.0", + "vite": "^7.3.3", + "yaml": "^2.7.0", + "zod": "^4.2.0" + } +} diff --git a/packages/typescript/ai-schemas/scripts/fetch-schemas.ts b/packages/typescript/ai-schemas/scripts/fetch-schemas.ts new file mode 100644 index 000000000..0b5b51162 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/fetch-schemas.ts @@ -0,0 +1,99 @@ +#!/usr/bin/env tsx +/** + * Fetch upstream OpenAPI specs for every provider and cache them under + * scripts/specs/{providerId}/. Subsequent steps (`generate-schemas`, + * `generate-endpoint-maps`) consume those cached specs. + * + * Usage: + * pnpm fetch-schemas # fetch every provider + * pnpm fetch-schemas --provider=openai # one provider + * pnpm fetch-schemas --provider=fal,openai # subset + * + * Skipping rules: + * - Providers with requiresAuth: true and no env var set are logged and + * skipped (rather than throwing). This lets the nightly workflow run + * end-to-end even before all secrets are configured. + * - Network failures for one provider are logged and skipped; the script + * exits 0 unless every requested provider failed. + */ + +import { dirname, join } from 'node:path' +import { fileURLToPath } from 'node:url' + +import { ALL_PROVIDERS } from './providers/index.js' + +const __dirname = dirname(fileURLToPath(import.meta.url)) +const SPECS_ROOT = join(__dirname, 'specs') + +interface CliArgs { + providers: Array | null +} + +function parseArgs(): CliArgs { + const args = process.argv.slice(2) + let providers: Array | null = null + + for (const arg of args) { + if (arg.startsWith('--provider=') || arg.startsWith('--providers=')) { + const list = arg.split('=')[1] + if (!list) throw new Error('Provider list is empty') + providers = list.split(',').map((s) => s.trim()).filter(Boolean) + } else { + throw new Error(`Unknown argument: ${arg}`) + } + } + + return { providers } +} + +async function main(): Promise { + const args = parseArgs() + const selected = args.providers + ? ALL_PROVIDERS.filter((p) => args.providers!.includes(p.id)) + : ALL_PROVIDERS + + if (selected.length === 0) { + console.error('No matching providers selected.') + process.exit(1) + } + + let succeeded = 0 + let skipped = 0 + let failed = 0 + + for (const provider of selected) { + const outDir = join(SPECS_ROOT, provider.id) + console.log(`\n=== ${provider.id} ===`) + + if (provider.requiresAuth && provider.authEnvVar) { + if (!process.env[provider.authEnvVar]) { + console.log( + ` Skipping ${provider.id}: env var ${provider.authEnvVar} is not set.`, + ) + skipped++ + continue + } + } + + try { + await provider.fetch({ outDir }) + succeeded++ + } catch (error) { + console.error( + ` ${provider.id} fetch failed:`, + error instanceof Error ? error.message : error, + ) + failed++ + } + } + + console.log( + `\nDone. ${succeeded} succeeded, ${skipped} skipped, ${failed} failed.`, + ) + if (succeeded === 0 && failed > 0) process.exit(1) +} + +main().catch((error) => { + console.error('\nUnhandled error:', error) + process.exit(1) +}) diff --git a/packages/typescript/ai-schemas/scripts/generate-endpoint-maps.ts b/packages/typescript/ai-schemas/scripts/generate-endpoint-maps.ts new file mode 100644 index 000000000..73dc1f815 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/generate-endpoint-maps.ts @@ -0,0 +1,601 @@ +#!/usr/bin/env tsx +/** + * Post-process @hey-api/openapi-ts output for every (provider, category) tuple. + * + * For each unit we emit: + * - schemas.gen.ts (rewritten in place to bundle $ref closures under $defs). + * - endpoint-zod-map.ts: { [endpointId]: { input, output } } Zod schemas. + * - endpoint-schema-map.ts: same shape, JSON Schemas. + * - index.ts: Zod barrel for `@tanstack/ai-schemas/zod/{provider-id}`. + * - schemas-index.ts: JSON Schema barrel for `@tanstack/ai-schemas/schemas/{provider-id}`. + * + * At the package root we then emit: + * - src/schemas.ts: namespaced JSON Schema barrels (one per provider unit). + * - src/zod.ts: namespaced Zod barrels. + * - src/index.ts: default entry, re-exports schemas.ts. + * + * Ported from fal-ai/fal-js PR #212 and generalised so every provider unit + * (with optional category) lives under src/providers/{providerId}/[category]/. + */ + +import { existsSync, readFileSync, writeFileSync } from 'node:fs' +import { dirname, join } from 'node:path' +import { fileURLToPath, pathToFileURL } from 'node:url' +import * as prettier from 'prettier' + +import type { ProviderCategorySpec } from './providers.js' +import { loadAllProviderSpecs } from './load-all-specs.js' + +const __dirname = dirname(fileURLToPath(import.meta.url)) +const SCHEMAS_SRC = join(__dirname, '..', 'src') +const PROVIDERS_ROOT = join(SCHEMAS_SRC, 'providers') + +interface EndpointInfo { + endpointId: string + inputType: string + outputType: string +} + +function extractEndpointsFromSpec(unit: ProviderCategorySpec): Array { + const endpoints: Array = [] + const strategy = unit.outputStrategy ?? 'post-200' + + for (const [pathKey, pathItem] of Object.entries(unit.mergedSpec.paths)) { + const post = (pathItem as { post?: Record }).post + if (!post) continue + + const inputRef = + post.requestBody?.content?.['application/json']?.schema?.$ref + if (typeof inputRef !== 'string') continue + + let outputRef: string | undefined + if (strategy === 'sibling-get') { + const resultPathKey = `${pathKey}/requests/{request_id}` + const resultGet = (unit.mergedSpec.paths[resultPathKey] as + | { get?: Record } + | undefined)?.get + outputRef = + resultGet?.responses?.['200']?.content?.['application/json']?.schema?.$ref + } else { + outputRef = + post.responses?.['200']?.content?.['application/json']?.schema?.$ref + } + + if (typeof outputRef !== 'string') { + // Many provider operations return a top-level shape inline rather than + // by ref. We skip those — they can't be addressed by a single named + // schema export and bloat the map needlessly. + continue + } + + const inputType = inputRef.replace(/^#\/components\/schemas\//, '') + const outputType = outputRef.replace(/^#\/components\/schemas\//, '') + const endpointId = pathKey.replace(/^\//, '') + endpoints.push({ endpointId, inputType, outputType }) + } + + return endpoints.sort((a, b) => a.endpointId.localeCompare(b.endpointId)) +} + +function normalizeId(name: string): string { + return name.replace(/[^a-zA-Z0-9]/g, '').toLowerCase() +} + +function buildZodExportLookup(unitPath: string): Map { + const source = readFileSync(join(unitPath, 'zod.gen.ts'), 'utf8') + const lookup = new Map() + for (const match of source.matchAll(/export const (z[A-Za-z0-9_$]+)/g)) { + const exportName = match[1]! + lookup.set(normalizeId(exportName.slice(1)), exportName) + } + return lookup +} + +function buildSchemaExportLookup(unitPath: string): Map { + const source = readFileSync(join(unitPath, 'schemas.gen.ts'), 'utf8') + const lookup = new Map() + for (const match of source.matchAll(/export const ([A-Za-z0-9_$]+)Schema\b/g)) { + lookup.set(normalizeId(match[1]!), `${match[1]}Schema`) + } + return lookup +} + +function toPascalCase(str: string): string { + const pascalCase = str + .split(/[-_/]/) + .filter(Boolean) + .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) + .join('') + return /^\d/.test(pascalCase) ? 'Gen' + pascalCase : pascalCase +} + +function toCamelCase(str: string): string { + const pascal = toPascalCase(str) + return pascal.charAt(0).toLowerCase() + pascal.slice(1) +} + +async function formatTypeScript(content: string): Promise { + const config = await prettier.resolveConfig(process.cwd()) + return prettier.format(content, { ...config, parser: 'typescript' }) +} + +// ────────────────────────────────────────────────────────────────────────────── +// $defs bundling +// ────────────────────────────────────────────────────────────────────────────── + +const COMPONENT_REF_PREFIX = '#/components/schemas/' +const DEFS_REF_PREFIX = '#/$defs/' + +type JsonValue = + | string + | number + | boolean + | null + | { readonly [key: string]: JsonValue } + | ReadonlyArray + +function collectComponentRefs(node: unknown, into: Set): void { + if (typeof node !== 'object' || node === null) return + if (Array.isArray(node)) { + for (const v of node) collectComponentRefs(v, into) + return + } + for (const [key, value] of Object.entries(node)) { + if ( + key === '$ref' && + typeof value === 'string' && + value.startsWith(COMPONENT_REF_PREFIX) + ) { + into.add(value.slice(COMPONENT_REF_PREFIX.length)) + } else { + collectComponentRefs(value, into) + } + } +} + +function rewriteRefs(node: JsonValue): JsonValue { + if (typeof node !== 'object' || node === null) return node + if (Array.isArray(node)) return node.map(rewriteRefs) + const out: Record = {} + for (const [key, value] of Object.entries(node)) { + if ( + key === '$ref' && + typeof value === 'string' && + value.startsWith(COMPONENT_REF_PREFIX) + ) { + out[key] = DEFS_REF_PREFIX + value.slice(COMPONENT_REF_PREFIX.length) + } else { + out[key] = rewriteRefs(value) + } + } + return out +} + +function bundleSchemaWithDefs( + name: string, + schemas: Record, + context: string, +): JsonValue { + const root = schemas[name] + if (root === undefined) { + throw new Error(`Schema not found in ${context}: ${name}`) + } + + const closure = new Set() + const queue: Array = [] + const seedRefs = new Set() + collectComponentRefs(root, seedRefs) + for (const r of seedRefs) { + if (r !== name) queue.push(r) + } + while (queue.length > 0) { + const cur = queue.shift()! + if (closure.has(cur)) continue + closure.add(cur) + const target = schemas[cur] + if (target === undefined) { + console.warn( + ` Warning: ref target '${cur}' not found in ${context}/schemas.gen.ts (transitively referenced from '${name}')`, + ) + continue + } + const subRefs = new Set() + collectComponentRefs(target, subRefs) + for (const r of subRefs) { + if (r !== name && !closure.has(r)) queue.push(r) + } + } + + const rewrittenRoot = rewriteRefs(root) as Record + if (closure.size === 0) return rewrittenRoot + + const defs: Record = {} + for (const refName of [...closure].sort()) { + const target = schemas[refName] + if (target === undefined) continue + defs[refName] = rewriteRefs(target) + } + return { ...rewrittenRoot, $defs: defs } +} + +async function loadUnitSchemas(unitPath: string): Promise> { + const url = pathToFileURL(join(unitPath, 'schemas.gen.ts')).href + const mod = (await import(url)) as Record + const out: Record = {} + for (const [exportName, value] of Object.entries(mod)) { + if (exportName === 'default') continue + if (!exportName.endsWith('Schema')) continue + out[exportName.slice(0, -'Schema'.length)] = value as JsonValue + } + return out +} + +async function rewriteSchemasGen(label: string, unitPath: string): Promise { + const schemas = await loadUnitSchemas(unitPath) + const sortedNames = Object.keys(schemas).sort() + + const lines = [ + `/* eslint-disable */`, + `// AUTO-GENERATED - Do not edit manually`, + `// Generated by @hey-api/openapi-ts and post-processed by`, + `// scripts/generate-endpoint-maps.ts to embed each schema's $defs closure.`, + ``, + ] + + for (const name of sortedNames) { + const bundled = bundleSchemaWithDefs(name, schemas, label) + lines.push( + `export const ${name}Schema = ${JSON.stringify(bundled)} as const;`, + ``, + ) + } + + const out = await formatTypeScript(lines.join('\n')) + writeFileSync(join(unitPath, 'schemas.gen.ts'), out) + console.log(` ✓ Rewrote ${label}/schemas.gen.ts with $defs bundling`) +} + +/** + * Prefix every `zod.gen.ts` with file-level escape hatches. + * + * - `/* eslint-disable * /`: machine-written code shouldn't be policed by + * project lint rules (style choices, `no-control-regex` on regex strings + * the upstream spec embedded verbatim, etc.). + * - `// @ts-nocheck`: the heyapi Zod plugin has edge cases that no spec + * transform fixes cleanly — most prominently nested polymorphic types + * that emit `.extend()` on a `z.discriminatedUnion`, which doesn't accept + * that method. Spec-level transforms already cover the common cases + * (`coerceDefaults` strips type/value mismatches, `default: null` on + * non-nullable, etc.); `@ts-nocheck` covers the remaining long tail. The + * runtime Zod schemas are still valid — only the type-level wiring + * reports as un-`.extend`-able. + * + * The hand-written source under src/ still type-checks strictly. + */ +function postProcessZodGen(unitPath: string): void { + const file = join(unitPath, 'zod.gen.ts') + let source = readFileSync(file, 'utf8') + + // Runtime fix: heyapi emits `zFoo.extend({ ... })` to graft a discriminator + // onto each member of a `z.discriminatedUnion(...)`. When `zFoo` is itself + // a `z.discriminatedUnion`, `.extend` isn't a method on that Zod type — + // calling it throws at runtime. `z.intersection(zFoo, z.object({ ... }))` + // is the equivalent that works for both ZodObject and ZodDiscriminatedUnion + // at runtime. (The outer `discriminatedUnion` still flags a type error in + // that case because intersections aren't `$ZodTypeDiscriminable` — covered + // by the `@ts-nocheck` below.) + const discriminatedUnionNames = new Set() + for (const match of source.matchAll( + /export const (z[A-Za-z0-9_$]+)\s*=\s*z\.discriminatedUnion\(/g, + )) { + discriminatedUnionNames.add(match[1]!) + } + if (discriminatedUnionNames.size > 0) { + const namePattern = [...discriminatedUnionNames].join('|') + const extendPattern = new RegExp( + String.raw`(${namePattern})\.extend\((\{[^{}]*\})\)`, + 'g', + ) + source = source.replace( + extendPattern, + (_, name: string, extension: string) => + `z.intersection(${name}, z.object(${extension}))`, + ) + } + + // Strip any prior headers (idempotent re-runs) so we produce a stable result. + source = source.replace(/^(\/\* eslint-disable \*\/\n|\/\/ @ts-nocheck\n)+/, '') + source = `/* eslint-disable */\n// @ts-nocheck\n${source}` + writeFileSync(file, source) +} + +// ────────────────────────────────────────────────────────────────────────────── +// Per-unit generators +// ────────────────────────────────────────────────────────────────────────────── + +async function generateEndpointZodMap( + unitLabel: string, + unitPath: string, + endpoints: Array, +): Promise { + const typeName = toPascalCase(unitLabel) + const constName = `${toCamelCase(unitLabel)}EndpointZodMap` + const idTypeName = `${typeName}EndpointId` + const zodExports = buildZodExportLookup(unitPath) + + const resolveZodName = ( + schemaName: string, + endpointId: string, + ): string | null => { + const hit = zodExports.get(normalizeId(schemaName)) + if (!hit) { + console.warn( + ` Warning: no zod export found for "${schemaName}" (endpoint ${endpointId}) in ${unitLabel}/zod.gen.ts`, + ) + return null + } + return hit + } + + const resolved = endpoints.flatMap( + ({ endpointId, inputType, outputType }) => { + const inputName = resolveZodName(inputType, endpointId) + const outputName = resolveZodName(outputType, endpointId) + if (!inputName || !outputName) return [] + return [{ endpointId, inputName, outputName }] + }, + ) + + const schemaImports = Array.from( + new Set(resolved.flatMap((e) => [e.inputName, e.outputName])), + ).sort() + + const lines = [ + `// AUTO-GENERATED - Do not edit manually`, + `// Generated via scripts/generate-endpoint-maps.ts`, + ``, + `import {`, + ...schemaImports.map((t) => ` ${t},`), + `} from './zod.gen.js'`, + ``, + `/** Map of ${unitLabel} endpoint id -> Zod input/output schemas. */`, + `export const ${constName}: {`, + ] + for (const { endpointId, inputName, outputName } of resolved) { + lines.push( + ` readonly '${endpointId}': { readonly input: typeof ${inputName}; readonly output: typeof ${outputName} },`, + ) + } + lines.push(`} = {`) + for (const { endpointId, inputName, outputName } of resolved) { + lines.push( + ` '${endpointId}': { input: ${inputName}, output: ${outputName} },`, + ) + } + lines.push(`}`) + lines.push(``) + lines.push(`/** Union of valid ${unitLabel} endpoint ids. */`) + lines.push(`export type ${idTypeName} = keyof typeof ${constName}`) + + const out = await formatTypeScript(lines.join('\n')) + writeFileSync(join(unitPath, 'endpoint-zod-map.ts'), out) + console.log(` ✓ Generated ${unitLabel}/endpoint-zod-map.ts`) +} + +async function generateEndpointSchemaMap( + unitLabel: string, + unitPath: string, + endpoints: Array, +): Promise { + const constName = `${toCamelCase(unitLabel)}EndpointSchemaMap` + const schemaExports = buildSchemaExportLookup(unitPath) + + const resolveSchemaName = ( + schemaName: string, + endpointId: string, + ): string | null => { + const hit = schemaExports.get(normalizeId(schemaName)) + if (!hit) { + console.warn( + ` Warning: no JSON Schema export found for "${schemaName}" (endpoint ${endpointId}) in ${unitLabel}/schemas.gen.ts`, + ) + return null + } + return hit + } + + const resolved = endpoints.flatMap( + ({ endpointId, inputType, outputType }) => { + const inputName = resolveSchemaName(inputType, endpointId) + const outputName = resolveSchemaName(outputType, endpointId) + if (!inputName || !outputName) return [] + return [{ endpointId, inputName, outputName }] + }, + ) + + const schemaImports = Array.from( + new Set(resolved.flatMap((e) => [e.inputName, e.outputName])), + ).sort() + + const lines = [ + `// AUTO-GENERATED - Do not edit manually`, + `// Generated via scripts/generate-endpoint-maps.ts`, + ``, + `import {`, + ...schemaImports.map((t) => ` ${t},`), + `} from './schemas.gen.js'`, + ``, + `/**`, + ` * Map of ${unitLabel} endpoint id -> self-contained JSON Schemas.`, + ` * Each input/output schema bundles its $ref closure under \`$defs\`, so it`, + ` * can be handed directly to LLM tool APIs or \`z.fromJSONSchema\`.`, + ` */`, + `export const ${constName}: {`, + ] + for (const { endpointId, inputName, outputName } of resolved) { + lines.push( + ` readonly '${endpointId}': { readonly input: typeof ${inputName}; readonly output: typeof ${outputName} },`, + ) + } + lines.push(`} = {`) + for (const { endpointId, inputName, outputName } of resolved) { + lines.push( + ` '${endpointId}': { input: ${inputName}, output: ${outputName} },`, + ) + } + lines.push(`}`) + + const out = await formatTypeScript(lines.join('\n')) + writeFileSync(join(unitPath, 'endpoint-schema-map.ts'), out) + console.log(` ✓ Generated ${unitLabel}/endpoint-schema-map.ts`) +} + +async function generateUnitZodIndex( + unitLabel: string, + unitPath: string, +): Promise { + const lines = [ + `// AUTO-GENERATED - Do not edit manually`, + `// Generated via scripts/generate-endpoint-maps.ts`, + ``, + `export * from './endpoint-zod-map.js'`, + `export * from './zod.gen.js'`, + ] + const out = await formatTypeScript(lines.join('\n')) + writeFileSync(join(unitPath, 'index.ts'), out) + console.log(` ✓ Generated ${unitLabel}/index.ts`) +} + +async function generateUnitSchemasIndex( + unitLabel: string, + unitPath: string, +): Promise { + const lines = [ + `// AUTO-GENERATED - Do not edit manually`, + `// Generated via scripts/generate-endpoint-maps.ts`, + ``, + `export * from './endpoint-schema-map.js'`, + `export * from './schemas.gen.js'`, + ] + const out = await formatTypeScript(lines.join('\n')) + writeFileSync(join(unitPath, 'schemas-index.ts'), out) + console.log(` ✓ Generated ${unitLabel}/schemas-index.ts`) +} + +// ────────────────────────────────────────────────────────────────────────────── +// Top-level barrels +// ────────────────────────────────────────────────────────────────────────────── + +interface ProcessedUnit { + /** Full label, e.g. "openai" or "fal/video". Drives namespace name. */ + label: string + /** Subpath segment exposed in package.json exports (e.g. "openai" or "fal-video"). */ + subpath: string + /** Source-relative directory (e.g. "providers/openai" or "providers/fal-video/video"). */ + relSrc: string +} + +async function generateSchemasBarrel(units: Array): Promise { + const lines = [ + `// AUTO-GENERATED - Do not edit manually`, + `// Generated via scripts/generate-endpoint-maps.ts`, + ``, + `// Per-provider JSON Schemas + endpoint schema maps. Namespaced so identical`, + `// schema names across providers (e.g. \`MessageInputSchema\`) don't collide.`, + ...units.map( + (u) => `export * as ${toPascalCase(u.label)} from './${u.relSrc}/schemas-index.js'`, + ), + ] + const out = await formatTypeScript(lines.join('\n')) + writeFileSync(join(SCHEMAS_SRC, 'schemas.ts'), out) + console.log(` ✓ Generated schemas.ts`) +} + +async function generateZodBarrel(units: Array): Promise { + const lines = [ + `// AUTO-GENERATED - Do not edit manually`, + `// Generated via scripts/generate-endpoint-maps.ts`, + ``, + `// Per-provider Zod barrels. Requires the optional \`zod ^4\` peer.`, + ...units.map( + (u) => `export * as ${toPascalCase(u.label)} from './${u.relSrc}/index.js'`, + ), + ] + const out = await formatTypeScript(lines.join('\n')) + writeFileSync(join(SCHEMAS_SRC, 'zod.ts'), out) + console.log(` ✓ Generated zod.ts`) +} + +async function generateIndex(): Promise { + const lines = [ + `// AUTO-GENERATED - Do not edit manually`, + `// Generated via scripts/generate-endpoint-maps.ts`, + ``, + `export * from './schemas.js'`, + ] + const out = await formatTypeScript(lines.join('\n')) + writeFileSync(join(SCHEMAS_SRC, 'index.ts'), out) + console.log(` ✓ Generated index.ts`) +} + +// ────────────────────────────────────────────────────────────────────────────── +// Entry point +// ────────────────────────────────────────────────────────────────────────────── + +async function main(): Promise { + if (!existsSync(SCHEMAS_SRC)) { + console.error('Error: packages/typescript/ai-schemas/src/ not found.') + process.exit(1) + } + + console.log('Loading provider specs...') + const units = loadAllProviderSpecs() + console.log(`Found ${units.length} provider/category units`) + + const processed: Array = [] + for (const unit of units) { + const subpath = unit.category + ? `${unit.providerId}-${unit.category}` + : unit.providerId + const relSrc = unit.category + ? `providers/${unit.providerId}/${unit.category}` + : `providers/${unit.providerId}` + const unitPath = join(SCHEMAS_SRC, relSrc) + const label = subpath + + if (!existsSync(unitPath)) { + console.warn( + `\n Warning: ${unitPath} does not exist — run \`pnpm generate-schemas\` first. Skipping ${label}.`, + ) + continue + } + + console.log(`\nProcessing ${label}...`) + const endpoints = extractEndpointsFromSpec(unit) + if (endpoints.length === 0) { + console.warn(` Warning: no endpoints found for ${label}, skipping`) + continue + } + + await rewriteSchemasGen(label, unitPath) + postProcessZodGen(unitPath) + await generateEndpointZodMap(label, unitPath, endpoints) + await generateEndpointSchemaMap(label, unitPath, endpoints) + await generateUnitZodIndex(label, unitPath) + await generateUnitSchemasIndex(label, unitPath) + processed.push({ label, subpath, relSrc }) + } + + console.log('\nGenerating top-level barrels...') + await generateSchemasBarrel(processed) + await generateZodBarrel(processed) + await generateIndex() + + console.log(`\n✓ Done! Generated schemas under ${PROVIDERS_ROOT}`) + for (const u of processed) console.log(` - ${u.label} (${u.relSrc})`) +} + +main().catch((error) => { + console.error('Error:', error) + process.exit(1) +}) diff --git a/packages/typescript/ai-schemas/scripts/load-all-specs.ts b/packages/typescript/ai-schemas/scripts/load-all-specs.ts new file mode 100644 index 000000000..65cc31b87 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/load-all-specs.ts @@ -0,0 +1,13 @@ +/** + * Aggregate every provider's cached spec into a flat list of + * (providerId, category, mergedSpec) tuples. Used by both openapi-ts.config.ts + * (one input per tuple) and scripts/generate-endpoint-maps.ts (one set of + * barrels per tuple). + */ + +import type { ProviderCategorySpec } from './providers.js' +import { ALL_PROVIDERS } from './providers/index.js' + +export function loadAllProviderSpecs(): Array { + return ALL_PROVIDERS.flatMap((provider) => provider.load()) +} diff --git a/packages/typescript/ai-schemas/scripts/merge-openapi-specs.ts b/packages/typescript/ai-schemas/scripts/merge-openapi-specs.ts new file mode 100644 index 000000000..4e752b8bf --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/merge-openapi-specs.ts @@ -0,0 +1,478 @@ +/** + * Shared helpers for transforming and merging OpenAPI specs across providers. + * + * Ported from fal-ai/fal-js PR #212 and generalised: + * - FAL-specific transforms (file-input marking, KNOWN_MISSING_SCHEMAS + * placeholders) are now opt-in per provider via TransformOptions. + * - mergeOpenAPISpecs handles the N:1 case (one spec per model, merge by + * hash with conflict renames) but also passes a single spec straight + * through, which is the common case for providers with one OpenAPI doc. + */ + +import { createHash } from 'node:crypto' + +/** + * Known schema names that providers reference via $ref but don't define in + * components.schemas. We inject placeholders before @hey-api/openapi-ts parses + * the spec (it fails on missing $refs). Keys are provider:schemaName. + */ +const KNOWN_MISSING_SCHEMAS: Record = { + 'fal:TrackPoint': { + type: 'object', + description: 'A coordinate point with x and y values for motion tracking', + properties: { + x: { type: 'number', description: 'X coordinate' }, + y: { type: 'number', description: 'Y coordinate' }, + }, + required: ['x', 'y'], + }, +} + +const FAL_FILE_FIELD_PATTERNS = [ + /_url$/, + /_urls$/, + /^image$/, + /^images$/, + /^video$/, + /^audio$/, + /^file$/, +] + +function isFalFileField(propertyName: string): boolean { + return FAL_FILE_FIELD_PATTERNS.some((pattern) => pattern.test(propertyName)) +} + +function transformToFalFileSchema( + schema: Record, +): Record { + return { ...schema, 'x-fal-file-input': true } +} + +/** + * Coerce default values to match their declared schema type. Some specs + * declare a property as `type: "string"` but provide a numeric default; that + * makes Zod codegen emit `.default(129)` on `z.string()` which fails tsc. + * + * Also strips `default: null` on non-nullable properties — heyapi's Zod + * plugin faithfully emits `.optional().default(null)`, which Zod 4's type + * definitions reject. `default: null` on an optional field carries no extra + * semantics (both mean "if omitted, the value is absent"), so dropping it + * is safe and lets the generator emit clean Zod. + */ +function coerceDefaults(spec: object): void { + const schemas = (spec as { components?: { schemas?: Record } }) + .components?.schemas + if (!schemas) return + for (const schema of Object.values(schemas)) { + coerceOrDropDefault(schema as Record) + coerceDefaultsRecursively(schema) + } +} + +/** + * Coerce a `default` to match the property's declared type when possible, or + * drop it when the mismatch can't be safely repaired. The heyapi Zod plugin + * emits the `default` verbatim, so any mismatch surfaces as a tsc overload + * error in the generated `zod.gen.ts`. + */ +function coerceOrDropDefault(value: Record): void { + if (!('default' in value)) return + + const def = value.default + const declaredType = value.type + const enumValues = Array.isArray(value.enum) + ? (value.enum as Array) + : null + + // Drop `default: null` when the field isn't nullable. `null` on an optional + // field carries no extra semantics over absence. + const isNullable = + value.nullable === true || + (Array.isArray(declaredType) && + (declaredType as Array).includes('null')) + if (def === null && !isNullable) { + delete value.default + return + } + + // Defaults stated against enums must be one of the enum members. + if (enumValues && !enumValues.includes(def)) { + delete value.default + return + } + + // Primitive coercions — straightforward repairs. + if (declaredType === 'string' && typeof def !== 'string') { + value.default = String(def) + return + } + if (declaredType === 'integer' && typeof def === 'string') { + const parsed = parseInt(def, 10) + if (!isNaN(parsed)) { + value.default = parsed + return + } + delete value.default + return + } + if (declaredType === 'number' && typeof def === 'string') { + const parsed = parseFloat(def) + if (!isNaN(parsed)) { + value.default = parsed + return + } + delete value.default + return + } + if (declaredType === 'boolean' && typeof def === 'string') { + value.default = def === 'true' + return + } + + // Container-type defaults: drop unless the literal shape matches. We don't + // try to repair these — a malformed default on an array/object is almost + // always a spec bug rather than a stale string we can rewrite. + if (declaredType === 'array' && !Array.isArray(def)) { + delete value.default + return + } + if ( + declaredType === 'object' && + (typeof def !== 'object' || def === null || Array.isArray(def)) + ) { + delete value.default + return + } +} + +function coerceDefaultsRecursively(obj: object): void { + if (typeof obj !== 'object' || obj === null) return + const schema = obj as Record + + if (schema.properties && typeof schema.properties === 'object') { + const properties = schema.properties as Record< + string, + Record + > + for (const value of Object.values(properties)) { + coerceOrDropDefault(value) + coerceDefaultsRecursively(value) + } + } + + for (const key of ['allOf', 'anyOf', 'oneOf']) { + const arr = schema[key] + if (Array.isArray(arr)) { + arr.forEach((item) => { + if (item && typeof item === 'object') { + coerceDefaultsRecursively(item as object) + } + }) + } + } + + if (schema.items && typeof schema.items === 'object') { + coerceDefaultsRecursively(schema.items) + } +} + +function transformFalFileFields(spec: object): void { + const schemas = (spec as { components?: { schemas?: Record } }) + .components?.schemas + if (!schemas) return + for (const [schemaName, schema] of Object.entries(schemas)) { + if (!schemaName.endsWith('Input')) continue + transformPropertiesRecursively(schema) + } +} + +function transformPropertiesRecursively(obj: object): void { + if (typeof obj !== 'object') return + const schema = obj as Record + + if (schema.properties && typeof schema.properties === 'object') { + const properties = schema.properties as Record< + string, + Record + > + for (const [key, value] of Object.entries(properties)) { + if (isFalFileField(key) && value.type === 'string' && !value.enum) { + properties[key] = transformToFalFileSchema(value) + } else if ( + isFalFileField(key) && + value.type === 'array' && + value.items && + typeof value.items === 'object' + ) { + const items = value.items as Record + if (items.type === 'string' && !items.enum) { + items['x-fal-file-input'] = true + } + } + transformPropertiesRecursively(value) + } + } + + for (const key of ['allOf', 'anyOf', 'oneOf']) { + const arr = schema[key] + if (Array.isArray(arr)) { + arr.forEach((item) => { + if (item && typeof item === 'object') { + transformPropertiesRecursively(item as object) + } + }) + } + } + + if (schema.items && typeof schema.items === 'object') { + transformPropertiesRecursively(schema.items) + } + + if ( + schema.additionalProperties && + typeof schema.additionalProperties === 'object' + ) { + transformPropertiesRecursively(schema.additionalProperties) + } +} + +function findAllRefs(obj: unknown, refs: Set = new Set()): Set { + if (!obj || typeof obj !== 'object') return refs + if (Array.isArray(obj)) { + obj.forEach((item) => findAllRefs(item, refs)) + } else { + for (const [key, value] of Object.entries(obj as Record)) { + if (key === '$ref' && typeof value === 'string') { + const match = value.match(/#\/components\/schemas\/(.+)/) + if (match?.[1]) refs.add(match[1]) + } + if (typeof value === 'object') { + findAllRefs(value, refs) + } + } + } + return refs +} + +function resolveMissingRefs( + spec: object, + providerId: string, +): { fixed: number; unknown: Array } { + const typedSpec = spec as { + components?: { schemas?: Record } + } + if (!typedSpec.components?.schemas) return { fixed: 0, unknown: [] } + + const allRefs = findAllRefs(spec) + const existingSchemas = new Set(Object.keys(typedSpec.components.schemas)) + const missingRefs = [...allRefs].filter((ref) => !existingSchemas.has(ref)) + + let fixed = 0 + const unknown: Array = [] + + for (const missingRef of missingRefs) { + typedSpec.components.schemas ??= {} + const knownKey = `${providerId}:${missingRef}` + if (KNOWN_MISSING_SCHEMAS[knownKey]) { + typedSpec.components.schemas[missingRef] = KNOWN_MISSING_SCHEMAS[knownKey] + fixed++ + } else { + typedSpec.components.schemas[missingRef] = { + type: 'object', + description: `Schema referenced but not defined upstream (missing from source OpenAPI spec)`, + additionalProperties: true, + } + unknown.push(missingRef) + } + } + + return { fixed, unknown } +} + +function hashSchema(schema: object): string { + const json = JSON.stringify( + schema, + Object.keys(schema as Record).sort(), + ) + return createHash('sha256').update(json).digest('hex').slice(0, 16) +} + +function generateUniqueSchemaName(baseName: string, index: number): string { + return `${baseName}Type${index}` +} + +function rewriteRefs(obj: unknown, mapping: Map): void { + if (!obj || typeof obj !== 'object') return + if (Array.isArray(obj)) { + obj.forEach((item) => rewriteRefs(item, mapping)) + return + } + for (const [key, value] of Object.entries(obj as Record)) { + if (key === '$ref' && typeof value === 'string') { + const match = value.match(/^#\/components\/schemas\/(.+)$/) + const matched = match?.[1] + if (matched !== undefined && mapping.has(matched)) { + ;(obj as Record)[key] = + `#/components/schemas/${mapping.get(matched)}` + } + } else if (typeof value === 'object') { + rewriteRefs(value, mapping) + } + } +} + +export interface MergedSpec { + openapi: string + info: { title: string; version: string } + components: { + schemas: Record + securitySchemes: object + } + paths: Record + servers: Array + security: Array +} + +export interface TransformOptions { + /** Provider id (drives KNOWN_MISSING_SCHEMAS lookup). */ + providerId: string + /** Mark FAL-style file/url fields with `x-fal-file-input`. FAL only. */ + markFalFileFields?: boolean + /** Inject placeholders for missing $refs. */ + resolveMissingRefs?: boolean + /** Coerce mismatched defaults (e.g. numeric default on a string field). */ + coerceDefaults?: boolean +} + +/** Apply provider-specific pre-processing transforms to one OpenAPI spec. */ +export function applyTransforms(spec: object, opts: TransformOptions): void { + if (opts.resolveMissingRefs ?? true) { + resolveMissingRefs(spec, opts.providerId) + } + if (opts.markFalFileFields) { + transformFalFileFields(spec) + } + if (opts.coerceDefaults ?? true) { + coerceDefaults(spec) + } +} + +/** + * Merge multiple OpenAPI specs into one. Identical schemas across specs are + * deduplicated by content hash; conflicting schemas (same name, different + * shape) get suffixed `Type2`, `Type3`, … with $refs rewritten consistently. + * + * The single-spec case is the trivial pass-through. + */ +export function mergeOpenAPISpecs( + specs: Array, + title: string, + endpointIdAccessor?: (spec: object) => string, +): MergedSpec { + type TypedSpec = { + components?: { schemas?: Record; securitySchemes?: object } + paths?: Record + servers?: Array + security?: Array + } + + const merged: MergedSpec = { + openapi: '3.0.4', + info: { title, version: '1.0.0' }, + components: { schemas: {}, securitySchemes: {} }, + paths: {}, + servers: [], + security: [], + } + + const getEndpointId = endpointIdAccessor ?? (() => 'unknown') + + const registry = new Map< + string, + Map< + string, + { schema: object; endpointIds: Array; finalName: string } + > + >() + + for (const spec of specs as Array) { + const endpointId = getEndpointId(spec) + for (const [name, schema] of Object.entries( + spec.components?.schemas || {}, + )) { + const hash = hashSchema(schema) + if (!registry.has(name)) registry.set(name, new Map()) + const hashMap = registry.get(name)! + if (!hashMap.has(hash)) { + hashMap.set(hash, { schema, endpointIds: [], finalName: name }) + } + hashMap.get(hash)!.endpointIds.push(endpointId) + } + } + + for (const [baseName, hashMap] of registry) { + const variants = [...hashMap.values()].sort( + (a, b) => b.endpointIds.length - a.endpointIds.length, + ) + variants[0]!.finalName = baseName + for (let i = 1; i < variants.length; i++) { + variants[i]!.finalName = generateUniqueSchemaName(baseName, i + 1) + } + } + + const refMappings = new Map>() + for (const [baseName, hashMap] of registry) { + for (const variant of hashMap.values()) { + for (const endpointId of variant.endpointIds) { + if (!refMappings.has(endpointId)) refMappings.set(endpointId, new Map()) + if (variant.finalName !== baseName) { + refMappings.get(endpointId)!.set(baseName, variant.finalName) + } + } + } + } + + for (const hashMap of registry.values()) { + for (const variant of hashMap.values()) { + const clonedSchema = structuredClone(variant.schema) + const firstEndpoint = variant.endpointIds[0]! + const mapping = refMappings.get(firstEndpoint) + if (mapping?.size) { + rewriteRefs(clonedSchema, mapping) + } + merged.components.schemas[variant.finalName] = clonedSchema + } + } + + for (const spec of specs as Array) { + const endpointId = getEndpointId(spec) + const mapping = refMappings.get(endpointId) + for (const [pathKey, pathItem] of Object.entries(spec.paths || {})) { + const cloned = structuredClone(pathItem) + if (mapping?.size) { + rewriteRefs(cloned, mapping) + } + merged.paths[pathKey] = cloned + } + } + + const first = specs[0] as TypedSpec | undefined + if (first?.components?.securitySchemes) { + merged.components.securitySchemes = structuredClone( + first.components.securitySchemes, + ) + } + if (first?.servers) merged.servers = structuredClone(first.servers) + if (first?.security) merged.security = structuredClone(first.security) + + merged.paths = Object.fromEntries( + Object.entries(merged.paths).sort(([a], [b]) => a.localeCompare(b)), + ) + merged.components.schemas = Object.fromEntries( + Object.entries(merged.components.schemas).sort(([a], [b]) => + a.localeCompare(b), + ), + ) + + return merged +} diff --git a/packages/typescript/ai-schemas/scripts/providers.ts b/packages/typescript/ai-schemas/scripts/providers.ts new file mode 100644 index 000000000..752516fe7 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/providers.ts @@ -0,0 +1,47 @@ +/** + * Provider registry — declares how each upstream source is fetched, where the + * raw spec is cached on disk, and how the merge step should categorise/clean + * the spec before handing it to @hey-api/openapi-ts. + * + * Add a new provider by adding an entry here. The fetcher decides whether the + * provider produces one spec or many (FAL's per-model split is the only N:1 + * case today); the rest of the pipeline is provider-agnostic. + */ + +import type { MergedSpec } from './merge-openapi-specs.js' + +export interface ProviderCategorySpec { + /** Provider id, used as the subpath segment in @tanstack/ai-schemas/schemas/{providerId}. */ + providerId: string + /** Optional category split (e.g. "video" for FAL). Empty for single-category providers. */ + category: string + /** Merged OpenAPI spec ready for @hey-api/openapi-ts. */ + mergedSpec: MergedSpec + /** + * How to derive the output schema for each endpoint: + * - "post-200": read from POST .responses["200"].content (most providers). + * - "sibling-get": read from the sibling GET `${path}/requests/{request_id}` + * because the POST returns a queue ack (FAL). + */ + outputStrategy?: 'post-200' | 'sibling-get' +} + +export interface ProviderConfig { + /** Unique provider id (e.g. "openai", "fal-image"). Lowercase, kebab-case. */ + id: string + /** Human-readable namespace used in the barrel exports (PascalCase). */ + namespace: string + /** Fetcher — writes raw spec JSON files under scripts/specs/{id}/. */ + fetch: (opts: FetchOptions) => Promise + /** Loader — reads cached spec files and returns merged spec(s) ready for codegen. */ + load: () => Array + /** Whether this provider requires an API key (skipped when key is absent). */ + requiresAuth: boolean + /** Env var name holding the API key (when requiresAuth is true). */ + authEnvVar?: string +} + +export interface FetchOptions { + /** Root directory for cached specs — scripts/specs/{provider}/. */ + outDir: string +} diff --git a/packages/typescript/ai-schemas/scripts/providers/anthropic.ts b/packages/typescript/ai-schemas/scripts/providers/anthropic.ts new file mode 100644 index 000000000..86dc9d687 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/providers/anthropic.ts @@ -0,0 +1,92 @@ +/** + * Anthropic provider — pulls the official OpenAPI spec published by + * Anthropic's Stainless-generated SDKs. The `.stats.yml` file in + * anthropic-sdk-typescript declares the current `openapi_spec_url`, which + * points at a hash-stamped YAML in Google Cloud Storage that updates whenever + * Anthropic ships a new API revision. + */ + +import { mkdirSync, readFileSync, writeFileSync } from 'node:fs' +import { join } from 'node:path' + +import { + applyTransforms, + mergeOpenAPISpecs, + type MergedSpec, +} from '../merge-openapi-specs.js' +import type { + FetchOptions, + ProviderCategorySpec, + ProviderConfig, +} from '../providers.js' + +const ANTHROPIC_STATS_URL = + 'https://raw.githubusercontent.com/anthropics/anthropic-sdk-typescript/main/.stats.yml' + +async function resolveSpecUrl(): Promise { + const response = await fetch(ANTHROPIC_STATS_URL) + if (!response.ok) { + throw new Error( + `Anthropic .stats.yml fetch failed: ${response.status} ${response.statusText}`, + ) + } + const text = await response.text() + // .stats.yml is plain YAML key-value; we only need one field, so avoid + // pulling in a YAML parser for the common case. + const match = text.match(/^openapi_spec_url:\s*(.+)$/m) + if (!match) { + throw new Error( + "Anthropic .stats.yml: couldn't find openapi_spec_url field", + ) + } + return match[1]!.trim() +} + +async function fetchAnthropic({ outDir }: FetchOptions): Promise { + mkdirSync(outDir, { recursive: true }) + + const specUrl = await resolveSpecUrl() + console.log(`Fetching Anthropic OpenAPI from ${specUrl}...`) + const response = await fetch(specUrl) + if (!response.ok) { + throw new Error( + `Anthropic OpenAPI fetch failed: ${response.status} ${response.statusText}`, + ) + } + const yamlText = await response.text() + const { parse } = await import('yaml') + const spec = parse(yamlText) as object + writeFileSync( + join(outDir, 'anthropic.openapi.json'), + JSON.stringify(spec, null, 2), + ) + console.log(' Wrote anthropic.openapi.json') +} + +function loadAnthropic(): Array { + const specDir = new URL('../specs/anthropic/', import.meta.url).pathname + let raw: string + try { + raw = readFileSync(join(specDir, 'anthropic.openapi.json'), 'utf8') + } catch { + return [] + } + const spec = JSON.parse(raw) as object + applyTransforms(spec, { providerId: 'anthropic' }) + const mergedSpec: MergedSpec = mergeOpenAPISpecs([spec], 'Anthropic API') + return [ + { + providerId: 'anthropic', + category: '', + mergedSpec, + }, + ] +} + +export const anthropicProvider: ProviderConfig = { + id: 'anthropic', + namespace: 'Anthropic', + fetch: fetchAnthropic, + load: loadAnthropic, + requiresAuth: false, +} diff --git a/packages/typescript/ai-schemas/scripts/providers/elevenlabs.ts b/packages/typescript/ai-schemas/scripts/providers/elevenlabs.ts new file mode 100644 index 000000000..dafa481b9 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/providers/elevenlabs.ts @@ -0,0 +1,67 @@ +/** + * ElevenLabs provider — pulls the public OpenAPI spec served at + * api.elevenlabs.io/openapi.json. No auth required for the spec itself. + */ + +import { mkdirSync, readFileSync, writeFileSync } from 'node:fs' +import { join } from 'node:path' + +import { + applyTransforms, + mergeOpenAPISpecs, + type MergedSpec, +} from '../merge-openapi-specs.js' +import type { + FetchOptions, + ProviderCategorySpec, + ProviderConfig, +} from '../providers.js' + +const ELEVENLABS_OPENAPI_URL = 'https://api.elevenlabs.io/openapi.json' + +async function fetchElevenLabs({ outDir }: FetchOptions): Promise { + mkdirSync(outDir, { recursive: true }) + + console.log(`Fetching ElevenLabs OpenAPI from ${ELEVENLABS_OPENAPI_URL}...`) + const response = await fetch(ELEVENLABS_OPENAPI_URL) + if (!response.ok) { + throw new Error( + `ElevenLabs fetch failed: ${response.status} ${response.statusText}`, + ) + } + const spec = (await response.json()) as object + + writeFileSync( + join(outDir, 'elevenlabs.openapi.json'), + JSON.stringify(spec, null, 2), + ) + console.log(' Wrote elevenlabs.openapi.json') +} + +function loadElevenLabs(): Array { + const specDir = new URL('../specs/elevenlabs/', import.meta.url).pathname + let raw: string + try { + raw = readFileSync(join(specDir, 'elevenlabs.openapi.json'), 'utf8') + } catch { + return [] + } + const spec = JSON.parse(raw) as object + applyTransforms(spec, { providerId: 'elevenlabs' }) + const mergedSpec: MergedSpec = mergeOpenAPISpecs([spec], 'ElevenLabs API') + return [ + { + providerId: 'elevenlabs', + category: '', + mergedSpec, + }, + ] +} + +export const elevenlabsProvider: ProviderConfig = { + id: 'elevenlabs', + namespace: 'ElevenLabs', + fetch: fetchElevenLabs, + load: loadElevenLabs, + requiresAuth: false, +} diff --git a/packages/typescript/ai-schemas/scripts/providers/fal.ts b/packages/typescript/ai-schemas/scripts/providers/fal.ts new file mode 100644 index 000000000..b21b37f93 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/providers/fal.ts @@ -0,0 +1,216 @@ +/** + * FAL provider — fetches one OpenAPI spec per model from the FAL models API + * and splits them by category (image, video, audio, …). Ported from + * fal-ai/fal-js PR #212 (scripts/fetch-openapi-models.ts). + */ + +import { mkdirSync, readFileSync, readdirSync, writeFileSync } from 'node:fs' +import { join } from 'node:path' + +import { + applyTransforms, + mergeOpenAPISpecs, + type MergedSpec, +} from '../merge-openapi-specs.js' +import type { + FetchOptions, + ProviderCategorySpec, + ProviderConfig, +} from '../providers.js' + +interface FalApiModel { + endpoint_id: string + openapi: Record + metadata: { + display_name?: string + category: string + description?: string + status?: 'active' | 'inactive' | 'deprecated' + tags?: Array + updated_at?: string + [key: string]: unknown + } +} + +interface FalApiResponse { + models: Array + has_more: boolean + next_cursor: string | null +} + +function sleep(ms: number): Promise { + return new Promise((resolve) => setTimeout(resolve, ms)) +} + +async function fetchPageWithRetry( + url: string, + apiKey: string, + retries = 3, +): Promise { + for (let attempt = 1; attempt <= retries; attempt++) { + try { + const response = await fetch(url, { + headers: { Authorization: `Key ${apiKey}` }, + }) + + if (response.status === 429) { + const waitTime = Math.min(2000 * Math.pow(2, attempt), 10000) + console.log(` Rate limited. Waiting ${waitTime}ms before retry...`) + await sleep(waitTime) + continue + } + + if (!response.ok) { + throw new Error( + `Failed to fetch FAL models: ${response.status} ${response.statusText}`, + ) + } + + return (await response.json()) as FalApiResponse + } catch (error) { + if (attempt === retries) throw error + console.log(` Attempt ${attempt} failed, retrying...`) + await sleep(1000 * attempt) + } + } + + throw new Error('Max retries exceeded') +} + +async function fetchFalModels(apiKey: string): Promise> { + const allModels: Array = [] + let cursor: string | null = null + let pageNumber = 1 + + do { + const params = new URLSearchParams({ + status: 'active', + 'expand[]': 'openapi-3.0', + }) + if (cursor) params.set('cursor', cursor) + + const url = `https://api.fal.ai/v1/models?${params.toString()}` + console.log(` Fetching FAL page ${pageNumber}...`) + const data = await fetchPageWithRetry(url, apiKey) + allModels.push(...data.models) + console.log( + ` Retrieved ${data.models.length} models (total: ${allModels.length})`, + ) + + cursor = data.has_more ? data.next_cursor : null + pageNumber++ + } while (cursor) + + return allModels +} + +function sanitizeCategoryName(category: string): string { + return category.replace(/[^a-zA-Z0-9_-]/g, '-') +} + +function groupByCategory( + models: Array, +): Map> { + const map = new Map>() + for (const model of models) { + const category = sanitizeCategoryName( + model.metadata.category || 'uncategorized', + ) + if (!map.has(category)) map.set(category, []) + map.get(category)!.push(model) + } + return map +} + +async function fetchFal({ outDir }: FetchOptions): Promise { + const apiKey = process.env.FAL_KEY + if (!apiKey) { + console.log(' FAL_KEY not set — skipping FAL fetch.') + return + } + mkdirSync(outDir, { recursive: true }) + + console.log('Fetching FAL model OpenAPI specs...') + const models = await fetchFalModels(apiKey) + const grouped = groupByCategory(models) + console.log(`Found ${grouped.size} categories`) + + for (const [category, categoryModels] of grouped.entries()) { + const filename = `fal.models.${category}.json` + const payload = { + generated_at: new Date().toISOString(), + total_models: categoryModels.length, + category, + models: categoryModels, + } + writeFileSync(join(outDir, filename), JSON.stringify(payload, null, 2)) + console.log(` Wrote ${filename} (${categoryModels.length} models)`) + } +} + +function loadFal(): Array { + // Mirrors fetch's outDir resolution at sync time (kept inline to avoid + // threading the dir through every load() call site). + const specDir = new URL('../specs/fal/', import.meta.url).pathname + let filenames: Array + try { + filenames = readdirSync(specDir).filter((f) => f.endsWith('.json')) + } catch { + return [] + } + // Group `fal.models.-to-.json` into one category named after + // the target modality (``), so `image-to-video` and `text-to-video` + // both land in the `video` category. + const grouped = filenames.reduce>>((acc, f) => { + const category = f.replace( + /fal\.models\.([^-.]+-to-([^.]+)|([^-.]+))\.json/, + '$2$3', + ) + if (!acc[category]) acc[category] = [] + acc[category]!.push(f) + return acc + }, {}) + + return Object.entries(grouped).map(([category, files]) => { + const specs = files.flatMap((filename) => { + const fileContents = readFileSync(join(specDir, filename), 'utf8') + const json = JSON.parse(fileContents) as { models: Array } + return json.models.map((model) => { + const spec = model.openapi as Record + // Stash endpointId on `info.x-fal-metadata` so the merge step can use + // it when remapping conflicting schema names per endpoint. + const info = (spec.info ??= {}) as Record + const meta = (info['x-fal-metadata'] ??= {}) as Record + meta.endpointId = model.endpoint_id + applyTransforms(spec, { + providerId: 'fal', + markFalFileFields: true, + }) + return spec + }) + }) + const mergedSpec: MergedSpec = mergeOpenAPISpecs( + specs, + `FAL.ai ${category} API`, + (spec) => { + const info = (spec as { info?: { 'x-fal-metadata'?: { endpointId?: string } } }).info + return info?.['x-fal-metadata']?.endpointId ?? 'unknown' + }, + ) + return { + providerId: `fal-${category}`, + category, + mergedSpec, + outputStrategy: 'sibling-get' as const, + } + }) +} + +export const falProvider: ProviderConfig = { + id: 'fal', + namespace: 'Fal', + fetch: fetchFal, + load: loadFal, + requiresAuth: true, + authEnvVar: 'FAL_KEY', +} diff --git a/packages/typescript/ai-schemas/scripts/providers/gemini.ts b/packages/typescript/ai-schemas/scripts/providers/gemini.ts new file mode 100644 index 000000000..ef9da4cef --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/providers/gemini.ts @@ -0,0 +1,302 @@ +/** + * Gemini provider — pulls Google's Generative Language API Discovery doc, + * converts it to OpenAPI 3.0, and feeds the result through the standard + * pipeline. Public, no auth required for the spec. + * + * The Discovery → OpenAPI converter is intentionally minimal and lives in + * this file: it covers the subset of Discovery features Google's gen-AI API + * actually uses (REST methods, request/response refs, primitive schemas, + * enums, parameter shapes). It is not a general-purpose converter. + */ + +import { mkdirSync, readFileSync, writeFileSync } from 'node:fs' +import { join } from 'node:path' + +import { + applyTransforms, + mergeOpenAPISpecs, + type MergedSpec, +} from '../merge-openapi-specs.js' +import type { + FetchOptions, + ProviderCategorySpec, + ProviderConfig, +} from '../providers.js' + +const GEMINI_DISCOVERY_URL = + 'https://generativelanguage.googleapis.com/$discovery/rest?version=v1beta' + +interface DiscoveryDoc { + rootUrl?: string + servicePath?: string + baseUrl?: string + schemas?: Record + resources?: Record + parameters?: Record + title?: string + version?: string +} + +interface DiscoverySchema { + id?: string + type?: string + format?: string + description?: string + properties?: Record + items?: DiscoverySchema + $ref?: string + enum?: Array + enumDescriptions?: Array + required?: Array + additionalProperties?: DiscoverySchema | boolean +} + +interface DiscoveryParameter { + type?: string + description?: string + location?: 'query' | 'path' | 'header' + required?: boolean + enum?: Array +} + +interface DiscoveryMethod { + id: string + path?: string + flatPath?: string + httpMethod?: string + description?: string + parameters?: Record + request?: { $ref?: string } + response?: { $ref?: string } + scopes?: Array +} + +interface DiscoveryResource { + methods?: Record + resources?: Record +} + +interface OpenApiSchema { + type?: string + format?: string + description?: string + properties?: Record + items?: OpenApiSchema + $ref?: string + enum?: Array + required?: Array + additionalProperties?: OpenApiSchema | boolean +} + +interface OpenApiParameter { + name: string + in: 'query' | 'path' | 'header' + required?: boolean + schema: OpenApiSchema + description?: string +} + +interface OpenApiOperation { + operationId: string + description?: string + parameters?: Array + requestBody?: { + required?: boolean + content: Record + } + responses: Record< + string, + { + description: string + content?: Record + } + > +} + +interface OpenApiSpec { + openapi: string + info: { title: string; version: string } + servers: Array<{ url: string }> + paths: Record> + components: { schemas: Record } +} + +function convertSchema(schema: DiscoverySchema): OpenApiSchema { + if (schema.$ref) { + return { $ref: `#/components/schemas/${schema.$ref}` } + } + const out: OpenApiSchema = {} + if (schema.type) out.type = schema.type + if (schema.format) out.format = schema.format + if (schema.description) out.description = schema.description + if (schema.enum) out.enum = schema.enum + if (schema.required) out.required = schema.required + if (schema.items) out.items = convertSchema(schema.items) + if (schema.properties) { + out.properties = Object.fromEntries( + Object.entries(schema.properties).map(([name, value]) => [ + name, + convertSchema(value), + ]), + ) + } + if (schema.additionalProperties !== undefined) { + out.additionalProperties = + typeof schema.additionalProperties === 'boolean' + ? schema.additionalProperties + : convertSchema(schema.additionalProperties) + } + return out +} + +function convertParameter( + name: string, + param: DiscoveryParameter, +): OpenApiParameter { + const location = param.location ?? 'query' + return { + name, + in: location, + required: param.required ?? location === 'path', + schema: { + type: param.type, + enum: param.enum, + }, + description: param.description, + } +} + +function collectMethods( + resources: Record | undefined, + acc: Array, +): void { + if (!resources) return + for (const resource of Object.values(resources)) { + if (resource.methods) { + for (const method of Object.values(resource.methods)) { + acc.push(method) + } + } + collectMethods(resource.resources, acc) + } +} + +function discoveryToOpenAPI(doc: DiscoveryDoc): OpenApiSpec { + const components = { + schemas: Object.fromEntries( + Object.entries(doc.schemas ?? {}).map(([name, schema]) => [ + name, + convertSchema(schema), + ]), + ), + } + + const paths: OpenApiSpec['paths'] = {} + const methods: Array = [] + collectMethods(doc.resources, methods) + + for (const method of methods) { + const path = `/${(method.flatPath ?? method.path ?? '').replace(/^\/+/, '')}` + const httpMethod = (method.httpMethod ?? 'GET').toLowerCase() + if (!paths[path]) paths[path] = {} + + const operation: OpenApiOperation = { + operationId: method.id, + description: method.description, + parameters: Object.entries(method.parameters ?? {}).map(([n, p]) => + convertParameter(n, p), + ), + responses: { + '200': { + description: 'Success', + content: method.response?.$ref + ? { + 'application/json': { + schema: { + $ref: `#/components/schemas/${method.response.$ref}`, + }, + }, + } + : undefined, + }, + }, + } + if (method.request?.$ref) { + operation.requestBody = { + required: true, + content: { + 'application/json': { + schema: { $ref: `#/components/schemas/${method.request.$ref}` }, + }, + }, + } + } + + paths[path][httpMethod] = operation + } + + const serverUrl = + doc.baseUrl ?? + (doc.rootUrl && doc.servicePath + ? `${doc.rootUrl.replace(/\/$/, '')}/${doc.servicePath.replace(/^\//, '')}` + : 'https://generativelanguage.googleapis.com/') + + return { + openapi: '3.0.4', + info: { title: doc.title ?? 'Google Generative Language API', version: doc.version ?? 'v1beta' }, + servers: [{ url: serverUrl.replace(/\/$/, '') }], + paths, + components, + } +} + +async function fetchGemini({ outDir }: FetchOptions): Promise { + mkdirSync(outDir, { recursive: true }) + + console.log(`Fetching Gemini Discovery doc from ${GEMINI_DISCOVERY_URL}...`) + const response = await fetch(GEMINI_DISCOVERY_URL) + if (!response.ok) { + throw new Error( + `Gemini fetch failed: ${response.status} ${response.statusText}`, + ) + } + const discovery = (await response.json()) as DiscoveryDoc + writeFileSync( + join(outDir, 'gemini.discovery.json'), + JSON.stringify(discovery, null, 2), + ) + const openapi = discoveryToOpenAPI(discovery) + writeFileSync( + join(outDir, 'gemini.openapi.json'), + JSON.stringify(openapi, null, 2), + ) + console.log(' Wrote gemini.discovery.json and gemini.openapi.json') +} + +function loadGemini(): Array { + const specDir = new URL('../specs/gemini/', import.meta.url).pathname + let raw: string + try { + raw = readFileSync(join(specDir, 'gemini.openapi.json'), 'utf8') + } catch { + return [] + } + const spec = JSON.parse(raw) as object + applyTransforms(spec, { providerId: 'gemini' }) + const mergedSpec: MergedSpec = mergeOpenAPISpecs([spec], 'Google Gemini API') + return [ + { + providerId: 'gemini', + category: '', + mergedSpec, + }, + ] +} + +export const geminiProvider: ProviderConfig = { + id: 'gemini', + namespace: 'Gemini', + fetch: fetchGemini, + load: loadGemini, + requiresAuth: false, +} diff --git a/packages/typescript/ai-schemas/scripts/providers/index.ts b/packages/typescript/ai-schemas/scripts/providers/index.ts new file mode 100644 index 000000000..45c05e787 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/providers/index.ts @@ -0,0 +1,14 @@ +import { anthropicProvider } from './anthropic.js' +import { elevenlabsProvider } from './elevenlabs.js' +import { falProvider } from './fal.js' +import { geminiProvider } from './gemini.js' +import { openaiProvider } from './openai.js' +import type { ProviderConfig } from '../providers.js' + +export const ALL_PROVIDERS: ReadonlyArray = [ + openaiProvider, + anthropicProvider, + geminiProvider, + elevenlabsProvider, + falProvider, +] diff --git a/packages/typescript/ai-schemas/scripts/providers/openai.ts b/packages/typescript/ai-schemas/scripts/providers/openai.ts new file mode 100644 index 000000000..187eaf149 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/providers/openai.ts @@ -0,0 +1,74 @@ +/** + * OpenAI provider — pulls the canonical OpenAPI spec from + * github.com/openai/openai-openapi (raw YAML), parses it to JSON, and feeds + * it through the shared merge/transform pipeline. Public, no auth. + */ + +import { mkdirSync, readFileSync, writeFileSync } from 'node:fs' +import { join } from 'node:path' + +import { + applyTransforms, + mergeOpenAPISpecs, + type MergedSpec, +} from '../merge-openapi-specs.js' +import type { + FetchOptions, + ProviderCategorySpec, + ProviderConfig, +} from '../providers.js' + +const OPENAI_OPENAPI_URL = + 'https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml' + +async function fetchOpenAI({ outDir }: FetchOptions): Promise { + mkdirSync(outDir, { recursive: true }) + + console.log(`Fetching OpenAI OpenAPI from ${OPENAI_OPENAPI_URL}...`) + const response = await fetch(OPENAI_OPENAPI_URL) + if (!response.ok) { + throw new Error( + `OpenAI fetch failed: ${response.status} ${response.statusText}`, + ) + } + const yamlText = await response.text() + + // Inline-import YAML parser so providers that don't use it don't pay the + // cost during pnpm install (yaml is a tiny dep but kept opt-in regardless). + const { parse } = await import('yaml') + const spec = parse(yamlText) as object + + writeFileSync( + join(outDir, 'openai.openapi.json'), + JSON.stringify(spec, null, 2), + ) + console.log(' Wrote openai.openapi.json') +} + +function loadOpenAI(): Array { + const specDir = new URL('../specs/openai/', import.meta.url).pathname + let raw: string + try { + raw = readFileSync(join(specDir, 'openai.openapi.json'), 'utf8') + } catch { + return [] + } + const spec = JSON.parse(raw) as object + applyTransforms(spec, { providerId: 'openai' }) + const mergedSpec: MergedSpec = mergeOpenAPISpecs([spec], 'OpenAI API') + return [ + { + providerId: 'openai', + category: '', + mergedSpec, + }, + ] +} + +export const openaiProvider: ProviderConfig = { + id: 'openai', + namespace: 'OpenAi', + fetch: fetchOpenAI, + load: loadOpenAI, + requiresAuth: false, +} diff --git a/packages/typescript/ai-schemas/scripts/specs/anthropic/anthropic.openapi.json b/packages/typescript/ai-schemas/scripts/specs/anthropic/anthropic.openapi.json new file mode 100644 index 000000000..a955e634e --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/specs/anthropic/anthropic.openapi.json @@ -0,0 +1,50734 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Anthropic API" + }, + "paths": { + "/v1/messages": { + "post": { + "summary": "Create a Message", + "description": "Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.\n\nThe Messages API can be used for either single queries or stateless multi-turn conversations.\n\nLearn more about the Messages API in our [user guide](https://docs.claude.com/en/docs/initial-setup)", + "operationId": "messages_post", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "responses": { + "200": { + "description": "Message object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Message" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMessageParams" + } + } + }, + "required": true + } + } + }, + "/v1/complete": { + "post": { + "summary": "Create a Text Completion", + "description": "[Legacy] Create a Text Completion.\n\nThe Text Completions API is a legacy API. We recommend using the [Messages API](https://docs.claude.com/en/api/messages) going forward.\n\nFuture models and features will not be compatible with Text Completions. See our [migration guide](https://docs.claude.com/en/api/migrating-from-text-completions-to-messages) for guidance in migrating from Text Completions to Messages.", + "operationId": "complete_post", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + } + ], + "responses": { + "200": { + "description": "Text Completion object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompletionResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompletionRequest" + } + } + }, + "required": true + } + } + }, + "/v1/models": { + "get": { + "summary": "List Models", + "description": "List available models.\n\nThe Models API response can be used to determine which models are available for use in the API. More recently released models are listed first.", + "operationId": "models_list", + "parameters": [ + { + "name": "before_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.", + "title": "Before Id" + }, + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object." + }, + { + "name": "after_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.", + "title": "After Id" + }, + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`.", + "default": 20, + "title": "Limit" + }, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponse_ModelInfo_" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/models/{model_id}": { + "get": { + "summary": "Get a Model", + "description": "Get a specific model.\n\nThe Models API response can be used to determine information about a specific model or resolve a model alias to a model ID.", + "operationId": "models_get", + "parameters": [ + { + "name": "model_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Model identifier or alias.", + "title": "Model Id" + }, + "description": "Model identifier or alias." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelInfo" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/messages/batches": { + "post": { + "summary": "Create a Message Batch", + "description": "Send a batch of Message creation requests.\n\nThe Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "message_batches_post", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageBatch" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMessageBatchParams" + } + } + }, + "required": true + } + }, + "get": { + "summary": "List Message Batches", + "description": "List all Message Batches within a Workspace. Most recently created batches are returned first.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "message_batches_list", + "parameters": [ + { + "name": "before_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.", + "title": "Before Id" + }, + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object." + }, + { + "name": "after_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.", + "title": "After Id" + }, + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`.", + "default": 20, + "title": "Limit" + }, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponse_MessageBatch_" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/messages/batches/{message_batch_id}": { + "get": { + "summary": "Retrieve a Message Batch", + "description": "This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the `results_url` field in the response.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "message_batches_retrieve", + "parameters": [ + { + "name": "message_batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the Message Batch.", + "title": "Message Batch Id" + }, + "description": "ID of the Message Batch." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageBatch" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a Message Batch", + "description": "Delete a Message Batch.\n\nMessage Batches can only be deleted once they've finished processing. If you'd like to delete an in-progress batch, you must first cancel it.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "message_batches_delete", + "parameters": [ + { + "name": "message_batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the Message Batch.", + "title": "Message Batch Id" + }, + "description": "ID of the Message Batch." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteMessageBatchResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/messages/batches/{message_batch_id}/cancel": { + "post": { + "summary": "Cancel a Message Batch", + "description": "Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.\n\nThe number of canceled requests is specified in `request_counts`. To determine which requests were canceled, check the individual results within the batch. Note that cancellation may not result in any canceled requests if they were non-interruptible.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "message_batches_cancel", + "parameters": [ + { + "name": "message_batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the Message Batch.", + "title": "Message Batch Id" + }, + "description": "ID of the Message Batch." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageBatch" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/messages/batches/{message_batch_id}/results": { + "get": { + "summary": "Retrieve Message Batch results", + "description": "Streams the results of a Message Batch as a `.jsonl` file.\n\nEach line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "message_batches_results", + "parameters": [ + { + "name": "message_batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the Message Batch.", + "title": "Message Batch Id" + }, + "description": "ID of the Message Batch." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/x-jsonl": { + "schema": { + "$ref": "#/components/schemas/MessageBatchIndividualResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/messages/count_tokens": { + "post": { + "summary": "Count tokens in a Message", + "description": "Count the number of tokens in a Message.\n\nThe Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it.\n\nLearn more about token counting in our [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)", + "operationId": "messages_count_tokens_post", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountMessageTokensResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountMessageTokensParams" + } + } + }, + "required": true + } + } + }, + "/v1/messages?beta=true": { + "post": { + "summary": "Create a Message", + "description": "Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.\n\nThe Messages API can be used for either single queries or stateless multi-turn conversations.\n\nLearn more about the Messages API in our [user guide](https://docs.claude.com/en/docs/initial-setup)", + "operationId": "beta_messages_post", + "parameters": [ + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "responses": { + "200": { + "description": "Message object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaMessage" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaCreateMessageParams" + } + } + }, + "required": true + } + } + }, + "/v1/models?beta=true": { + "get": { + "summary": "List Models", + "description": "List available models.\n\nThe Models API response can be used to determine which models are available for use in the API. More recently released models are listed first.", + "operationId": "beta_models_list", + "parameters": [ + { + "name": "before_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.", + "title": "Before Id" + }, + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object." + }, + { + "name": "after_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.", + "title": "After Id" + }, + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`.", + "default": 20, + "title": "Limit" + }, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaListResponse_ModelInfo_" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/models/{model_id}?beta=true": { + "get": { + "summary": "Get a Model", + "description": "Get a specific model.\n\nThe Models API response can be used to determine information about a specific model or resolve a model alias to a model ID.", + "operationId": "beta_models_get", + "parameters": [ + { + "name": "model_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Model identifier or alias.", + "title": "Model Id" + }, + "description": "Model identifier or alias." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaModelInfo" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/messages/batches?beta=true": { + "post": { + "summary": "Create a Message Batch", + "description": "Send a batch of Message creation requests.\n\nThe Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "beta_message_batches_post", + "parameters": [ + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaMessageBatch" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaCreateMessageBatchParams" + } + } + }, + "required": true + } + }, + "get": { + "summary": "List Message Batches", + "description": "List all Message Batches within a Workspace. Most recently created batches are returned first.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "beta_message_batches_list", + "parameters": [ + { + "name": "before_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.", + "title": "Before Id" + }, + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object." + }, + { + "name": "after_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.", + "title": "After Id" + }, + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`.", + "default": 20, + "title": "Limit" + }, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaListResponse_MessageBatch_" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/messages/batches/{message_batch_id}?beta=true": { + "get": { + "summary": "Retrieve a Message Batch", + "description": "This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the `results_url` field in the response.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "beta_message_batches_retrieve", + "parameters": [ + { + "name": "message_batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the Message Batch.", + "title": "Message Batch Id" + }, + "description": "ID of the Message Batch." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaMessageBatch" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a Message Batch", + "description": "Delete a Message Batch.\n\nMessage Batches can only be deleted once they've finished processing. If you'd like to delete an in-progress batch, you must first cancel it.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "beta_message_batches_delete", + "parameters": [ + { + "name": "message_batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the Message Batch.", + "title": "Message Batch Id" + }, + "description": "ID of the Message Batch." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaDeleteMessageBatchResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/messages/batches/{message_batch_id}/cancel?beta=true": { + "post": { + "summary": "Cancel a Message Batch", + "description": "Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.\n\nThe number of canceled requests is specified in `request_counts`. To determine which requests were canceled, check the individual results within the batch. Note that cancellation may not result in any canceled requests if they were non-interruptible.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "beta_message_batches_cancel", + "parameters": [ + { + "name": "message_batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the Message Batch.", + "title": "Message Batch Id" + }, + "description": "ID of the Message Batch." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaMessageBatch" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/messages/batches/{message_batch_id}/results?beta=true": { + "get": { + "summary": "Retrieve Message Batch results", + "description": "Streams the results of a Message Batch as a `.jsonl` file.\n\nEach line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "operationId": "beta_message_batches_results", + "parameters": [ + { + "name": "message_batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the Message Batch.", + "title": "Message Batch Id" + }, + "description": "ID of the Message Batch." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/x-jsonl": { + "schema": { + "$ref": "#/components/schemas/BetaMessageBatchIndividualResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/messages/count_tokens?beta=true": { + "post": { + "summary": "Count tokens in a Message", + "description": "Count the number of tokens in a Message.\n\nThe Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it.\n\nLearn more about token counting in our [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)", + "operationId": "beta_messages_count_tokens_post", + "parameters": [ + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaCountMessageTokensResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaCountMessageTokensParams" + } + } + }, + "required": true + } + } + }, + "/v1/files?beta=true": { + "post": { + "summary": "Upload File", + "operationId": "beta_upload_file_v1_files_post", + "parameters": [ + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaFileMetadataSchema" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "The file to upload" + } + }, + "required": [ + "file" + ] + } + } + }, + "required": true + } + }, + "get": { + "summary": "List Files", + "operationId": "beta_list_files_v1_files_get", + "parameters": [ + { + "name": "before_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.", + "title": "Before Id" + }, + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object." + }, + { + "name": "after_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.", + "title": "After Id" + }, + "description": "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`.", + "default": 20, + "title": "Limit" + }, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`." + }, + { + "name": "scope_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Filter by scope ID. Only returns files associated with the specified scope (e.g., a session ID).", + "title": "Scope Id" + }, + "description": "Filter by scope ID. Only returns files associated with the specified scope (e.g., a session ID)." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaFileListResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/files/{file_id}?beta=true": { + "get": { + "summary": "Get File Metadata", + "operationId": "beta_get_file_metadata_v1_files__file_id__get", + "parameters": [ + { + "name": "file_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the File.", + "title": "File Id" + }, + "description": "ID of the File." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaFileMetadataSchema" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "delete": { + "summary": "Delete File", + "operationId": "beta_delete_file_v1_files__file_id__delete", + "parameters": [ + { + "name": "file_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the File.", + "title": "File Id" + }, + "description": "ID of the File." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaFileDeleteResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/files/{file_id}/content?beta=true": { + "get": { + "summary": "Download File", + "operationId": "beta_download_file_v1_files__file_id__content_get", + "parameters": [ + { + "name": "file_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the File.", + "title": "File Id" + }, + "description": "ID of the File." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/octet-stream": { + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/skills?beta=true": { + "post": { + "summary": "Create Skill", + "operationId": "beta_create_skill_v1_skills_post", + "parameters": [ + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/BetaBody_create_skill_v1_skills_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaCreateSkillResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "get": { + "summary": "List Skills", + "operationId": "beta_list_skills_v1_skills_get", + "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Pagination token for fetching a specific page of results.\n\nPass the value from a previous response's `next_page` field to get the next page of results.", + "x-stainless-pagination-property": { + "purpose": "next_cursor_param" + }, + "title": "Page" + }, + "description": "Pagination token for fetching a specific page of results.\n\nPass the value from a previous response's `next_page` field to get the next page of results." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "description": "Number of results to return per page.\n\nMaximum value is 100. Defaults to 20.", + "default": 20, + "title": "Limit" + }, + "description": "Number of results to return per page.\n\nMaximum value is 100. Defaults to 20." + }, + { + "name": "source", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter skills by source.\n\nIf provided, only skills from the specified source will be returned:\n* `\"custom\"`: only return user-created skills\n* `\"anthropic\"`: only return Anthropic-created skills", + "title": "Source" + }, + "description": "Filter skills by source.\n\nIf provided, only skills from the specified source will be returned:\n* `\"custom\"`: only return user-created skills\n* `\"anthropic\"`: only return Anthropic-created skills" + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaListSkillsResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/skills/{skill_id}?beta=true": { + "get": { + "summary": "Get Skill", + "operationId": "beta_get_skill_v1_skills__skill_id__get", + "parameters": [ + { + "name": "skill_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "title": "Skill Id" + }, + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaGetSkillResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "delete": { + "summary": "Delete Skill", + "operationId": "beta_delete_skill_v1_skills__skill_id__delete", + "parameters": [ + { + "name": "skill_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "title": "Skill Id" + }, + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaDeleteSkillResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/skills/{skill_id}/versions?beta=true": { + "post": { + "summary": "Create Skill Version", + "operationId": "beta_create_skill_version_v1_skills__skill_id__versions_post", + "parameters": [ + { + "name": "skill_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "title": "Skill Id" + }, + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/BetaBody_create_skill_version_v1_skills__skill_id__versions_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaCreateSkillVersionResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "get": { + "summary": "List Skill Versions", + "operationId": "beta_list_skill_versions_v1_skills__skill_id__versions_get", + "parameters": [ + { + "name": "skill_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "title": "Skill Id" + }, + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optionally set to the `next_page` token from the previous response.", + "x-stainless-pagination-property": { + "purpose": "next_cursor_param" + }, + "title": "Page" + }, + "description": "Optionally set to the `next_page` token from the previous response." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`.", + "title": "Limit" + }, + "description": "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `1000`." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaListSkillVersionsResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/skills/{skill_id}/versions/{version}?beta=true": { + "get": { + "summary": "Get Skill Version", + "operationId": "beta_get_skill_version_v1_skills__skill_id__versions__version__get", + "parameters": [ + { + "name": "skill_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "title": "Skill Id" + }, + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time." + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Version identifier for the skill.\n\nEach version is identified by a Unix epoch timestamp (e.g., \"1759178010641129\").", + "title": "Version" + }, + "description": "Version identifier for the skill.\n\nEach version is identified by a Unix epoch timestamp (e.g., \"1759178010641129\")." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaGetSkillVersionResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "delete": { + "summary": "Delete Skill Version", + "operationId": "beta_delete_skill_version_v1_skills__skill_id__versions__version__delete", + "parameters": [ + { + "name": "skill_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "title": "Skill Id" + }, + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time." + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Version identifier for the skill.\n\nEach version is identified by a Unix epoch timestamp (e.g., \"1759178010641129\").", + "title": "Version" + }, + "description": "Version identifier for the skill.\n\nEach version is identified by a Unix epoch timestamp (e.g., \"1759178010641129\")." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaDeleteSkillVersionResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/skills/{skill_id}/versions/{version}/content?beta=true": { + "get": { + "summary": "Download Skill Version Content", + "description": "Download a skill version's content as a zip archive.", + "operationId": "beta_download_skill_version_content_v1_skills__skill_id__versions__version__content_get", + "parameters": [ + { + "name": "skill_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "title": "Skill Id" + }, + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time." + }, + { + "name": "version", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Version identifier for the skill.\n\nEach version is identified by a Unix epoch timestamp (e.g., \"1759178010641129\").", + "title": "Version" + }, + "description": "Version identifier for the skill.\n\nEach version is identified by a Unix epoch timestamp (e.g., \"1759178010641129\")." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.", + "title": "X-Api-Key" + }, + "description": "Your unique API key for authentication.\n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/zip": { + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/zip": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/environments?beta=true": { + "post": { + "summary": "Create Environment", + "description": "Create a new environment with the specified configuration.", + "operationId": "beta_create_environment_v1_environments_post", + "parameters": [ + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaPublicEnvironmentCreateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaEnvironment" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "get": { + "summary": "List Environments", + "description": "List environments with pagination support.", + "operationId": "beta_list_environments_v1_environments_get", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "description": "Maximum number of environments to return", + "default": 20, + "title": "Limit" + }, + "description": "Maximum number of environments to return" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Opaque cursor from previous response for pagination. Pass the `next_page` value from the previous response.", + "x-stainless-pagination-property": { + "purpose": "next_cursor_param" + }, + "title": "Page" + }, + "description": "Opaque cursor from previous response for pagination. Pass the `next_page` value from the previous response." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include archived environments in the response", + "default": false, + "title": "Include Archived" + }, + "description": "Include archived environments in the response" + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaEnvironmentListResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/environments/{environment_id}?beta=true": { + "get": { + "summary": "Get Environment", + "description": "Retrieve a specific environment by ID.", + "operationId": "beta_get_environment_v1_environments__environment_id__get", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaEnvironment" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "summary": "Update Environment", + "description": "Update an existing environment's configuration.", + "operationId": "beta_update_environment_v1_environments__environment_id__post", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "x-stainless-cli-data-alias": "id", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaPublicEnvironmentUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaEnvironment" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "delete": { + "summary": "Delete Environment", + "description": "Delete an environment by ID. Returns a confirmation of the deletion.", + "operationId": "beta_delete_environment_v1_environments__environment_id__delete", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaEnvironmentDeleteResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/environments/{environment_id}/archive?beta=true": { + "post": { + "summary": "Archive Environment", + "description": "Archive an environment by ID. Archived environments cannot be used to create new sessions.", + "operationId": "beta_archive_environment_v1_environments__environment_id__archive_post", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaEnvironment" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/environments/{environment_id}/work/stats?beta=true": { + "get": { + "summary": "Get Queue Statistics", + "description": "Get statistics about the work queue for an environment.", + "operationId": "beta_get_environment_stats_v1_environments__environment_id__work_stats_get", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaSelfHostedWorkQueueStats" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/environments/{environment_id}/work/poll?beta=true": { + "get": { + "summary": "Poll for Work", + "description": "Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.\n\nLong poll for work items in the queue.", + "operationId": "beta_poll_work_v1_environments__environment_id__work_poll_get", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "block_ms", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "How long to wait for work to arrive before returning. Must be 1-999 in milliseconds. Defaults to non-blocking (returns immediately if no work is available).", + "title": "Block Ms" + }, + "description": "How long to wait for work to arrive before returning. Must be 1-999 in milliseconds. Defaults to non-blocking (returns immediately if no work is available)." + }, + { + "name": "reclaim_older_than_ms", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "Reclaim unacknowledged work items older than this many milliseconds. If omitted, uses the default (5000ms).", + "title": "Reclaim Older Than Ms" + }, + "description": "Reclaim unacknowledged work items older than this many milliseconds. If omitted, uses the default (5000ms)." + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "Anthropic-Worker-ID", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Unique identifier for the specific worker polling, used to track aggregated environment-level work metrics in Console", + "title": "Anthropic-Worker-Id" + }, + "description": "Unique identifier for the specific worker polling, used to track aggregated environment-level work metrics in Console" + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaSelfHostedWork" + }, + { + "type": "null" + } + ], + "title": "Response Poll Work V1 Environments Environment Id Work Poll Get" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/environments/{environment_id}/work/{work_id}/ack?beta=true": { + "post": { + "summary": "Acknowledge Work", + "description": "Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.\n\nAcknowledge receipt of a work item, transitioning it from 'queued' to 'starting' and removing it from the queue.", + "operationId": "beta_acknowledge_work_v1_environments__environment_id__work__work_id__ack_post", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "work_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Work Id" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaSelfHostedWork" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/environments/{environment_id}/work/{work_id}/heartbeat?beta=true": { + "post": { + "summary": "Record Heartbeat", + "description": "Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.\n\nRecord a heartbeat for a work item to maintain the lease.", + "operationId": "beta_record_heartbeat_v1_environments__environment_id__work__work_id__heartbeat_post", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "work_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Work Id" + } + }, + { + "name": "desired_ttl_seconds", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Desired TTL in seconds", + "title": "Desired Ttl Seconds" + }, + "description": "Desired TTL in seconds" + }, + { + "name": "expected_last_heartbeat", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Expected last_heartbeat for conditional update (optimistic concurrency). Use literal 'NO_HEARTBEAT' to claim an unclaimed lease (first heartbeat). For subsequent heartbeats, echo the server's previous last_heartbeat value exactly. Returns 412 Precondition Failed if the actual value doesn't match.", + "title": "Expected Last Heartbeat" + }, + "description": "Expected last_heartbeat for conditional update (optimistic concurrency). Use literal 'NO_HEARTBEAT' to claim an unclaimed lease (first heartbeat). For subsequent heartbeats, echo the server's previous last_heartbeat value exactly. Returns 412 Precondition Failed if the actual value doesn't match.", + "examples": { + "first_claim": { + "summary": "First heartbeat (claim unclaimed lease)", + "value": "NO_HEARTBEAT" + }, + "subsequent": { + "summary": "Subsequent heartbeat (echo server's value)", + "value": "2026-05-14T10:30:45.123456Z" + } + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaSelfHostedWorkHeartbeatResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/environments/{environment_id}/work/{work_id}/stop?beta=true": { + "post": { + "summary": "Stop Work", + "description": "Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.\n\nStop a work item, initiating graceful or forced shutdown.", + "operationId": "beta_stop_work_v1_environments__environment_id__work__work_id__stop_post", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "work_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Work Id" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaSelfHostedWorkStopRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaSelfHostedWork" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/environments/{environment_id}/work/{work_id}?beta=true": { + "get": { + "summary": "Get Work Item", + "description": "Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.\n\nRetrieve detailed information about a specific work item.", + "operationId": "beta_get_work_v1_environments__environment_id__work__work_id__get", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "work_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Work Id" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaSelfHostedWork" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "summary": "Update Work Item", + "description": "Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.\n\nUpdate work item metadata with merge semantics.", + "operationId": "beta_update_work_v1_environments__environment_id__work__work_id__post", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "work_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Work Id" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaSelfHostedWorkUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaSelfHostedWork" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/environments/{environment_id}/work?beta=true": { + "get": { + "summary": "List Work Items", + "description": "Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.\n\nList work items in an environment.", + "operationId": "beta_list_work_v1_environments__environment_id__work_get", + "parameters": [ + { + "name": "environment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Environment Id" + }, + "example": "env_011CZkZ9X2dpNyB7HsEFoRfW" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "description": "Maximum number of work items to return", + "default": 20, + "title": "Limit" + }, + "description": "Maximum number of work items to return" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Opaque cursor from previous response for pagination", + "x-stainless-pagination-property": { + "purpose": "next_cursor_param" + }, + "title": "Page" + }, + "description": "Opaque cursor from previous response for pagination" + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.", + "title": "Anthropic-Beta", + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + }, + "description": "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "title": "Anthropic-Version" + }, + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaSelfHostedWorkListResponse" + } + } + } + }, + "4XX": { + "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions?beta=true": { + "post": { + "operationId": "BetaCreateSession", + "summary": "Create Session", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCreateSessionParams" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsSession" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + }, + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + } + ] + }, + "get": { + "operationId": "BetaListSessions", + "summary": "List Sessions", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Maximum number of results to return." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Opaque pagination cursor from a previous response's next_page." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "When true, includes archived sessions. Default: false (exclude archived)." + }, + { + "name": "created_at[gte]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return sessions created at or after this time (inclusive)." + }, + { + "name": "created_at[gt]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return sessions created after this time (exclusive)." + }, + { + "name": "created_at[lte]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return sessions created at or before this time (inclusive)." + }, + { + "name": "created_at[lt]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return sessions created before this time (exclusive)." + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Filter sessions created with this agent ID." + }, + { + "name": "agent_version", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by agent version. Only applies when agent_id is also set." + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListOrder" + }, + "description": "Sort direction for results, ordered by created_at. Defaults to desc (newest first)." + }, + { + "name": "memory_store_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Filter sessions whose resources contain a memory_store with this memory store ID." + }, + { + "name": "statuses[]", + "in": "query", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatus" + } + }, + "description": "Filter by session status. Repeat the parameter to match any of multiple statuses." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListSessions" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}?beta=true": { + "get": { + "operationId": "BetaGetSession", + "summary": "Get Session", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsSession" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "BetaUpdateSession", + "summary": "Update Session", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "x-stainless-cli-data-alias": "id" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsUpdateSessionParams" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsSession" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "delete": { + "operationId": "BetaDeleteSession", + "summary": "Delete Session", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsDeletedSession" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/events?beta=true": { + "get": { + "operationId": "BetaListEvents", + "summary": "List Events", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Query parameter for limit" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Opaque pagination cursor from a previous response's next_page." + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListOrder" + }, + "description": "Sort direction for results, ordered by created_at. Defaults to asc (chronological)." + }, + { + "name": "types[]", + "in": "query", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Filter by event type. Values match the `type` field on returned events (for example, `user.message` or `agent.tool_use`). Omit to return all event types." + }, + { + "name": "created_at[gte]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return events created at or after this time (inclusive)." + }, + { + "name": "created_at[gt]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return events created after this time (exclusive)." + }, + { + "name": "created_at[lte]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return events created at or before this time (inclusive)." + }, + { + "name": "created_at[lt]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return events created before this time (exclusive)." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListSessionEvents" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "BetaSendEvents", + "summary": "Send Events", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsSendSessionEventsParams" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsSendSessionEvents" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/events/stream?beta=true": { + "get": { + "operationId": "BetaStreamSessionEvents", + "summary": "Stream Events", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsStreamSessionEvents" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveSession", + "summary": "Archive Session", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsSession" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/threads?beta=true": { + "get": { + "operationId": "BetaListSessionThreads", + "summary": "List Session Threads", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Maximum results per page. Defaults to 1000." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Opaque pagination cursor from a previous response's next_page. Forward-only." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListSessionThreads" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/threads/{thread_id}?beta=true": { + "get": { + "operationId": "BetaGetSessionThread", + "summary": "Get Session Thread", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter thread_id", + "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThread" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/threads/{thread_id}/events?beta=true": { + "get": { + "operationId": "BetaListSessionThreadEvents", + "summary": "List Session Thread Events", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter thread_id", + "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Query parameter for limit" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Query parameter for page" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListSessionThreadEvents" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/threads/{thread_id}/stream?beta=true": { + "get": { + "operationId": "BetaStreamSessionThreadEvents", + "summary": "Stream Session Thread Events", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter thread_id", + "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsStreamSessionThreadEvents" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/threads/{thread_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveSessionThread", + "summary": "Archive Session Thread", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter thread_id", + "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThread" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/resources?beta=true": { + "get": { + "operationId": "BetaListResources", + "summary": "List Session Resources", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Maximum number of resources to return per page (max 1000). If omitted, returns all resources." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Opaque cursor from a previous response's next_page field." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListSessionResources" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "BetaAddResource", + "summary": "Add Session Resource", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsAddSessionResourceParams" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsAddSessionResource" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/resources/{resource_id}?beta=true": { + "get": { + "operationId": "BetaGetResource", + "summary": "Get Session Resource", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "resource_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter resource_id", + "example": "sesrsc_011CZkZBJq5dWxk9fVLNcPht" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsGetSessionResource" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "delete": { + "operationId": "BetaDeleteResource", + "summary": "Delete Session Resource", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "resource_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter resource_id", + "example": "sesrsc_011CZkZBJq5dWxk9fVLNcPht" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsDeleteSessionResource" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "BetaUpdateResource", + "summary": "Update Session Resource", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "resource_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "x-stainless-cli-data-alias": "id" + }, + "description": "Path parameter resource_id", + "example": "sesrsc_011CZkZBJq5dWxk9fVLNcPht" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsUpdateSessionResourceParams" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsUpdateSessionResource" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/agents?beta=true": { + "post": { + "operationId": "BetaCreateAgent", + "summary": "Create Agent", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCreateAgentParams" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsAgent" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + }, + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + } + ] + }, + "get": { + "operationId": "BetaListAgents", + "summary": "List Agents", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Maximum results per page. Default 20, maximum 100." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string", + "x-stainless-pagination-property": { + "purpose": "next_cursor_param" + } + }, + "description": "Opaque pagination cursor from a previous response." + }, + { + "name": "created_at[gte]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return agents created at or after this time (inclusive)." + }, + { + "name": "created_at[lte]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return agents created at or before this time (inclusive)." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Include archived agents in results. Defaults to false." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListAgents" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/agents/{agent_id}?beta=true": { + "get": { + "operationId": "BetaGetAgent", + "summary": "Get Agent", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter agent_id", + "example": "agent_011CZkYpogX7uDKUyvBTophP" + }, + { + "name": "version", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Agent version. Omit for the most recent version. Must be at least 1 if specified." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsAgent" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "BetaUpdateAgent", + "summary": "Update Agent", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "x-stainless-cli-data-alias": "id" + }, + "description": "Path parameter agent_id", + "example": "agent_011CZkYpogX7uDKUyvBTophP" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsUpdateAgentParams" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsAgent" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/agents/{agent_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveAgent", + "summary": "Archive Agent", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter agent_id", + "example": "agent_011CZkYpogX7uDKUyvBTophP" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsAgent" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/agents/{agent_id}/versions?beta=true": { + "get": { + "operationId": "BetaListAgentVersions", + "summary": "List Agent Versions", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter agent_id", + "example": "agent_011CZkYpogX7uDKUyvBTophP" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Maximum results per page. Default 20, maximum 100." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string", + "x-stainless-pagination-property": { + "purpose": "next_cursor_param" + } + }, + "description": "Opaque pagination cursor." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListAgentVersions" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/vaults?beta=true": { + "post": { + "operationId": "BetaCreateVault", + "summary": "Create Vault", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCreateVaultRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsVault" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + }, + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + } + ] + }, + "get": { + "operationId": "BetaListVaults", + "summary": "List Vaults", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Maximum number of vaults to return per page. Defaults to 20, maximum 100." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Opaque pagination token from a previous `list_vaults` response." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to include archived vaults in the results." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListVaultsResponse" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/vaults/{vault_id}?beta=true": { + "get": { + "operationId": "BetaGetVault", + "summary": "Get Vault", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsVault" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "BetaUpdateVault", + "summary": "Update Vault", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "x-stainless-cli-data-alias": "id" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsUpdateVaultRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsVault" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "delete": { + "operationId": "BetaDeleteVault", + "summary": "Delete Vault", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsDeletedVault" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/vaults/{vault_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveVault", + "summary": "Archive Vault", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsVault" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/vaults/{vault_id}/credentials?beta=true": { + "post": { + "operationId": "BetaCreateCredential", + "summary": "Create Credential", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCreateCredentialRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCredential" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "get": { + "operationId": "BetaListCredentials", + "summary": "List Credentials", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Maximum number of credentials to return per page. Defaults to 20, maximum 100." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Opaque pagination token from a previous `list_credentials` response." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to include archived credentials in the results." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListCredentialsResponse" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/vaults/{vault_id}/credentials/{credential_id}?beta=true": { + "get": { + "operationId": "BetaGetCredential", + "summary": "Get Credential", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + }, + { + "name": "credential_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter credential_id", + "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCredential" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "BetaUpdateCredential", + "summary": "Update Credential", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + }, + { + "name": "credential_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "x-stainless-cli-data-alias": "id" + }, + "description": "Path parameter credential_id", + "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsUpdateCredentialRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCredential" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "delete": { + "operationId": "BetaDeleteCredential", + "summary": "Delete Credential", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + }, + { + "name": "credential_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter credential_id", + "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsDeletedCredential" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/vaults/{vault_id}/credentials/{credential_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveCredential", + "summary": "Archive Credential", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + }, + { + "name": "credential_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter credential_id", + "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCredential" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate?beta=true": { + "post": { + "operationId": "BetaValidateCredential", + "summary": "Validate Credential", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + }, + { + "name": "credential_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter credential_id", + "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCredentialValidation" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/memory_stores/{memory_store_id}/memories?beta=true": { + "post": { + "operationId": "BetaCreateMemory", + "summary": "Create a memory", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" + }, + "description": "Query parameter for view" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCreateMemoryParams" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemory" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "409": { + "description": "Custom error status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + } + } + }, + "get": { + "operationId": "BetaListMemories", + "summary": "List memories", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + }, + { + "name": "path_prefix", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional path prefix filter (raw string-prefix match; include a trailing slash for directory-scoped lists). This value appears in request URLs. Do not include secrets or personally identifiable information." + }, + { + "name": "depth", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Query parameter for depth" + }, + { + "name": "order_by", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Query parameter for order_by" + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListOrder" + }, + "description": "Query parameter for order" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Query parameter for limit" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Query parameter for page" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" + }, + "description": "Query parameter for view" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListMemoriesResult" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "409": { + "description": "Custom error status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + } + } + } + }, + "/v1/memory_stores/{memory_store_id}/memories/{memory_id}?beta=true": { + "get": { + "operationId": "BetaGetMemory", + "summary": "Retrieve a memory", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_id" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" + }, + "description": "Query parameter for view" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemory" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "409": { + "description": "Custom error status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "BetaUpdateMemory", + "summary": "Update a memory", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "x-stainless-cli-data-alias": "id" + }, + "description": "Path parameter memory_id" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" + }, + "description": "Query parameter for view" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsUpdateMemoryParams" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemory" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "409": { + "description": "Custom error status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + } + } + }, + "delete": { + "operationId": "BetaDeleteMemory", + "summary": "Delete a memory", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_id" + }, + { + "name": "expected_content_sha256", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Query parameter for expected_content_sha256" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsDeletedMemory" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "409": { + "description": "Custom error status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + } + } + } + }, + "/v1/memory_stores/{memory_store_id}/memory_versions?beta=true": { + "get": { + "operationId": "BetaListMemoryVersions", + "summary": "List memory versions", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Query parameter for memory_id" + }, + { + "name": "session_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Query parameter for session_id" + }, + { + "name": "api_key_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Query parameter for api_key_id" + }, + { + "name": "operation", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersionOperation" + }, + "description": "Query parameter for operation" + }, + { + "name": "created_at[gte]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return versions created at or after this time (inclusive)." + }, + { + "name": "created_at[lte]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return versions created at or before this time (inclusive)." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Query parameter for limit" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Query parameter for page" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" + }, + "description": "Query parameter for view" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListMemoryVersionsResult" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "409": { + "description": "Custom error status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + } + } + } + }, + "/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}?beta=true": { + "get": { + "operationId": "BetaGetMemoryVersion", + "summary": "Retrieve a memory version", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_version_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_version_id" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" + }, + "description": "Query parameter for view" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersion" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "409": { + "description": "Custom error status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + } + } + } + }, + "/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact?beta=true": { + "post": { + "operationId": "BetaRedactMemoryVersion", + "summary": "Redact a memory version", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_version_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_version_id" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersion" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "409": { + "description": "Custom error status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" + } + } + } + } + } + } + }, + "/v1/memory_stores?beta=true": { + "post": { + "operationId": "BetaCreateMemoryStore", + "summary": "Create a memory store", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCreateMemoryStoreRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCreateMemoryStoreResponse" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + }, + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + } + ] + }, + "get": { + "operationId": "BetaListMemoryStores", + "summary": "List memory stores", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Maximum number of stores to return per page. Must be between 1 and 100. Defaults to 20 when omitted." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Opaque pagination cursor (a `page_...` value). Pass the `next_page` value from a previous response to fetch the next page; omit for the first page." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "When `true`, archived stores are included in the results. Defaults to `false` (archived stores are excluded)." + }, + { + "name": "created_at[gte]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return only stores whose `created_at` is at or after this time (inclusive). Sent on the wire as `created_at[gte]`." + }, + { + "name": "created_at[lte]", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaTimestamp" + }, + "description": "Return only stores whose `created_at` is at or before this time (inclusive). Sent on the wire as `created_at[lte]`." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsListMemoryStoresResponse" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/memory_stores/{memory_store_id}?beta=true": { + "get": { + "operationId": "BetaGetMemoryStore", + "summary": "Retrieve a memory store", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsGetMemoryStoreResponse" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "BetaUpdateMemoryStore", + "summary": "Update a memory store", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "x-stainless-cli-data-alias": "id" + }, + "description": "Path parameter memory_store_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsUpdateMemoryStoreRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsUpdateMemoryStoreResponse" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "delete": { + "operationId": "BetaDeleteMemoryStore", + "summary": "Delete a memory store", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsDeleteMemoryStoreResponse" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/memory_stores/{memory_store_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveMemoryStore", + "summary": "Archive a memory store", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter memory_store_id" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaManagedAgentsArchiveMemoryStoreResponse" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/user_profiles?beta=true": { + "post": { + "operationId": "BetaCreateUserProfile", + "summary": "Create User Profile", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaCreateUserProfileRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaUserProfile" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + }, + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + } + ] + }, + "get": { + "operationId": "BetaListUserProfiles", + "summary": "List User Profiles", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Query parameter for limit" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Query parameter for page" + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BetaUserProfileListOrder" + }, + "description": "Query parameter for order" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaListUserProfilesResponse" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/user_profiles/{user_profile_id}?beta=true": { + "get": { + "operationId": "BetaGetUserProfile", + "summary": "Get User Profile", + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "user_profile_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter user_profile_id", + "example": "uprof_011CZkZCu8hGbp5mYRQgUmz9" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaUserProfile" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "BetaUpdateUserProfile", + "summary": "Update User Profile", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "user_profile_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter user_profile_id", + "example": "uprof_011CZkZCu8hGbp5mYRQgUmz9" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaUpdateUserProfileRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaUserProfile" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + }, + "/v1/user_profiles/{user_profile_id}/enrollment_url?beta=true": { + "post": { + "operationId": "BetaCreateEnrollmentUrl", + "summary": "Create Enrollment URL", + "parameters": [ + { + "name": "anthropic-version", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { + "type": "string" + }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { + "$ref": "#/components/schemas/AnthropicBeta" + } + } + } + }, + { + "name": "user_profile_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Path parameter user_profile_id", + "example": "uprof_011CZkZCu8hGbp5mYRQgUmz9" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaEnrollmentUrl" + } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaErrorResponse" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "APIError": { + "properties": { + "message": { + "default": "Internal server error", + "title": "Message", + "type": "string" + }, + "type": { + "const": "api_error", + "default": "api_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "APIError", + "type": "object" + }, + "AllowedCaller": { + "description": "Specifies who can invoke a tool.\n\nValues:\n direct: The model can call this tool directly.\n code_execution_20250825: The tool can be called from the code execution environment (v1).\n code_execution_20260120: The tool can be called from the code execution environment (v2 with persistence).", + "enum": [ + "direct", + "code_execution_20250825", + "code_execution_20260120" + ], + "title": "AllowedCaller", + "type": "string" + }, + "AuthenticationError": { + "properties": { + "message": { + "default": "Authentication error", + "title": "Message", + "type": "string" + }, + "type": { + "const": "authentication_error", + "default": "authentication_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "AuthenticationError", + "type": "object" + }, + "Base64ImageSource": { + "additionalProperties": false, + "properties": { + "data": { + "format": "byte", + "title": "Data", + "type": "string" + }, + "media_type": { + "enum": [ + "image/jpeg", + "image/png", + "image/gif", + "image/webp" + ], + "title": "Media Type", + "type": "string" + }, + "type": { + "const": "base64", + "title": "Type", + "type": "string" + } + }, + "required": [ + "data", + "media_type", + "type" + ], + "title": "Base64ImageSource", + "type": "object" + }, + "Base64PDFSource": { + "additionalProperties": false, + "properties": { + "data": { + "format": "byte", + "title": "Data", + "type": "string" + }, + "media_type": { + "const": "application/pdf", + "title": "Media Type", + "type": "string" + }, + "type": { + "const": "base64", + "title": "Type", + "type": "string" + } + }, + "required": [ + "data", + "media_type", + "type" + ], + "title": "Base64PDFSource", + "type": "object" + }, + "BashCodeExecutionToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "unavailable", + "too_many_requests", + "execution_time_exceeded", + "output_file_too_large" + ], + "title": "BashCodeExecutionToolResultErrorCode", + "type": "string" + }, + "BashTool_20250124": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "bash", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "bash_20250124", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "BashTool_20250124", + "type": "object" + }, + "BetaAPIError": { + "properties": { + "message": { + "default": "Internal server error", + "title": "Message", + "type": "string" + }, + "type": { + "const": "api_error", + "default": "api_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "APIError", + "type": "object" + }, + "BetaAdvisorMessageIterationUsage": { + "description": "Token usage for an advisor sub-inference iteration.", + "properties": { + "cache_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaCacheCreation" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Breakdown of cached tokens by TTL" + }, + "cache_creation_input_tokens": { + "default": 0, + "description": "The number of input tokens used to create the cache entry.", + "minimum": 0, + "title": "Cache Creation Input Tokens", + "type": "integer" + }, + "cache_read_input_tokens": { + "default": 0, + "description": "The number of input tokens read from the cache.", + "minimum": 0, + "title": "Cache Read Input Tokens", + "type": "integer" + }, + "input_tokens": { + "description": "The number of input tokens which were used.", + "minimum": 0, + "title": "Input Tokens", + "type": "integer" + }, + "model": { + "$ref": "#/components/schemas/Model" + }, + "output_tokens": { + "description": "The number of output tokens which were used.", + "minimum": 0, + "title": "Output Tokens", + "type": "integer" + }, + "type": { + "const": "advisor_message", + "default": "advisor_message", + "description": "Usage for an advisor sub-inference iteration", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cache_creation", + "cache_creation_input_tokens", + "cache_read_input_tokens", + "input_tokens", + "model", + "output_tokens", + "type" + ], + "title": "AdvisorMessageIterationUsage", + "type": "object" + }, + "BetaAdvisorToolResultErrorCode": { + "enum": [ + "max_uses_exceeded", + "prompt_too_long", + "too_many_requests", + "overloaded", + "unavailable", + "execution_time_exceeded" + ], + "title": "AdvisorToolResultErrorCode", + "type": "string" + }, + "BetaAdvisorTool_20260301": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "caching": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Caching for the advisor's own prompt. When set, each advisor call writes a cache entry at the given TTL so subsequent calls in the same conversation read the stable prefix. When omitted, the advisor prompt is not cached.", + "title": "Caching" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "model": { + "$ref": "#/components/schemas/Model" + }, + "name": { + "const": "advisor", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "advisor_20260301", + "title": "Type", + "type": "string" + } + }, + "required": [ + "model", + "name", + "type" + ], + "title": "AdvisorTool_20260301", + "type": "object" + }, + "BetaAllThinkingTurns": { + "additionalProperties": false, + "properties": { + "type": { + "const": "all", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "AllThinkingTurns", + "type": "object" + }, + "BetaAllowedCaller": { + "description": "Specifies who can invoke a tool.\n\nValues:\n direct: The model can call this tool directly.\n code_execution_20250825: The tool can be called from the code execution environment (v1).\n code_execution_20260120: The tool can be called from the code execution environment (v2 with persistence).", + "enum": [ + "direct", + "code_execution_20250825", + "code_execution_20260120" + ], + "title": "AllowedCaller", + "type": "string" + }, + "BetaAuthenticationError": { + "properties": { + "message": { + "default": "Authentication error", + "title": "Message", + "type": "string" + }, + "type": { + "const": "authentication_error", + "default": "authentication_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "AuthenticationError", + "type": "object" + }, + "BetaBase64ImageSource": { + "additionalProperties": false, + "properties": { + "data": { + "format": "byte", + "title": "Data", + "type": "string" + }, + "media_type": { + "enum": [ + "image/jpeg", + "image/png", + "image/gif", + "image/webp" + ], + "title": "Media Type", + "type": "string" + }, + "type": { + "const": "base64", + "title": "Type", + "type": "string" + } + }, + "required": [ + "data", + "media_type", + "type" + ], + "title": "Base64ImageSource", + "type": "object" + }, + "BetaBase64PDFSource": { + "additionalProperties": false, + "properties": { + "data": { + "format": "byte", + "title": "Data", + "type": "string" + }, + "media_type": { + "const": "application/pdf", + "title": "Media Type", + "type": "string" + }, + "type": { + "const": "base64", + "title": "Type", + "type": "string" + } + }, + "required": [ + "data", + "media_type", + "type" + ], + "title": "Base64PDFSource", + "type": "object" + }, + "BetaBashCodeExecutionToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "unavailable", + "too_many_requests", + "execution_time_exceeded", + "output_file_too_large" + ], + "title": "BashCodeExecutionToolResultErrorCode", + "type": "string" + }, + "BetaBashTool_20241022": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "bash", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "bash_20241022", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "BashTool_20241022", + "type": "object" + }, + "BetaBashTool_20250124": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "bash", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "bash_20250124", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "BashTool_20250124", + "type": "object" + }, + "BetaBillingError": { + "properties": { + "message": { + "default": "Billing error", + "title": "Message", + "type": "string" + }, + "type": { + "const": "billing_error", + "default": "billing_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "BillingError", + "type": "object" + }, + "BetaBody_create_skill_v1_skills_post": { + "properties": { + "display_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Title", + "description": "Display title for the skill.\n\nThis is a human-readable label that is not included in the prompt sent to the model." + }, + "files": { + "anyOf": [ + { + "items": { + "type": "string", + "format": "binary" + }, + "type": "array" + }, + { + "type": "null", + "x-stainless-skip": [ + "cli" + ] + } + ], + "title": "Files", + "description": "Files to upload for the skill.\n\nAll files must be in the same top-level directory and must include a SKILL.md file at the root of that directory." + } + }, + "type": "object", + "title": "Body_create_skill_v1_skills_post" + }, + "BetaBody_create_skill_version_v1_skills__skill_id__versions_post": { + "properties": { + "files": { + "anyOf": [ + { + "items": { + "type": "string", + "format": "binary" + }, + "type": "array" + }, + { + "type": "null", + "x-stainless-skip": [ + "cli" + ] + } + ], + "title": "Files", + "description": "Files to upload for the skill.\n\nAll files must be in the same top-level directory and must include a SKILL.md file at the root of that directory." + } + }, + "type": "object", + "title": "Body_create_skill_version_v1_skills__skill_id__versions_post" + }, + "BetaCacheControlEphemeral": { + "additionalProperties": false, + "properties": { + "ttl": { + "description": "The time-to-live for the cache control breakpoint.\n\nThis may be one the following values:\n- `5m`: 5 minutes\n- `1h`: 1 hour\n\nDefaults to `5m`.", + "enum": [ + "5m", + "1h" + ], + "title": "Ttl", + "type": "string", + "x-stainless-renameMap": { + "ttl_5m": "5m", + "ttl_1h": "1h" + } + }, + "type": { + "const": "ephemeral", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "CacheControlEphemeral", + "type": "object", + "x-stainless-go-constant-constructor": true + }, + "BetaCacheCreation": { + "properties": { + "ephemeral_1h_input_tokens": { + "default": 0, + "description": "The number of input tokens used to create the 1 hour cache entry.", + "minimum": 0, + "title": "Ephemeral 1H Input Tokens", + "type": "integer" + }, + "ephemeral_5m_input_tokens": { + "default": 0, + "description": "The number of input tokens used to create the 5 minute cache entry.", + "minimum": 0, + "title": "Ephemeral 5M Input Tokens", + "type": "integer" + } + }, + "required": [ + "ephemeral_1h_input_tokens", + "ephemeral_5m_input_tokens" + ], + "title": "CacheCreation", + "type": "object" + }, + "BetaCacheMissMessagesChanged": { + "properties": { + "cache_missed_input_tokens": { + "description": "Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.", + "title": "Cache Missed Input Tokens", + "type": "integer" + }, + "type": { + "const": "messages_changed", + "default": "messages_changed", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cache_missed_input_tokens", + "type" + ], + "title": "CacheMissMessagesChanged", + "type": "object" + }, + "BetaCacheMissModelChanged": { + "properties": { + "cache_missed_input_tokens": { + "description": "Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.", + "title": "Cache Missed Input Tokens", + "type": "integer" + }, + "type": { + "const": "model_changed", + "default": "model_changed", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cache_missed_input_tokens", + "type" + ], + "title": "CacheMissModelChanged", + "type": "object" + }, + "BetaCacheMissPreviousMessageNotFound": { + "properties": { + "type": { + "const": "previous_message_not_found", + "default": "previous_message_not_found", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "CacheMissPreviousMessageNotFound", + "type": "object" + }, + "BetaCacheMissSystemChanged": { + "properties": { + "cache_missed_input_tokens": { + "description": "Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.", + "title": "Cache Missed Input Tokens", + "type": "integer" + }, + "type": { + "const": "system_changed", + "default": "system_changed", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cache_missed_input_tokens", + "type" + ], + "title": "CacheMissSystemChanged", + "type": "object" + }, + "BetaCacheMissToolsChanged": { + "properties": { + "cache_missed_input_tokens": { + "description": "Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.", + "title": "Cache Missed Input Tokens", + "type": "integer" + }, + "type": { + "const": "tools_changed", + "default": "tools_changed", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cache_missed_input_tokens", + "type" + ], + "title": "CacheMissToolsChanged", + "type": "object" + }, + "BetaCacheMissUnavailable": { + "properties": { + "type": { + "const": "unavailable", + "default": "unavailable", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "CacheMissUnavailable", + "type": "object" + }, + "BetaCanceledResult": { + "properties": { + "type": { + "const": "canceled", + "default": "canceled", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "CanceledResult", + "type": "object" + }, + "BetaCapabilitySupport": { + "properties": { + "supported": { + "type": "boolean", + "title": "Supported", + "description": "Whether this capability is supported by the model." + } + }, + "type": "object", + "required": [ + "supported" + ], + "title": "CapabilitySupport", + "description": "Indicates whether a capability is supported." + }, + "BetaCitationsDelta": { + "properties": { + "citation": { + "discriminator": { + "mapping": { + "char_location": "#/components/schemas/BetaResponseCharLocationCitation", + "content_block_location": "#/components/schemas/BetaResponseContentBlockLocationCitation", + "page_location": "#/components/schemas/BetaResponsePageLocationCitation", + "search_result_location": "#/components/schemas/BetaResponseSearchResultLocationCitation", + "web_search_result_location": "#/components/schemas/BetaResponseWebSearchResultLocationCitation" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaResponseCharLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaResponsePageLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaResponseContentBlockLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaResponseWebSearchResultLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaResponseSearchResultLocationCitation" + } + ], + "title": "Citation" + }, + "type": { + "const": "citations_delta", + "default": "citations_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "citation", + "type" + ], + "title": "CitationsDelta", + "type": "object" + }, + "BetaClearThinking20251015": { + "additionalProperties": false, + "properties": { + "keep": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "all": "#/components/schemas/BetaAllThinkingTurns", + "thinking_turns": "#/components/schemas/BetaThinkingTurns" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaThinkingTurns" + }, + { + "$ref": "#/components/schemas/BetaAllThinkingTurns" + } + ] + }, + { + "const": "all", + "type": "string", + "x-stainless-naming": { + "csharp": { + "type_name": "All" + } + } + } + ], + "description": "Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed.", + "title": "Keep" + }, + "type": { + "const": "clear_thinking_20251015", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ClearThinking20251015", + "type": "object" + }, + "BetaClearToolUses20250919": { + "additionalProperties": false, + "properties": { + "clear_at_least": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaInputTokensClearAtLeast" + }, + { + "type": "null" + } + ], + "description": "Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed." + }, + "clear_tool_inputs": { + "anyOf": [ + { + "type": "boolean" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)", + "title": "Clear Tool Inputs" + }, + "exclude_tools": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Tool names whose uses are preserved from clearing", + "title": "Exclude Tools" + }, + "keep": { + "description": "Number of tool uses to retain in the conversation", + "discriminator": { + "mapping": { + "tool_uses": "#/components/schemas/BetaToolUsesKeep" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaToolUsesKeep" + } + ], + "title": "Keep" + }, + "trigger": { + "description": "Condition that triggers the context management strategy", + "discriminator": { + "mapping": { + "input_tokens": "#/components/schemas/BetaInputTokensTrigger", + "tool_uses": "#/components/schemas/BetaToolUsesTrigger" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaInputTokensTrigger" + }, + { + "$ref": "#/components/schemas/BetaToolUsesTrigger" + } + ], + "title": "Trigger" + }, + "type": { + "const": "clear_tool_uses_20250919", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ClearToolUses20250919", + "type": "object" + }, + "BetaCloudConfig": { + "properties": { + "networking": { + "oneOf": [ + { + "$ref": "#/components/schemas/BetaUnrestrictedNetwork" + }, + { + "$ref": "#/components/schemas/BetaLimitedNetwork" + } + ], + "title": "Networking", + "description": "Network configuration policy.", + "discriminator": { + "propertyName": "type", + "mapping": { + "limited": "#/components/schemas/BetaLimitedNetwork", + "unrestricted": "#/components/schemas/BetaUnrestrictedNetwork" + } + }, + "examples": [ + { + "type": "limited", + "allowed_hosts": [ + "api.example.com" + ], + "allow_package_managers": true, + "allow_mcp_servers": false + } + ] + }, + "packages": { + "$ref": "#/components/schemas/BetaPackages", + "description": "Package manager configuration.", + "examples": [ + { + "type": "packages", + "pip": [ + "pandas", + "numpy" + ], + "npm": [], + "apt": [], + "cargo": [], + "gem": [], + "go": [] + } + ] + }, + "type": { + "type": "string", + "const": "cloud", + "title": "Type", + "description": "Environment type", + "examples": [ + "cloud" + ] + } + }, + "type": "object", + "required": [ + "networking", + "packages", + "type" + ], + "title": "CloudConfig", + "description": "`cloud` environment configuration.", + "example": { + "type": "cloud", + "networking": { + "type": "limited", + "allowed_hosts": [ + "api.example.com" + ], + "allow_package_managers": true, + "allow_mcp_servers": false + }, + "packages": { + "type": "packages", + "pip": [ + "pandas", + "numpy" + ], + "npm": [], + "apt": [], + "cargo": [], + "gem": [], + "go": [] + } + } + }, + "BetaCloudConfigParams": { + "properties": { + "networking": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/BetaUnrestrictedNetwork" + }, + { + "$ref": "#/components/schemas/BetaLimitedNetworkParams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "limited": "#/components/schemas/BetaLimitedNetworkParams", + "unrestricted": "#/components/schemas/BetaUnrestrictedNetwork" + } + } + }, + { + "type": "null" + } + ], + "title": "Networking", + "description": "Network configuration policy. Omit on update to preserve the existing value.", + "examples": [ + { + "type": "limited", + "allowed_hosts": [ + "api.example.com" + ], + "allow_package_managers": true + } + ] + }, + "packages": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaPackagesParams" + }, + { + "type": "null" + } + ], + "description": "Package manager configuration. Omit on update to preserve the existing value.", + "examples": [ + { + "pip": [ + "pandas", + "numpy" + ] + } + ] + }, + "type": { + "type": "string", + "const": "cloud", + "title": "Type", + "description": "Environment type", + "examples": [ + "cloud" + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "type" + ], + "title": "CloudConfigParams", + "description": "Request params for `cloud` environment configuration.\n\nFields default to null; on update, omitted fields preserve the\nexisting value.", + "example": { + "type": "cloud", + "networking": { + "type": "limited", + "allowed_hosts": [ + "api.example.com" + ], + "allow_package_managers": true + }, + "packages": { + "pip": [ + "pandas", + "numpy" + ] + } + } + }, + "BetaCodeExecutionToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "unavailable", + "too_many_requests", + "execution_time_exceeded" + ], + "title": "CodeExecutionToolResultErrorCode", + "type": "string" + }, + "BetaCodeExecutionTool_20250522": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "name": { + "const": "code_execution", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "code_execution_20250522", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "CodeExecutionTool_20250522", + "type": "object" + }, + "BetaCodeExecutionTool_20250825": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "name": { + "const": "code_execution", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "code_execution_20250825", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "CodeExecutionTool_20250825", + "type": "object" + }, + "BetaCodeExecutionTool_20260120": { + "additionalProperties": false, + "description": "Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).", + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "name": { + "const": "code_execution", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "code_execution_20260120", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "CodeExecutionTool_20260120", + "type": "object" + }, + "BetaCompact20260112": { + "additionalProperties": false, + "description": "Automatically compact older context when reaching the configured trigger threshold.", + "properties": { + "instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Additional instructions for summarization.", + "title": "Instructions" + }, + "pause_after_compaction": { + "description": "Whether to pause after compaction and return the compaction block to the user.", + "title": "Pause After Compaction", + "type": "boolean" + }, + "trigger": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaInputTokensTrigger" + }, + { + "type": "null" + } + ], + "description": "When to trigger compaction. Defaults to 150000 input tokens." + }, + "type": { + "const": "compact_20260112", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "Compact20260112", + "type": "object" + }, + "BetaCompactionContentBlockDelta": { + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content" + }, + "encrypted_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Opaque metadata from prior compaction, to be round-tripped verbatim", + "title": "Encrypted Content" + }, + "type": { + "const": "compaction_delta", + "default": "compaction_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "encrypted_content", + "type" + ], + "title": "CompactionContentBlockDelta", + "type": "object" + }, + "BetaCompactionIterationUsage": { + "description": "Token usage for a compaction iteration.", + "properties": { + "cache_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaCacheCreation" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Breakdown of cached tokens by TTL" + }, + "cache_creation_input_tokens": { + "default": 0, + "description": "The number of input tokens used to create the cache entry.", + "minimum": 0, + "title": "Cache Creation Input Tokens", + "type": "integer" + }, + "cache_read_input_tokens": { + "default": 0, + "description": "The number of input tokens read from the cache.", + "minimum": 0, + "title": "Cache Read Input Tokens", + "type": "integer" + }, + "input_tokens": { + "description": "The number of input tokens which were used.", + "minimum": 0, + "title": "Input Tokens", + "type": "integer" + }, + "output_tokens": { + "description": "The number of output tokens which were used.", + "minimum": 0, + "title": "Output Tokens", + "type": "integer" + }, + "type": { + "const": "compaction", + "default": "compaction", + "description": "Usage for a compaction iteration", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cache_creation", + "cache_creation_input_tokens", + "cache_read_input_tokens", + "input_tokens", + "output_tokens", + "type" + ], + "title": "CompactionIterationUsage", + "type": "object" + }, + "BetaComputerUseTool_20241022": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "display_height_px": { + "description": "The height of the display in pixels.", + "minimum": 1, + "title": "Display Height Px", + "type": "integer" + }, + "display_number": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The X11 display number (e.g. 0, 1) for the display.", + "title": "Display Number" + }, + "display_width_px": { + "description": "The width of the display in pixels.", + "minimum": 1, + "title": "Display Width Px", + "type": "integer" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "computer", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "computer_20241022", + "title": "Type", + "type": "string" + } + }, + "required": [ + "display_height_px", + "display_width_px", + "name", + "type" + ], + "title": "ComputerUseTool_20241022", + "type": "object" + }, + "BetaComputerUseTool_20250124": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "display_height_px": { + "description": "The height of the display in pixels.", + "minimum": 1, + "title": "Display Height Px", + "type": "integer" + }, + "display_number": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The X11 display number (e.g. 0, 1) for the display.", + "title": "Display Number" + }, + "display_width_px": { + "description": "The width of the display in pixels.", + "minimum": 1, + "title": "Display Width Px", + "type": "integer" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "computer", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "computer_20250124", + "title": "Type", + "type": "string" + } + }, + "required": [ + "display_height_px", + "display_width_px", + "name", + "type" + ], + "title": "ComputerUseTool_20250124", + "type": "object" + }, + "BetaComputerUseTool_20251124": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "display_height_px": { + "description": "The height of the display in pixels.", + "minimum": 1, + "title": "Display Height Px", + "type": "integer" + }, + "display_number": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The X11 display number (e.g. 0, 1) for the display.", + "title": "Display Number" + }, + "display_width_px": { + "description": "The width of the display in pixels.", + "minimum": 1, + "title": "Display Width Px", + "type": "integer" + }, + "enable_zoom": { + "description": "Whether to enable an action to take a zoomed-in screenshot of the screen.", + "title": "Enable Zoom", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "computer", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "computer_20251124", + "title": "Type", + "type": "string" + } + }, + "required": [ + "display_height_px", + "display_width_px", + "name", + "type" + ], + "title": "ComputerUseTool_20251124", + "type": "object" + }, + "BetaContainer": { + "description": "Information about the container used in the request (for the code execution tool)", + "properties": { + "expires_at": { + "description": "The time at which the container will expire.", + "format": "date-time", + "title": "Expires At", + "type": "string" + }, + "id": { + "description": "Identifier for the container used in this request", + "title": "Id", + "type": "string" + }, + "skills": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/BetaSkill" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Skills loaded in the container", + "title": "Skills" + } + }, + "required": [ + "expires_at", + "id", + "skills" + ], + "title": "Container", + "type": "object" + }, + "BetaContainerParams": { + "additionalProperties": false, + "description": "Container parameters with skills to be loaded.", + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Container id", + "title": "Id" + }, + "skills": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/BetaSkillParams" + }, + "maxItems": 8, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of skills to load in the container", + "title": "Skills" + } + }, + "title": "ContainerParams", + "type": "object" + }, + "BetaContentBlockDeltaEvent": { + "properties": { + "delta": { + "discriminator": { + "mapping": { + "citations_delta": "#/components/schemas/BetaCitationsDelta", + "compaction_delta": "#/components/schemas/BetaCompactionContentBlockDelta", + "input_json_delta": "#/components/schemas/BetaInputJsonContentBlockDelta", + "signature_delta": "#/components/schemas/BetaSignatureContentBlockDelta", + "text_delta": "#/components/schemas/BetaTextContentBlockDelta", + "thinking_delta": "#/components/schemas/BetaThinkingContentBlockDelta" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaTextContentBlockDelta" + }, + { + "$ref": "#/components/schemas/BetaInputJsonContentBlockDelta" + }, + { + "$ref": "#/components/schemas/BetaCitationsDelta" + }, + { + "$ref": "#/components/schemas/BetaThinkingContentBlockDelta" + }, + { + "$ref": "#/components/schemas/BetaSignatureContentBlockDelta" + }, + { + "$ref": "#/components/schemas/BetaCompactionContentBlockDelta" + } + ], + "title": "Delta" + }, + "index": { + "title": "Index", + "type": "integer" + }, + "type": { + "const": "content_block_delta", + "default": "content_block_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "delta", + "index", + "type" + ], + "title": "ContentBlockDeltaEvent", + "type": "object" + }, + "BetaContentBlockSource": { + "additionalProperties": false, + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "discriminator": { + "mapping": { + "image": "#/components/schemas/BetaRequestImageBlock", + "text": "#/components/schemas/BetaRequestTextBlock" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaRequestTextBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestImageBlock" + } + ], + "title": "beta_content_block_source_content_item" + }, + "type": "array", + "title": "beta_content_block_source_content" + } + ], + "title": "Content" + }, + "type": { + "const": "content", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "type" + ], + "title": "ContentBlockSource", + "type": "object" + }, + "BetaContentBlockStartEvent": { + "properties": { + "content_block": { + "discriminator": { + "mapping": { + "advisor_tool_result": "#/components/schemas/BetaResponseAdvisorToolResultBlock", + "bash_code_execution_tool_result": "#/components/schemas/BetaResponseBashCodeExecutionToolResultBlock", + "code_execution_tool_result": "#/components/schemas/BetaResponseCodeExecutionToolResultBlock", + "compaction": "#/components/schemas/BetaResponseCompactionBlock", + "container_upload": "#/components/schemas/BetaResponseContainerUploadBlock", + "mcp_tool_result": "#/components/schemas/BetaResponseMCPToolResultBlock", + "mcp_tool_use": "#/components/schemas/BetaResponseMCPToolUseBlock", + "redacted_thinking": "#/components/schemas/BetaResponseRedactedThinkingBlock", + "server_tool_use": "#/components/schemas/BetaResponseServerToolUseBlock", + "text": "#/components/schemas/BetaResponseTextBlock", + "text_editor_code_execution_tool_result": "#/components/schemas/BetaResponseTextEditorCodeExecutionToolResultBlock", + "thinking": "#/components/schemas/BetaResponseThinkingBlock", + "tool_search_tool_result": "#/components/schemas/BetaResponseToolSearchToolResultBlock", + "tool_use": "#/components/schemas/BetaResponseToolUseBlock", + "web_fetch_tool_result": "#/components/schemas/BetaResponseWebFetchToolResultBlock", + "web_search_tool_result": "#/components/schemas/BetaResponseWebSearchToolResultBlock" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaResponseTextBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseThinkingBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseRedactedThinkingBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseToolUseBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseServerToolUseBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseWebSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseWebFetchToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseAdvisorToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseBashCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseTextEditorCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseToolSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseMCPToolUseBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseMCPToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseContainerUploadBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseCompactionBlock" + } + ], + "title": "Content Block" + }, + "index": { + "title": "Index", + "type": "integer" + }, + "type": { + "const": "content_block_start", + "default": "content_block_start", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content_block", + "index", + "type" + ], + "title": "ContentBlockStartEvent", + "type": "object" + }, + "BetaContentBlockStopEvent": { + "properties": { + "index": { + "title": "Index", + "type": "integer" + }, + "type": { + "const": "content_block_stop", + "default": "content_block_stop", + "title": "Type", + "type": "string" + } + }, + "required": [ + "index", + "type" + ], + "title": "ContentBlockStopEvent", + "type": "object" + }, + "BetaContextManagementCapability": { + "properties": { + "clear_thinking_20251015": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaCapabilitySupport" + }, + { + "type": "null" + } + ], + "description": "Whether the clear_thinking_20251015 strategy is supported." + }, + "clear_tool_uses_20250919": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaCapabilitySupport" + }, + { + "type": "null" + } + ], + "description": "Whether the clear_tool_uses_20250919 strategy is supported." + }, + "compact_20260112": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaCapabilitySupport" + }, + { + "type": "null" + } + ], + "description": "Whether the compact_20260112 strategy is supported." + }, + "supported": { + "type": "boolean", + "title": "Supported", + "description": "Whether this capability is supported by the model." + } + }, + "type": "object", + "required": [ + "clear_thinking_20251015", + "clear_tool_uses_20250919", + "compact_20260112", + "supported" + ], + "title": "ContextManagementCapability", + "description": "Context management capability details." + }, + "BetaContextManagementConfig": { + "additionalProperties": false, + "properties": { + "edits": { + "description": "List of context management edits to apply", + "items": { + "discriminator": { + "mapping": { + "clear_thinking_20251015": "#/components/schemas/BetaClearThinking20251015", + "clear_tool_uses_20250919": "#/components/schemas/BetaClearToolUses20250919", + "compact_20260112": "#/components/schemas/BetaCompact20260112" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaClearToolUses20250919" + }, + { + "$ref": "#/components/schemas/BetaClearThinking20251015" + }, + { + "$ref": "#/components/schemas/BetaCompact20260112" + } + ] + }, + "minItems": 0, + "title": "Edits", + "type": "array" + } + }, + "title": "ContextManagementConfig", + "type": "object" + }, + "BetaContextManagementResponse": { + "properties": { + "original_input_tokens": { + "type": "integer", + "title": "Original Input Tokens", + "description": "The original token count before context management was applied" + } + }, + "type": "object", + "required": [ + "original_input_tokens" + ], + "title": "ContextManagementResponse" + }, + "BetaCountMessageTokensParams": { + "additionalProperties": false, + "examples": [ + { + "messages": [ + { + "content": "Hello, world", + "role": "user" + } + ], + "model": "claude-opus-4-6" + } + ], + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.", + "title": "Cache Control" + }, + "context_management": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaContextManagementConfig" + }, + { + "type": "null" + } + ], + "description": "Context management configuration.\n\nThis allows you to control how Claude manages context across multiple requests, such as whether to clear function results or not." + }, + "mcp_servers": { + "description": "MCP servers to be utilized in this request", + "items": { + "$ref": "#/components/schemas/BetaRequestMCPServerURLDefinition" + }, + "maxItems": 20, + "title": "Mcp Servers", + "type": "array" + }, + "messages": { + "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.", + "items": { + "$ref": "#/components/schemas/BetaInputMessage" + }, + "title": "Messages", + "type": "array" + }, + "model": { + "$ref": "#/components/schemas/Model" + }, + "output_config": { + "$ref": "#/components/schemas/BetaOutputConfig", + "description": "Configuration options for the model's output, such as the output format." + }, + "output_format": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaJsonOutputFormat" + }, + { + "type": "null" + } + ], + "deprecated": true, + "description": "Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)\n\nA schema to specify Claude's output format in responses. This parameter will be removed in a future release." + }, + "speed": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaSpeed" + }, + { + "type": "null" + } + ], + "description": "The inference speed mode for this request. `\"fast\"` enables high output-tokens-per-second inference." + }, + "system": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/BetaRequestTextBlock" + }, + "type": "array" + } + ], + "description": "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).", + "examples": [ + [ + { + "text": "Today's date is 2024-06-01.", + "type": "text" + } + ], + "Today's date is 2023-01-01." + ], + "title": "System" + }, + "thinking": { + "$ref": "#/components/schemas/BetaThinkingConfigParam" + }, + "tool_choice": { + "$ref": "#/components/schemas/BetaToolChoice" + }, + "tools": { + "description": "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview\\#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.", + "examples": [ + { + "description": "Get the current weather in a given location", + "input_schema": { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string" + }, + "unit": { + "description": "Unit for the output - one of (celsius, fahrenheit)", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather" + } + ], + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BetaTool" + }, + { + "$ref": "#/components/schemas/BetaBashTool_20241022" + }, + { + "$ref": "#/components/schemas/BetaBashTool_20250124" + }, + { + "$ref": "#/components/schemas/BetaCodeExecutionTool_20250522" + }, + { + "$ref": "#/components/schemas/BetaCodeExecutionTool_20250825" + }, + { + "$ref": "#/components/schemas/BetaCodeExecutionTool_20260120" + }, + { + "$ref": "#/components/schemas/BetaComputerUseTool_20241022" + }, + { + "$ref": "#/components/schemas/BetaMemoryTool_20250818" + }, + { + "$ref": "#/components/schemas/BetaComputerUseTool_20250124" + }, + { + "$ref": "#/components/schemas/BetaTextEditor_20241022" + }, + { + "$ref": "#/components/schemas/BetaComputerUseTool_20251124" + }, + { + "$ref": "#/components/schemas/BetaTextEditor_20250124" + }, + { + "$ref": "#/components/schemas/BetaTextEditor_20250429" + }, + { + "$ref": "#/components/schemas/BetaTextEditor_20250728" + }, + { + "$ref": "#/components/schemas/BetaWebSearchTool_20250305" + }, + { + "$ref": "#/components/schemas/BetaWebFetchTool_20250910" + }, + { + "$ref": "#/components/schemas/BetaWebSearchTool_20260209" + }, + { + "$ref": "#/components/schemas/BetaWebFetchTool_20260209" + }, + { + "$ref": "#/components/schemas/BetaWebFetchTool_20260309" + }, + { + "$ref": "#/components/schemas/BetaAdvisorTool_20260301" + }, + { + "$ref": "#/components/schemas/BetaToolSearchToolBM25_20251119" + }, + { + "$ref": "#/components/schemas/BetaToolSearchToolRegex_20251119" + }, + { + "$ref": "#/components/schemas/BetaMCPToolset" + } + ] + }, + "title": "Tools", + "type": "array" + } + }, + "required": [ + "messages", + "model" + ], + "title": "CountMessageTokensParams", + "type": "object" + }, + "BetaCountMessageTokensResponse": { + "properties": { + "context_management": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaContextManagementResponse" + }, + { + "type": "null" + } + ], + "description": "Information about context management applied to the message." + }, + "input_tokens": { + "type": "integer", + "title": "Input Tokens", + "description": "The total number of tokens across the provided list of messages, system prompt, and tools.", + "examples": [ + 2095 + ] + } + }, + "type": "object", + "required": [ + "context_management", + "input_tokens" + ], + "title": "CountMessageTokensResponse", + "examples": [ + { + "input_tokens": 2095 + } + ] + }, + "BetaCreateMessageBatchParams": { + "additionalProperties": false, + "properties": { + "requests": { + "description": "List of requests for prompt completion. Each is an individual request to create a Message.", + "items": { + "$ref": "#/components/schemas/BetaMessageBatchIndividualRequestParams" + }, + "maxItems": 100000, + "minItems": 1, + "title": "Requests", + "type": "array" + } + }, + "required": [ + "requests" + ], + "title": "CreateMessageBatchParams", + "type": "object" + }, + "BetaCreateMessageParams": { + "additionalProperties": false, + "example": { + "max_tokens": 1024, + "messages": [ + { + "content": "Hello, world", + "role": "user" + } + ], + "model": "claude-opus-4-6" + }, + "properties": { + "model": { + "$ref": "#/components/schemas/Model" + }, + "messages": { + "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.", + "items": { + "$ref": "#/components/schemas/BetaInputMessage" + }, + "title": "Messages", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.", + "title": "Cache Control" + }, + "container": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaContainerParams" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Container identifier for reuse across requests.", + "title": "Container" + }, + "context_management": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaContextManagementConfig" + }, + { + "type": "null" + } + ], + "description": "Context management configuration.\n\nThis allows you to control how Claude manages context across multiple requests, such as whether to clear function results or not." + }, + "diagnostics": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaDiagnosticsParam" + }, + { + "type": "null" + } + ], + "description": "Request-level diagnostics. Supply `previous_message_id` to have the response include `diagnostics.cache_miss_reason` explaining any prompt-cache divergence from that prior request." + }, + "inference_geo": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used.", + "title": "Inference Geo" + }, + "max_tokens": { + "description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nSet to `0` to populate the [prompt cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.\n\nDifferent models have different maximum values for this parameter. See [models](https://docs.claude.com/en/docs/models-overview) for details.", + "examples": [ + 1024 + ], + "minimum": 0, + "title": "Max Tokens", + "type": "integer" + }, + "mcp_servers": { + "description": "MCP servers to be utilized in this request", + "items": { + "$ref": "#/components/schemas/BetaRequestMCPServerURLDefinition" + }, + "maxItems": 20, + "title": "Mcp Servers", + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/BetaMetadata", + "description": "An object describing metadata about the request." + }, + "output_config": { + "$ref": "#/components/schemas/BetaOutputConfig", + "description": "Configuration options for the model's output, such as the output format." + }, + "output_format": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaJsonOutputFormat" + }, + { + "type": "null" + } + ], + "deprecated": true, + "description": "Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)\n\nA schema to specify Claude's output format in responses. This parameter will be removed in a future release." + }, + "service_tier": { + "description": "Determines whether to use priority capacity (if available) or standard capacity for this request.\n\nAnthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.", + "enum": [ + "auto", + "standard_only" + ], + "title": "Service Tier", + "type": "string" + }, + "speed": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaSpeed" + }, + { + "type": "null" + } + ], + "description": "The inference speed mode for this request. `\"fast\"` enables high output-tokens-per-second inference." + }, + "stop_sequences": { + "description": "Custom text sequences that will cause the model to stop generating.\n\nOur models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `\"end_turn\"`.\n\nIf you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"` and the response `stop_sequence` value will contain the matched stop sequence.", + "items": { + "type": "string" + }, + "title": "Stop Sequences", + "type": "array" + }, + "stream": { + "description": "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.claude.com/en/api/messages-streaming) for details.", + "title": "Stream", + "type": "boolean" + }, + "system": { + "anyOf": [ + { + "type": "string", + "x-stainless-skip": [ + "go" + ] + }, + { + "items": { + "$ref": "#/components/schemas/BetaRequestTextBlock" + }, + "type": "array" + } + ], + "description": "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).", + "examples": [ + [ + { + "text": "Today's date is 2024-06-01.", + "type": "text" + } + ], + "Today's date is 2023-01-01." + ], + "title": "System" + }, + "temperature": { + "deprecated": true, + "description": "Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic.", + "examples": [ + 1 + ], + "maximum": 1, + "minimum": 0, + "title": "Temperature", + "type": "number", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not support setting temperature. A value of 1.0 of will be accepted for backwards compatibility, all other values will be rejected with a 400 error." + }, + "thinking": { + "$ref": "#/components/schemas/BetaThinkingConfigParam" + }, + "tool_choice": { + "$ref": "#/components/schemas/BetaToolChoice" + }, + "tools": { + "description": "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview\\#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.", + "examples": [ + { + "description": "Get the current weather in a given location", + "input_schema": { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string" + }, + "unit": { + "description": "Unit for the output - one of (celsius, fahrenheit)", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather" + } + ], + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BetaTool" + }, + { + "$ref": "#/components/schemas/BetaBashTool_20241022" + }, + { + "$ref": "#/components/schemas/BetaBashTool_20250124" + }, + { + "$ref": "#/components/schemas/BetaCodeExecutionTool_20250522" + }, + { + "$ref": "#/components/schemas/BetaCodeExecutionTool_20250825" + }, + { + "$ref": "#/components/schemas/BetaCodeExecutionTool_20260120" + }, + { + "$ref": "#/components/schemas/BetaComputerUseTool_20241022" + }, + { + "$ref": "#/components/schemas/BetaMemoryTool_20250818" + }, + { + "$ref": "#/components/schemas/BetaComputerUseTool_20250124" + }, + { + "$ref": "#/components/schemas/BetaTextEditor_20241022" + }, + { + "$ref": "#/components/schemas/BetaComputerUseTool_20251124" + }, + { + "$ref": "#/components/schemas/BetaTextEditor_20250124" + }, + { + "$ref": "#/components/schemas/BetaTextEditor_20250429" + }, + { + "$ref": "#/components/schemas/BetaTextEditor_20250728" + }, + { + "$ref": "#/components/schemas/BetaWebSearchTool_20250305" + }, + { + "$ref": "#/components/schemas/BetaWebFetchTool_20250910" + }, + { + "$ref": "#/components/schemas/BetaWebSearchTool_20260209" + }, + { + "$ref": "#/components/schemas/BetaWebFetchTool_20260209" + }, + { + "$ref": "#/components/schemas/BetaWebFetchTool_20260309" + }, + { + "$ref": "#/components/schemas/BetaAdvisorTool_20260301" + }, + { + "$ref": "#/components/schemas/BetaToolSearchToolBM25_20251119" + }, + { + "$ref": "#/components/schemas/BetaToolSearchToolRegex_20251119" + }, + { + "$ref": "#/components/schemas/BetaMCPToolset" + } + ] + }, + "title": "Tools", + "type": "array" + }, + "top_k": { + "deprecated": true, + "description": "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only.", + "examples": [ + 5 + ], + "minimum": 0, + "title": "Top K", + "type": "integer", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value will be rejected with a 400 error." + }, + "top_p": { + "deprecated": true, + "description": "Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`.\n\nRecommended for advanced use cases only.", + "examples": [ + 0.7 + ], + "maximum": 1, + "minimum": 0, + "title": "Top P", + "type": "number", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not support setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all other values will be rejected with a 400 error." + }, + "user_profile_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization.", + "title": "User Profile Id" + } + }, + "required": [ + "model", + "messages", + "max_tokens" + ], + "title": "CreateMessageParams", + "type": "object" + }, + "BetaCreateSkillResponse": { + "properties": { + "created_at": { + "type": "string", + "title": "Created At", + "description": "ISO 8601 timestamp of when the skill was created.", + "examples": [ + "2024-10-30T23:58:27.427722Z" + ] + }, + "display_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Title", + "description": "Display title for the skill.\n\nThis is a human-readable label that is not included in the prompt sent to the model.", + "examples": [ + "My Custom Skill" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "examples": [ + "skill_01JAbcdefghijklmnopqrstuvw" + ] + }, + "latest_version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Latest Version", + "description": "The latest version identifier for the skill.\n\nThis represents the most recent version of the skill that has been created.", + "examples": [ + "1759178010641129" + ] + }, + "source": { + "type": "string", + "title": "Source", + "description": "Source of the skill.\n\nThis may be one of the following values:\n* `\"custom\"`: the skill was created by a user\n* `\"anthropic\"`: the skill was created by Anthropic", + "examples": [ + "custom" + ] + }, + "type": { + "type": "string", + "title": "Type", + "description": "Object type.\n\nFor Skills, this is always `\"skill\"`.", + "default": "skill" + }, + "updated_at": { + "type": "string", + "title": "Updated At", + "description": "ISO 8601 timestamp of when the skill was last updated.", + "examples": [ + "2024-10-30T23:58:27.427722Z" + ] + } + }, + "type": "object", + "required": [ + "created_at", + "display_title", + "id", + "latest_version", + "source", + "type", + "updated_at" + ], + "title": "CreateSkillResponse" + }, + "BetaCreateSkillVersionResponse": { + "properties": { + "created_at": { + "type": "string", + "title": "Created At", + "description": "ISO 8601 timestamp of when the skill version was created.", + "examples": [ + "2024-10-30T23:58:27.427722Z" + ] + }, + "description": { + "type": "string", + "title": "Description", + "description": "Description of the skill version.\n\nThis is extracted from the SKILL.md file in the skill upload.", + "examples": [ + "A custom skill for doing something useful" + ] + }, + "directory": { + "type": "string", + "title": "Directory", + "description": "Directory name of the skill version.\n\nThis is the top-level directory name that was extracted from the uploaded files.", + "examples": [ + "my-skill" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique identifier for the skill version.\n\nThe format and length of IDs may change over time.", + "examples": [ + "skillver_01JAbcdefghijklmnopqrstuvw" + ] + }, + "name": { + "type": "string", + "title": "Name", + "description": "Human-readable name of the skill version.\n\nThis is extracted from the SKILL.md file in the skill upload.", + "examples": [ + "my-skill" + ] + }, + "skill_id": { + "type": "string", + "title": "Skill Id", + "description": "Identifier for the skill that this version belongs to.", + "examples": [ + "skill_01JAbcdefghijklmnopqrstuvw" + ] + }, + "type": { + "type": "string", + "title": "Type", + "description": "Object type.\n\nFor Skill Versions, this is always `\"skill_version\"`.", + "default": "skill_version" + }, + "version": { + "type": "string", + "title": "Version", + "description": "Version identifier for the skill.\n\nEach version is identified by a Unix epoch timestamp (e.g., \"1759178010641129\").", + "examples": [ + "1759178010641129" + ] + } + }, + "type": "object", + "required": [ + "created_at", + "description", + "directory", + "id", + "name", + "skill_id", + "type", + "version" + ], + "title": "CreateSkillVersionResponse" + }, + "BetaCreateUserProfileRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "external_id": { + "description": "Platform's own identifier for this user. Not enforced unique. Maximum 255 characters.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true, + "examples": [ + "user_12345" + ] + }, + "name": { + "description": "Display name of the entity this profile represents. Required when relationship is `resold` (the resold-to company's name); optional otherwise. Maximum 255 characters.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true + }, + "relationship": { + "description": "How the entity relates to the platform. `external` (default): an individual end-user. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaUserProfileRelationship" + } + ] + }, + "metadata": { + "description": "Free-form key-value data to attach to this user profile. Maximum 16 keys, with keys up to 64 characters and values up to 512 characters. Values must be non-empty strings.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "examples": [ + {} + ] + } + }, + "example": { + "external_id": "user_12345", + "metadata": {} + } + }, + "BetaDeleteMessageBatchResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "ID of the Message Batch.", + "examples": [ + "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF" + ] + }, + "type": { + "type": "string", + "const": "message_batch_deleted", + "title": "Type", + "description": "Deleted object type.\n\nFor Message Batches, this is always `\"message_batch_deleted\"`.", + "default": "message_batch_deleted" + } + }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "DeleteMessageBatchResponse" + }, + "BetaDeleteSkillResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "examples": [ + "skill_01JAbcdefghijklmnopqrstuvw" + ] + }, + "type": { + "type": "string", + "title": "Type", + "description": "Deleted object type.\n\nFor Skills, this is always `\"skill_deleted\"`.", + "default": "skill_deleted" + } + }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "DeleteSkillResponse" + }, + "BetaDeleteSkillVersionResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Version identifier for the skill.\n\nEach version is identified by a Unix epoch timestamp (e.g., \"1759178010641129\").", + "examples": [ + "1759178010641129" + ] + }, + "type": { + "type": "string", + "title": "Type", + "description": "Deleted object type.\n\nFor Skill Versions, this is always `\"skill_version_deleted\"`.", + "default": "skill_version_deleted" + } + }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "DeleteSkillVersionResponse" + }, + "BetaDiagnostics": { + "description": "Response envelope for request-level diagnostics. Present (possibly\nnull) whenever the caller supplied `diagnostics` on the request.", + "properties": { + "cache_miss_reason": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "messages_changed": "#/components/schemas/BetaCacheMissMessagesChanged", + "model_changed": "#/components/schemas/BetaCacheMissModelChanged", + "previous_message_not_found": "#/components/schemas/BetaCacheMissPreviousMessageNotFound", + "system_changed": "#/components/schemas/BetaCacheMissSystemChanged", + "tools_changed": "#/components/schemas/BetaCacheMissToolsChanged", + "unavailable": "#/components/schemas/BetaCacheMissUnavailable" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheMissModelChanged" + }, + { + "$ref": "#/components/schemas/BetaCacheMissSystemChanged" + }, + { + "$ref": "#/components/schemas/BetaCacheMissToolsChanged" + }, + { + "$ref": "#/components/schemas/BetaCacheMissMessagesChanged" + }, + { + "$ref": "#/components/schemas/BetaCacheMissPreviousMessageNotFound" + }, + { + "$ref": "#/components/schemas/BetaCacheMissUnavailable" + } + ] + }, + { + "type": "null" + } + ], + "default": null, + "description": "Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed.", + "title": "Cache Miss Reason" + } + }, + "required": [ + "cache_miss_reason" + ], + "title": "Diagnostics", + "type": "object" + }, + "BetaDiagnosticsParam": { + "additionalProperties": false, + "description": "Request-level diagnostics. Currently carries the previous response\nid for prompt-cache divergence reporting.", + "properties": { + "previous_message_id": { + "anyOf": [ + { + "maxLength": 256, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The `id` (`msg_...`) from this client's previous /v1/messages response. The server compares that request's prompt fingerprint against this one and returns `diagnostics.cache_miss_reason` when the prompt-cache prefix could not be reused. Pass `null` on the first turn to opt in without a prior message to compare.", + "title": "Previous Message Id" + } + }, + "title": "DiagnosticsParam", + "type": "object" + }, + "BetaDirectCaller": { + "additionalProperties": false, + "description": "Tool invocation directly from the model.", + "properties": { + "type": { + "const": "direct", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "DirectCaller", + "type": "object" + }, + "BetaEffortCapability": { + "properties": { + "high": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model supports high effort level." + }, + "low": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model supports low effort level." + }, + "max": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model supports max effort level." + }, + "medium": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model supports medium effort level." + }, + "supported": { + "type": "boolean", + "title": "Supported", + "description": "Whether this capability is supported by the model." + }, + "xhigh": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaCapabilitySupport" + }, + { + "type": "null" + } + ], + "description": "Whether the model supports xhigh effort level." + } + }, + "type": "object", + "required": [ + "high", + "low", + "max", + "medium", + "supported", + "xhigh" + ], + "title": "EffortCapability", + "description": "Effort (reasoning_effort) capability details." + }, + "BetaEffortLevel": { + "description": "All possible effort levels.", + "enum": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "title": "EffortLevel", + "type": "string" + }, + "BetaEnrollmentUrl": { + "type": "object", + "additionalProperties": false, + "required": [ + "url", + "expires_at", + "type" + ], + "properties": { + "url": { + "description": "Enrollment URL to send to the end user. Valid until `expires_at`.", + "type": "string", + "examples": [ + "https://platform.claude.com/user-profiles/enrollment/M3J0bGJxZ2ppMnptbnB1" + ] + }, + "expires_at": { + "description": "When this enrollment URL expires, in RFC 3339 format.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:15:00Z" + ] + }, + "type": { + "description": "Object type. Always `enrollment_url`.", + "type": "string", + "enum": [ + "enrollment_url" + ], + "examples": [ + "enrollment_url" + ] + } + }, + "example": { + "type": "enrollment_url", + "url": "https://platform.claude.com/user-profiles/enrollment/M3J0bGJxZ2ppMnptbnB1", + "expires_at": "2026-03-15T10:15:00Z" + } + }, + "BetaEnvironment": { + "properties": { + "archived_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Archived At", + "description": "RFC 3339 timestamp when environment was archived, or null if not archived", + "examples": [ + null + ] + }, + "config": { + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCloudConfig" + }, + { + "$ref": "#/components/schemas/BetaSelfHostedConfig" + } + ], + "title": "Config", + "description": "Environment configuration (either Anthropic Cloud or self-hosted)", + "discriminator": { + "propertyName": "type", + "mapping": { + "cloud": "#/components/schemas/BetaCloudConfig", + "self_hosted": "#/components/schemas/BetaSelfHostedConfig" + } + }, + "examples": [ + { + "type": "cloud", + "networking": { + "type": "limited", + "allowed_hosts": [ + "api.example.com" + ], + "allow_package_managers": true, + "allow_mcp_servers": false + }, + "packages": { + "type": "packages", + "pip": [ + "pandas", + "numpy" + ], + "npm": [], + "apt": [], + "cargo": [], + "gem": [], + "go": [] + } + } + ] + }, + "created_at": { + "type": "string", + "title": "Created At", + "description": "RFC 3339 timestamp when environment was created", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "description": { + "type": "string", + "title": "Description", + "description": "User-provided description for the environment", + "examples": [ + "Python environment with data-analysis packages." + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Environment identifier (e.g., 'env_...')", + "examples": [ + "env_011CZkZ9X2dpNyB7HsEFoRfW" + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Metadata", + "description": "User-provided metadata key-value pairs", + "examples": [ + { + "key": "value" + } + ] + }, + "name": { + "type": "string", + "title": "Name", + "description": "Human-readable name for the environment", + "examples": [ + "python-data-analysis" + ] + }, + "scope": { + "type": "string", + "enum": [ + "organization", + "account" + ], + "title": "Scope", + "description": "The visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account." + }, + "type": { + "type": "string", + "const": "environment", + "title": "Type", + "description": "The type of object (always 'environment')", + "default": "environment", + "examples": [ + "environment" + ] + }, + "updated_at": { + "type": "string", + "title": "Updated At", + "description": "RFC 3339 timestamp when environment was last updated", + "examples": [ + "2026-03-15T10:00:00Z" + ] + } + }, + "type": "object", + "required": [ + "archived_at", + "config", + "created_at", + "description", + "id", + "metadata", + "name", + "type", + "updated_at" + ], + "title": "Environment", + "description": "Unified Environment resource for both cloud and self-hosted environments.", + "example": { + "type": "environment", + "id": "env_011CZkZ9X2dpNyB7HsEFoRfW", + "name": "python-data-analysis", + "description": "Python environment with data-analysis packages.", + "config": { + "type": "cloud", + "networking": { + "type": "limited", + "allowed_hosts": [ + "api.example.com" + ], + "allow_package_managers": true, + "allow_mcp_servers": false + }, + "packages": { + "type": "packages", + "pip": [ + "pandas", + "numpy" + ], + "npm": [], + "apt": [], + "cargo": [], + "gem": [], + "go": [] + } + }, + "metadata": {}, + "archived_at": null, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + } + }, + "BetaEnvironmentDeleteResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Environment identifier", + "examples": [ + "env_011CZkZ9X2dpNyB7HsEFoRfW" + ] + }, + "type": { + "type": "string", + "const": "environment_deleted", + "title": "Type", + "description": "The type of response", + "default": "environment_deleted", + "examples": [ + "environment_deleted" + ] + } + }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "EnvironmentDeleteResponse", + "description": "Response after deleting an environment.", + "example": { + "type": "environment_deleted", + "id": "env_011CZkZ9X2dpNyB7HsEFoRfW" + } + }, + "BetaEnvironmentListResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/BetaEnvironment" + }, + "type": "array", + "title": "Data", + "description": "List of environments.", + "x-stainless-pagination-property": { + "purpose": "items" + } + }, + "next_page": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page", + "description": "Token for fetching the next page of results. If `null`, there are no more results available. Pass this value to the `page` parameter in the next request.", + "examples": [ + "page_MjAyNS0wNS0xNFQwMDowMDowMFo=", + null + ], + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + } + } + }, + "type": "object", + "required": [ + "data", + "next_page" + ], + "title": "EnvironmentListResponse", + "description": "Response when listing environments.\n\nThis response model uses opaque cursor-based pagination. Use the `page`\nquery parameter with the value from `next_page` to fetch the next page." + }, + "BetaErrorResponse": { + "properties": { + "error": { + "discriminator": { + "mapping": { + "api_error": "#/components/schemas/BetaAPIError", + "authentication_error": "#/components/schemas/BetaAuthenticationError", + "billing_error": "#/components/schemas/BetaBillingError", + "invalid_request_error": "#/components/schemas/BetaInvalidRequestError", + "not_found_error": "#/components/schemas/BetaNotFoundError", + "overloaded_error": "#/components/schemas/BetaOverloadedError", + "permission_error": "#/components/schemas/BetaPermissionError", + "rate_limit_error": "#/components/schemas/BetaRateLimitError", + "timeout_error": "#/components/schemas/BetaGatewayTimeoutError" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaInvalidRequestError" + }, + { + "$ref": "#/components/schemas/BetaAuthenticationError" + }, + { + "$ref": "#/components/schemas/BetaBillingError" + }, + { + "$ref": "#/components/schemas/BetaPermissionError" + }, + { + "$ref": "#/components/schemas/BetaNotFoundError" + }, + { + "$ref": "#/components/schemas/BetaRateLimitError" + }, + { + "$ref": "#/components/schemas/BetaGatewayTimeoutError" + }, + { + "$ref": "#/components/schemas/BetaAPIError" + }, + { + "$ref": "#/components/schemas/BetaOverloadedError" + } + ], + "title": "Error" + }, + "request_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Request Id" + }, + "type": { + "const": "error", + "default": "error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error", + "request_id", + "type" + ], + "title": "ErrorResponse", + "type": "object" + }, + "BetaErrorType": { + "enum": [ + "invalid_request_error", + "authentication_error", + "permission_error", + "not_found_error", + "rate_limit_error", + "timeout_error", + "overloaded_error", + "api_error", + "billing_error" + ], + "title": "ErrorType", + "type": "string" + }, + "BetaErroredResult": { + "properties": { + "error": { + "$ref": "#/components/schemas/BetaErrorResponse" + }, + "type": { + "const": "errored", + "default": "errored", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error", + "type" + ], + "title": "ErroredResult", + "type": "object" + }, + "BetaExpiredResult": { + "properties": { + "type": { + "const": "expired", + "default": "expired", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ExpiredResult", + "type": "object" + }, + "BetaFileDeleteResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "ID of the deleted file.", + "examples": [ + "file_011CNha8iCJcU1wXNR6q4V8w" + ] + }, + "type": { + "type": "string", + "const": "file_deleted", + "title": "Type", + "description": "Deleted object type.\n\nFor file deletion, this is always `\"file_deleted\"`.", + "default": "file_deleted" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "FileDeleteResponse" + }, + "BetaFileDocumentSource": { + "additionalProperties": false, + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "file", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "FileDocumentSource", + "type": "object" + }, + "BetaFileImageSource": { + "additionalProperties": false, + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "file", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "FileImageSource", + "type": "object" + }, + "BetaFileListResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/BetaFileMetadataSchema" + }, + "type": "array", + "title": "Data", + "description": "List of file metadata objects." + }, + "first_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Id", + "description": "ID of the first file in this page of results.", + "examples": [ + "file_011CNha8iCJcU1wXNR6q4V8w" + ] + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Whether there are more results available.", + "default": false + }, + "last_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Id", + "description": "ID of the last file in this page of results.", + "examples": [ + "file_013Zva2CMHLNnXjNJJKqJ2EF" + ] + } + }, + "type": "object", + "required": [ + "data" + ], + "title": "FileListResponse" + }, + "BetaFileMetadataSchema": { + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At", + "description": "RFC 3339 datetime string representing when the file was created.", + "examples": [ + "2025-04-15T18:37:24.100435Z" + ] + }, + "downloadable": { + "type": "boolean", + "title": "Downloadable", + "description": "Whether the file can be downloaded.", + "default": false, + "examples": [ + false + ] + }, + "filename": { + "type": "string", + "maxLength": 500, + "minLength": 1, + "title": "Filename", + "description": "Original filename of the uploaded file.", + "examples": [ + "document.pdf" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique object identifier.\n\nThe format and length of IDs may change over time.", + "examples": [ + "file_011CNha8iCJcU1wXNR6q4V8w" + ] + }, + "mime_type": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "title": "Mime Type", + "description": "MIME type of the file.", + "examples": [ + "application/pdf" + ] + }, + "scope": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaFileScope" + }, + { + "type": "null" + } + ], + "description": "The scope of this file, indicating the context in which it was created (e.g., a session)." + }, + "size_bytes": { + "type": "integer", + "minimum": 0, + "title": "Size Bytes", + "description": "Size of the file in bytes.", + "examples": [ + 102400 + ] + }, + "type": { + "type": "string", + "const": "file", + "title": "Type", + "description": "Object type.\n\nFor files, this is always `\"file\"`." + } + }, + "type": "object", + "required": [ + "created_at", + "filename", + "id", + "mime_type", + "size_bytes", + "type" + ], + "title": "FileMetadataSchema" + }, + "BetaFileScope": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the scoping resource (e.g., the session ID)." + }, + "type": { + "type": "string", + "const": "session", + "title": "Type", + "description": "The type of scope (e.g., `\"session\"`)." + } + }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "FileScope" + }, + "BetaGatewayTimeoutError": { + "properties": { + "message": { + "default": "Request timeout", + "title": "Message", + "type": "string" + }, + "type": { + "const": "timeout_error", + "default": "timeout_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "GatewayTimeoutError", + "type": "object" + }, + "BetaGetSkillResponse": { + "properties": { + "created_at": { + "type": "string", + "title": "Created At", + "description": "ISO 8601 timestamp of when the skill was created.", + "examples": [ + "2024-10-30T23:58:27.427722Z" + ] + }, + "display_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Title", + "description": "Display title for the skill.\n\nThis is a human-readable label that is not included in the prompt sent to the model.", + "examples": [ + "My Custom Skill" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "examples": [ + "skill_01JAbcdefghijklmnopqrstuvw" + ] + }, + "latest_version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Latest Version", + "description": "The latest version identifier for the skill.\n\nThis represents the most recent version of the skill that has been created.", + "examples": [ + "1759178010641129" + ] + }, + "source": { + "type": "string", + "title": "Source", + "description": "Source of the skill.\n\nThis may be one of the following values:\n* `\"custom\"`: the skill was created by a user\n* `\"anthropic\"`: the skill was created by Anthropic", + "examples": [ + "custom" + ] + }, + "type": { + "type": "string", + "title": "Type", + "description": "Object type.\n\nFor Skills, this is always `\"skill\"`.", + "default": "skill" + }, + "updated_at": { + "type": "string", + "title": "Updated At", + "description": "ISO 8601 timestamp of when the skill was last updated.", + "examples": [ + "2024-10-30T23:58:27.427722Z" + ] + } + }, + "type": "object", + "required": [ + "created_at", + "display_title", + "id", + "latest_version", + "source", + "type", + "updated_at" + ], + "title": "GetSkillResponse" + }, + "BetaGetSkillVersionResponse": { + "properties": { + "created_at": { + "type": "string", + "title": "Created At", + "description": "ISO 8601 timestamp of when the skill version was created.", + "examples": [ + "2024-10-30T23:58:27.427722Z" + ] + }, + "description": { + "type": "string", + "title": "Description", + "description": "Description of the skill version.\n\nThis is extracted from the SKILL.md file in the skill upload.", + "examples": [ + "A custom skill for doing something useful" + ] + }, + "directory": { + "type": "string", + "title": "Directory", + "description": "Directory name of the skill version.\n\nThis is the top-level directory name that was extracted from the uploaded files.", + "examples": [ + "my-skill" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique identifier for the skill version.\n\nThe format and length of IDs may change over time.", + "examples": [ + "skillver_01JAbcdefghijklmnopqrstuvw" + ] + }, + "name": { + "type": "string", + "title": "Name", + "description": "Human-readable name of the skill version.\n\nThis is extracted from the SKILL.md file in the skill upload.", + "examples": [ + "my-skill" + ] + }, + "skill_id": { + "type": "string", + "title": "Skill Id", + "description": "Identifier for the skill that this version belongs to.", + "examples": [ + "skill_01JAbcdefghijklmnopqrstuvw" + ] + }, + "type": { + "type": "string", + "title": "Type", + "description": "Object type.\n\nFor Skill Versions, this is always `\"skill_version\"`.", + "default": "skill_version" + }, + "version": { + "type": "string", + "title": "Version", + "description": "Version identifier for the skill.\n\nEach version is identified by a Unix epoch timestamp (e.g., \"1759178010641129\").", + "examples": [ + "1759178010641129" + ] + } + }, + "type": "object", + "required": [ + "created_at", + "description", + "directory", + "id", + "name", + "skill_id", + "type", + "version" + ], + "title": "GetSkillVersionResponse" + }, + "BetaInputJsonContentBlockDelta": { + "properties": { + "partial_json": { + "title": "Partial Json", + "type": "string" + }, + "type": { + "const": "input_json_delta", + "default": "input_json_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "partial_json", + "type" + ], + "title": "InputJsonContentBlockDelta", + "type": "object" + }, + "BetaInputMessage": { + "additionalProperties": false, + "properties": { + "content": { + "anyOf": [ + { + "type": "string", + "x-stainless-skip": [ + "go", + "cli" + ] + }, + { + "items": { + "$ref": "#/components/schemas/BetaInputContentBlock" + }, + "type": "array", + "example": [ + { + "type": "text", + "text": "What is a quaternion?" + } + ] + } + ], + "title": "Content" + }, + "role": { + "enum": [ + "user", + "assistant" + ], + "title": "Role", + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "title": "InputMessage", + "type": "object", + "discriminator": { + "propertyName": "role" + } + }, + "BetaInputSchema": { + "additionalProperties": true, + "properties": { + "properties": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Properties" + }, + "required": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Required" + }, + "type": { + "const": "object", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "InputSchema", + "type": "object" + }, + "BetaInputTokensClearAtLeast": { + "additionalProperties": false, + "properties": { + "type": { + "const": "input_tokens", + "title": "Type", + "type": "string" + }, + "value": { + "minimum": 0, + "title": "Value", + "type": "integer" + } + }, + "required": [ + "type", + "value" + ], + "title": "InputTokensClearAtLeast", + "type": "object" + }, + "BetaInputTokensTrigger": { + "additionalProperties": false, + "properties": { + "type": { + "const": "input_tokens", + "title": "Type", + "type": "string" + }, + "value": { + "minimum": 1, + "title": "Value", + "type": "integer" + } + }, + "required": [ + "type", + "value" + ], + "title": "InputTokensTrigger", + "type": "object" + }, + "BetaInvalidRequestError": { + "properties": { + "message": { + "default": "Invalid request", + "title": "Message", + "type": "string" + }, + "type": { + "const": "invalid_request_error", + "default": "invalid_request_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "InvalidRequestError", + "type": "object" + }, + "BetaJsonOutputFormat": { + "additionalProperties": false, + "properties": { + "schema": { + "additionalProperties": true, + "description": "The JSON schema of the format", + "title": "Schema", + "type": "object" + }, + "type": { + "const": "json_schema", + "title": "Type", + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "title": "JsonOutputFormat", + "type": "object" + }, + "BetaJsonValue": {}, + "BetaLimitedNetwork": { + "properties": { + "allow_mcp_servers": { + "type": "boolean", + "title": "Allow Mcp Servers", + "description": "Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array." + }, + "allow_package_managers": { + "type": "boolean", + "title": "Allow Package Managers", + "description": "Permits outbound access to public package registries (PyPI, npm, etc.) beyond those listed in the `allowed_hosts` array." + }, + "allowed_hosts": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Allowed Hosts", + "description": "Specifies domains the container can reach." + }, + "type": { + "type": "string", + "const": "limited", + "title": "Type", + "description": "Network policy type" + } + }, + "type": "object", + "required": [ + "allow_mcp_servers", + "allow_package_managers", + "allowed_hosts", + "type" + ], + "title": "LimitedNetwork", + "description": "Limited network access." + }, + "BetaLimitedNetworkParams": { + "properties": { + "allow_mcp_servers": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Allow Mcp Servers", + "description": "Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array. Defaults to `false`." + }, + "allow_package_managers": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Allow Package Managers", + "description": "Permits outbound access to public package registries (PyPI, npm, etc.) beyond those listed in the `allowed_hosts` array. Defaults to `false`." + }, + "allowed_hosts": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Hosts", + "description": "Specifies domains the container can reach." + }, + "type": { + "type": "string", + "const": "limited", + "title": "Type", + "description": "Network policy type" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "type" + ], + "title": "LimitedNetworkParams", + "description": "Limited network request params.\n\nFields default to null; on update, omitted fields preserve the\nexisting value." + }, + "BetaListResponse_MessageBatch_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/BetaMessageBatch" + }, + "type": "array", + "title": "Data" + }, + "first_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Id", + "description": "First ID in the `data` list. Can be used as the `before_id` for the previous page." + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Indicates if there are more results in the requested page direction." + }, + "last_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Id", + "description": "Last ID in the `data` list. Can be used as the `after_id` for the next page." + } + }, + "type": "object", + "required": [ + "data", + "first_id", + "has_more", + "last_id" + ], + "title": "ListResponse[MessageBatch]" + }, + "BetaListResponse_ModelInfo_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/BetaModelInfo" + }, + "type": "array", + "title": "Data" + }, + "first_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Id", + "description": "First ID in the `data` list. Can be used as the `before_id` for the previous page." + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Indicates if there are more results in the requested page direction." + }, + "last_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Id", + "description": "Last ID in the `data` list. Can be used as the `after_id` for the next page." + } + }, + "type": "object", + "required": [ + "data", + "first_id", + "has_more", + "last_id" + ], + "title": "ListResponse[ModelInfo]" + }, + "BetaListSkillVersionsResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/BetaSkillVersion" + }, + "type": "array", + "title": "Data", + "description": "List of skill versions.", + "x-stainless-pagination-property": { + "purpose": "items" + } + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Indicates if there are more results in the requested page direction." + }, + "next_page": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page", + "description": "Token to provide in as `page` in the subsequent request to retrieve the next page of data.", + "examples": [ + "page_MjAyNS0wNS0xNFQwMDowMDowMFo=", + null + ], + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + } + } + }, + "type": "object", + "required": [ + "data", + "has_more", + "next_page" + ], + "title": "ListSkillVersionsResponse" + }, + "BetaListSkillsResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/Betaapi__schemas__skills__Skill" + }, + "type": "array", + "title": "Data", + "description": "List of skills.", + "x-stainless-pagination-property": { + "purpose": "items" + } + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Whether there are more results available.\n\nIf `true`, there are additional results that can be fetched using the `next_page` token." + }, + "next_page": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page", + "description": "Token for fetching the next page of results.\n\nIf `null`, there are no more results available. Pass this value to the `page_token` parameter in the next request to get the next page.", + "examples": [ + "page_MjAyNS0wNS0xNFQwMDowMDowMFo=", + null + ], + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + } + } + }, + "type": "object", + "required": [ + "data", + "has_more", + "next_page" + ], + "title": "ListSkillsResponse" + }, + "BetaListUserProfilesResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "data", + "next_page" + ], + "properties": { + "data": { + "description": "User profiles on this page.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaUserProfile" + }, + "examples": [ + [ + { + "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", + "type": "user_profile", + "external_id": "user_12345", + "name": "Example User", + "relationship": "external", + "trust_grants": { + "cyber": { + "status": "active" + } + }, + "metadata": {}, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + } + ] + ] + }, + "next_page": { + "description": "Cursor for the next page, or `null` when there are no more results.", + "type": "string", + "nullable": true, + "examples": [ + "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + ] + } + }, + "example": { + "data": [ + { + "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", + "type": "user_profile", + "external_id": "user_12345", + "name": "Example User", + "relationship": "external", + "trust_grants": { + "cyber": { + "status": "active" + } + }, + "metadata": {}, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + } + ], + "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + } + }, + "BetaMCPToolConfig": { + "additionalProperties": false, + "description": "Configuration for a specific tool in an MCP toolset.", + "properties": { + "defer_loading": { + "title": "Defer Loading", + "type": "boolean" + }, + "enabled": { + "title": "Enabled", + "type": "boolean" + } + }, + "title": "MCPToolConfig", + "type": "object" + }, + "BetaMCPToolDefaultConfig": { + "additionalProperties": false, + "description": "Default configuration for tools in an MCP toolset.", + "properties": { + "defer_loading": { + "title": "Defer Loading", + "type": "boolean" + }, + "enabled": { + "title": "Enabled", + "type": "boolean" + } + }, + "title": "MCPToolDefaultConfig", + "type": "object" + }, + "BetaMCPToolset": { + "additionalProperties": false, + "description": "Configuration for a group of tools from an MCP server.\n\nAllows configuring enabled status and defer_loading for all tools\nfrom an MCP server, with optional per-tool overrides.", + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "configs": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/BetaMCPToolConfig" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "description": "Configuration overrides for specific tools, keyed by tool name", + "title": "Configs" + }, + "default_config": { + "$ref": "#/components/schemas/BetaMCPToolDefaultConfig", + "description": "Default configuration applied to all tools from this server" + }, + "mcp_server_name": { + "description": "Name of the MCP server to configure tools for", + "maxLength": 255, + "minLength": 1, + "title": "Mcp Server Name", + "type": "string" + }, + "type": { + "const": "mcp_toolset", + "title": "Type", + "type": "string" + } + }, + "required": [ + "mcp_server_name", + "type" + ], + "title": "MCPToolset", + "type": "object" + }, + "BetaManagedAgentsActor": { + "description": "Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/en/api/sessions-retrieve).", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "session_actor": "#/components/schemas/BetaManagedAgentsSessionActor", + "api_actor": "#/components/schemas/BetaManagedAgentsApiActor", + "user_actor": "#/components/schemas/BetaManagedAgentsUserActor" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionActor" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsApiActor" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserActor" + } + ] + }, + "BetaManagedAgentsAddSessionResource": { + "description": "The added session resource.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "file": "#/components/schemas/BetaManagedAgentsFileResource" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsFileResource" + } + ] + }, + "BetaManagedAgentsAddSessionResourceParams": { + "description": "Request parameters for adding a resource to a session.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "file": "#/components/schemas/BetaManagedAgentsFileResourceParams" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsFileResourceParams" + } + ], + "example": { + "type": "file", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", + "mount_path": "/uploads/receipt.pdf" + } + }, + "BetaManagedAgentsAgent": { + "description": "A Managed Agents `agent`.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "version", + "name", + "description", + "model", + "system", + "tools", + "mcp_servers", + "skills", + "metadata", + "created_at", + "updated_at", + "archived_at", + "multiagent" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent" + ], + "examples": [ + "agent" + ] + }, + "id": { + "type": "string", + "examples": [ + "agent_011CZkYpogX7uDKUyvBTophP" + ] + }, + "version": { + "description": "The agent's current version. Starts at 1 and increments when the agent is modified.", + "type": "integer", + "format": "int32", + "examples": [ + 1 + ] + }, + "name": { + "type": "string", + "examples": [ + "My First Agent" + ] + }, + "description": { + "type": "string", + "nullable": true, + "examples": [ + "A general-purpose starter agent." + ] + }, + "model": { + "$ref": "#/components/schemas/BetaManagedAgentsModelConfig", + "examples": [ + { + "id": "claude-sonnet-4-6", + "speed": "standard" + } + ] + }, + "system": { + "type": "string", + "nullable": true, + "examples": [ + "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end." + ] + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentTool" + }, + "examples": [ + [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ] + ] + }, + "mcp_servers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMCPServer" + }, + "examples": [ + [ + { + "type": "url", + "name": "example-mcp", + "url": "https://example-server.modelcontextprotocol.io/sse" + } + ] + ] + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSkill" + }, + "examples": [ + [ + { + "type": "anthropic", + "skill_id": "xlsx", + "version": "1" + }, + { + "type": "custom", + "skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx", + "version": "2" + } + ] + ] + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "examples": [ + { + "foo": "bar" + } + ] + }, + "created_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "updated_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "archived_at": { + "description": "When the agent was archived. Null if not archived.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true, + "examples": [ + null + ] + }, + "multiagent": { + "description": "Multiagent orchestration configuration. Null when the agent is single-threaded.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMultiagent" + } + ], + "nullable": true, + "examples": [ + null + ] + } + }, + "example": { + "type": "agent", + "id": "agent_011CZkYpogX7uDKUyvBTophP", + "version": 1, + "name": "My First Agent", + "description": "A general-purpose starter agent.", + "model": { + "id": "claude-sonnet-4-6", + "speed": "standard" + }, + "system": "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.", + "tools": [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ], + "mcp_servers": [ + { + "type": "url", + "name": "example-mcp", + "url": "https://example-server.modelcontextprotocol.io/sse" + } + ], + "skills": [ + { + "type": "anthropic", + "skill_id": "xlsx", + "version": "1" + }, + { + "type": "custom", + "skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx", + "version": "2" + } + ], + "multiagent": null, + "metadata": { + "foo": "bar" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null + } + }, + "BetaManagedAgentsAgentCustomToolUseEvent": { + "description": "Event emitted when the agent calls a custom tool. The session goes idle until the client sends a `user.custom_tool_result` event with the result.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "name", + "input", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent.custom_tool_use" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "name": { + "description": "Name of the custom tool being called.", + "type": "string" + }, + "input": { + "description": "Input parameters for the tool call.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsStruct" + } + ] + }, + "processed_at": { + "description": "Timestamp when this tool use was processed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "session_thread_id": { + "description": "When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Echo this on a `user.custom_tool_result` event to route the result back.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsAgentEvaluatedPermission": { + "type": "string", + "description": "AgentEvaluatedPermission enum", + "enum": [ + "allow", + "ask", + "deny" + ] + }, + "BetaManagedAgentsAgentMcpToolResultEvent": { + "description": "Event representing the result of an MCP tool execution.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "mcp_tool_use_id", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent.mcp_tool_result" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "mcp_tool_use_id": { + "description": "The id of the `agent.mcp_tool_use` event this result corresponds to.", + "type": "string" + }, + "content": { + "description": "The result content returned by the tool.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsToolResultContentBlock" + } + }, + "is_error": { + "description": "Whether the tool execution resulted in an error.", + "type": "boolean", + "nullable": true + }, + "processed_at": { + "description": "Timestamp when this event was processed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + } + } + }, + "BetaManagedAgentsAgentMcpToolUseEvent": { + "description": "Event emitted when the agent invokes a tool provided by an MCP server.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "name", + "mcp_server_name", + "input", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent.mcp_tool_use" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "name": { + "description": "Name of the MCP tool being used.", + "type": "string" + }, + "mcp_server_name": { + "description": "Name of the MCP server providing the tool.", + "type": "string" + }, + "input": { + "description": "Input parameters for the tool call.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsStruct" + } + ] + }, + "processed_at": { + "description": "Timestamp when this event was processed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "evaluated_permission": { + "description": "The evaluated permission policy for this tool invocation.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentEvaluatedPermission" + } + ] + }, + "session_thread_id": { + "description": "When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Echo this on a `user.tool_confirmation` event to route the approval back.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsAgentMessageEvent": { + "description": "An agent response event in the session conversation.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "content", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent.message" + ], + "examples": [ + "agent.message" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string", + "examples": [ + "sevt_011CZkZHPq1jCdq5lbRTjiVnz" + ] + }, + "content": { + "description": "Array of text blocks comprising the agent response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsTextBlock" + }, + "examples": [ + [ + { + "type": "text", + "text": "Let me look up order #1234 for you." + } + ] + ] + }, + "processed_at": { + "description": "Timestamp when this response was generated.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:00:00Z" + ] + } + }, + "example": { + "type": "agent.message", + "id": "sevt_011CZkZHPq1jCdq5lbRTjiVnz", + "content": [ + { + "type": "text", + "text": "Let me look up order #1234 for you." + } + ], + "processed_at": "2026-03-15T10:00:00Z" + } + }, + "BetaManagedAgentsAgentParams": { + "description": "Specification for an Agent. Provide a specific `version` or use the short-form `agent=\"agent_id\"` for the most recent version", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent" + ] + }, + "id": { + "description": "The `agent` ID.", + "type": "string", + "minLength": 1, + "maxLength": 128 + }, + "version": { + "description": "The specific `agent` version to use. Omit to use the latest version. Must be at least 1 if specified.", + "type": "integer", + "format": "int32" + } + } + }, + "BetaManagedAgentsAgentReference": { + "description": "A resolved agent reference with a concrete version.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "version" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent" + ], + "examples": [ + "agent" + ] + }, + "id": { + "type": "string", + "examples": [ + "agent_011CZkYqphY8vELVzwCUpqiQ" + ] + }, + "version": { + "type": "integer", + "format": "int32", + "examples": [ + 1 + ] + } + }, + "example": { + "type": "agent", + "id": "agent_011CZkYqphY8vELVzwCUpqiQ", + "version": 1 + } + }, + "BetaManagedAgentsAgentThinkingEvent": { + "description": "Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent.thinking" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp when this thinking was produced.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + } + } + }, + "BetaManagedAgentsAgentThreadContextCompactedEvent": { + "description": "Indicates that context compaction (summarization) occurred during the session.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent.thread_context_compacted" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp when compaction was processed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + } + } + }, + "BetaManagedAgentsAgentThreadMessageReceivedEvent": { + "description": "Delivery event written to the target thread's input stream when an agent-to-agent message arrives.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at", + "content", + "from_session_thread_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent.thread_message_received" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp when the message was received.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "from_agent_name": { + "description": "Name of the callable agent this message came from. Absent when received from the primary agent.", + "type": "string", + "nullable": true + }, + "content": { + "description": "Message content blocks.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsUserContentBlock" + } + }, + "from_session_thread_id": { + "description": "Public `sthr_` ID of the thread that sent the message.", + "type": "string" + } + } + }, + "BetaManagedAgentsAgentThreadMessageSentEvent": { + "description": "Observability event emitted to the sender's output stream when an agent-to-agent message is sent.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at", + "content", + "to_session_thread_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent.thread_message_sent" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp when the message was sent.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "to_agent_name": { + "description": "Name of the callable agent this message was sent to. Absent when sent to the primary agent.", + "type": "string", + "nullable": true + }, + "content": { + "description": "Message content blocks.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsUserContentBlock" + } + }, + "to_session_thread_id": { + "description": "Public `sthr_` ID of the thread the message was sent to.", + "type": "string" + } + } + }, + "BetaManagedAgentsAgentTool": { + "description": "Union type for tool configurations returned in API responses.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "agent_toolset_20260401": "#/components/schemas/BetaManagedAgentsAgentToolset20260401", + "mcp_toolset": "#/components/schemas/BetaManagedAgentsMCPToolset", + "custom": "#/components/schemas/BetaManagedAgentsCustomTool" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolset20260401" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMCPToolset" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsCustomTool" + } + ] + }, + "BetaManagedAgentsAgentToolConfig": { + "description": "Configuration for a specific agent tool.", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "enabled", + "permission_policy" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolName" + }, + "enabled": { + "type": "boolean" + }, + "permission_policy": { + "$ref": "#/components/schemas/BetaManagedAgentsPermissionPolicy" + } + } + }, + "BetaManagedAgentsAgentToolConfigParams": { + "description": "Configuration override for a specific tool within a toolset.", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolName" + }, + "enabled": { + "description": "Whether this tool is enabled and available to Claude. Overrides the default_config setting.", + "type": "boolean", + "nullable": true + }, + "permission_policy": { + "description": "Permission policy for this tool. Controls whether tool calls are auto-approved or require confirmation.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsPermissionPolicy" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsAgentToolName": { + "type": "string", + "description": "Built-in agent tool identifier.", + "enum": [ + "bash", + "edit", + "read", + "write", + "glob", + "grep", + "web_fetch", + "web_search" + ] + }, + "BetaManagedAgentsAgentToolParams": { + "description": "Union type for tool configurations in the tools array.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "agent_toolset_20260401": "#/components/schemas/BetaManagedAgentsAgentToolset20260401Params", + "mcp_toolset": "#/components/schemas/BetaManagedAgentsMCPToolsetParams", + "custom": "#/components/schemas/BetaManagedAgentsCustomToolParams" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolset20260401Params" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMCPToolsetParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsCustomToolParams" + } + ] + }, + "BetaManagedAgentsAgentToolResultEvent": { + "description": "Event representing the result of an agent tool execution.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "tool_use_id", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent.tool_result" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "tool_use_id": { + "description": "The id of the `agent.tool_use` event this result corresponds to.", + "type": "string" + }, + "content": { + "description": "The result content returned by the tool.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsToolResultContentBlock" + } + }, + "is_error": { + "description": "Whether the tool execution resulted in an error.", + "type": "boolean", + "nullable": true + }, + "processed_at": { + "description": "Timestamp when this event was processed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + } + } + }, + "BetaManagedAgentsAgentToolUseEvent": { + "description": "Event emitted when the agent invokes a built-in agent tool.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "name", + "input", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent.tool_use" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "name": { + "description": "Name of the agent tool being used.", + "type": "string" + }, + "input": { + "description": "Input parameters for the tool call.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsStruct" + } + ] + }, + "processed_at": { + "description": "Timestamp when this event was processed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "evaluated_permission": { + "description": "The evaluated permission policy for this tool invocation.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentEvaluatedPermission" + } + ] + }, + "session_thread_id": { + "description": "When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Echo this on a `user.tool_confirmation` event to route the approval back.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsAgentToolset20260401": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "default_config", + "configs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent_toolset_20260401" + ] + }, + "default_config": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolsetDefaultConfig" + }, + "configs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolConfig" + } + } + } + }, + "BetaManagedAgentsAgentToolset20260401Params": { + "description": "Configuration for built-in agent tools. Use this to enable or disable groups of tools available to the agent.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent_toolset_20260401" + ] + }, + "default_config": { + "description": "Default configuration applied to all tools in this set.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolsetDefaultConfigParams" + } + ], + "nullable": true + }, + "configs": { + "description": "Per-tool configuration overrides.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolConfigParams" + } + } + } + }, + "BetaManagedAgentsAgentToolsetDefaultConfig": { + "description": "Resolved default configuration for agent tools.", + "type": "object", + "additionalProperties": false, + "required": [ + "enabled", + "permission_policy" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "permission_policy": { + "$ref": "#/components/schemas/BetaManagedAgentsPermissionPolicy" + } + } + }, + "BetaManagedAgentsAgentToolsetDefaultConfigParams": { + "description": "Default configuration for all tools in a toolset.", + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "description": "Whether tools are enabled and available to Claude by default. Defaults to true if not specified.", + "type": "boolean", + "nullable": true + }, + "permission_policy": { + "description": "Default permission policy for tools. Controls whether tool calls are auto-approved or require confirmation.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsPermissionPolicy" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsAgentUnionParams": { + "oneOf": [ + { + "type": "string" + }, + { + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentParams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "agent": "#/components/schemas/BetaManagedAgentsAgentParams" + } + } + } + ] + }, + "BetaManagedAgentsAlwaysAllowPolicy": { + "description": "Tool calls are automatically approved without user confirmation.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "always_allow" + ] + } + } + }, + "BetaManagedAgentsAlwaysAskPolicy": { + "description": "Tool calls require user confirmation before execution.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "always_ask" + ] + } + } + }, + "BetaManagedAgentsAnthropicSkill": { + "description": "A resolved Anthropic-managed skill.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "skill_id", + "version" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "anthropic" + ], + "examples": [ + "anthropic" + ] + }, + "skill_id": { + "type": "string", + "examples": [ + "xlsx" + ] + }, + "version": { + "type": "string", + "examples": [ + "1" + ] + } + }, + "example": { + "type": "anthropic", + "skill_id": "xlsx", + "version": "1" + } + }, + "BetaManagedAgentsAnthropicSkillParams": { + "description": "An Anthropic-managed skill.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "skill_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "anthropic" + ], + "examples": [ + "anthropic" + ] + }, + "skill_id": { + "description": "Identifier of the Anthropic skill (e.g., \"xlsx\").", + "type": "string", + "minLength": 1, + "maxLength": 64, + "examples": [ + "xlsx" + ] + }, + "version": { + "description": "Version to pin. Defaults to latest if omitted.", + "type": "string", + "minLength": 1, + "maxLength": 64, + "nullable": true, + "examples": [ + "1" + ] + } + }, + "example": { + "type": "anthropic", + "skill_id": "xlsx", + "version": "1" + } + }, + "BetaManagedAgentsApiActor": { + "description": "Attribution for a write made directly via the public API (outside of any session).", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "api_key_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "api_actor" + ] + }, + "api_key_id": { + "description": "ID of the API key that performed the write. This identifies the key, not the secret.", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsArchiveMemoryStoreResponse": { + "description": "Response from archiving a `memory_store`. Returns the store with `archived_at` set.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "memory_store": "#/components/schemas/BetaManagedAgentsMemoryStore" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryStore" + } + ] + }, + "BetaManagedAgentsBase64DocumentSource": { + "description": "Base64-encoded document data.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "media_type", + "data" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "base64" + ] + }, + "media_type": { + "description": "MIME type of the document (e.g., \"application/pdf\").", + "type": "string", + "minLength": 1 + }, + "data": { + "description": "Base64-encoded document data.", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsBase64ImageSource": { + "description": "Base64-encoded image data.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "media_type", + "data" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "base64" + ] + }, + "media_type": { + "description": "MIME type of the image (e.g., \"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\").", + "type": "string", + "minLength": 1 + }, + "data": { + "description": "Base64-encoded image data.", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsBillingError": { + "description": "The caller's organization or workspace cannot make model requests — out of credits or spend limit reached. Retrying with the same credentials will not succeed; the caller must resolve the billing state.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "message", + "retry_status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "billing_error" + ] + }, + "message": { + "description": "Human-readable error description.", + "type": "string" + }, + "retry_status": { + "description": "What the client should do next.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRetryStatus" + } + ] + } + } + }, + "BetaManagedAgentsBranchCheckout": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "branch" + ], + "examples": [ + "branch" + ] + }, + "name": { + "description": "Branch name to check out.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "examples": [ + "main" + ] + } + }, + "example": { + "type": "branch", + "name": "main" + } + }, + "BetaManagedAgentsCacheCreationUsage": { + "description": "Prompt-cache creation token usage broken down by cache lifetime.", + "type": "object", + "additionalProperties": false, + "properties": { + "ephemeral_1h_input_tokens": { + "description": "Tokens used to create 1-hour ephemeral cache entries.", + "type": "integer", + "format": "int32" + }, + "ephemeral_5m_input_tokens": { + "description": "Tokens used to create 5-minute ephemeral cache entries.", + "type": "integer", + "format": "int32" + } + } + }, + "BetaManagedAgentsCommitCheckout": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "sha" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "commit" + ] + }, + "sha": { + "description": "Full commit SHA to check out.", + "type": "string", + "minLength": 7, + "maxLength": 64 + } + } + }, + "BetaManagedAgentsContentSha256Precondition": { + "description": "Optimistic-concurrency precondition: the update applies only if the memory's stored `content_sha256` equals the supplied value. On mismatch, the request returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and retry against the fresh state. If the precondition fails but the stored state already exactly matches the requested `content` and `path`, the server returns 200 instead of 409.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "content_sha256" + ] + }, + "content_sha256": { + "description": "Expected `content_sha256` of the stored memory (64 lowercase hexadecimal characters). Typically the `content_sha256` returned by a prior read or list call. Because the server applies no content normalization, clients can also compute this locally as the SHA-256 of the UTF-8 content bytes.", + "type": "string" + } + } + }, + "BetaManagedAgentsCreateAgentParams": { + "description": "Request parameters for creating an `agent`.", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "model" + ], + "properties": { + "name": { + "description": "Human-readable name for the agent. 1-256 characters.", + "type": "string", + "minLength": 1, + "maxLength": 256, + "examples": [ + "My First Agent" + ] + }, + "model": { + "description": "Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsModelParams" + } + ], + "examples": [ + "claude-sonnet-4-6" + ] + }, + "description": { + "description": "Description of what the agent does. Up to 2048 characters.", + "type": "string", + "maxLength": 2048, + "nullable": true, + "examples": [ + "A general-purpose starter agent." + ] + }, + "system": { + "description": "System prompt for the agent. Up to 100,000 characters.", + "type": "string", + "maxLength": 100000, + "nullable": true, + "examples": [ + "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end." + ] + }, + "tools": { + "description": "Tool configurations available to the agent. Maximum of 128 tools across all toolsets allowed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolParams" + }, + "examples": [ + [ + { + "type": "agent_toolset_20260401" + } + ] + ] + }, + "mcp_servers": { + "description": "MCP servers this agent connects to. Maximum 20. Names must be unique within the array.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMCPServerParams" + } + }, + "skills": { + "description": "Skills available to the agent. Maximum 20.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSkillParams" + } + }, + "metadata": { + "description": "Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "examples": [ + { + "foo": "bar" + } + ] + }, + "multiagent": { + "description": "Multiagent orchestration configuration. Currently supports the `coordinator` topology with a roster of 1-20 agents.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMultiagentParams" + } + ], + "nullable": true + } + }, + "example": { + "name": "My First Agent", + "model": "claude-sonnet-4-6", + "description": "A general-purpose starter agent.", + "system": "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.", + "tools": [ + { + "type": "agent_toolset_20260401" + } + ], + "metadata": { + "foo": "bar" + } + } + }, + "BetaManagedAgentsCreateCredentialRequestBody": { + "type": "object", + "additionalProperties": false, + "required": [ + "auth" + ], + "properties": { + "auth": { + "description": "Authentication configuration for the credential.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsCredentialCreateAuth" + } + ], + "examples": [ + { + "type": "static_bearer", + "token": "bearer_exampletoken", + "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse" + } + ] + }, + "display_name": { + "description": "Human-readable name for the credential. Up to 255 characters.", + "type": "string", + "maxLength": 255, + "nullable": true, + "examples": [ + "Example credential" + ] + }, + "metadata": { + "description": "Arbitrary key-value metadata to attach to the credential. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "examples": [ + { + "environment": "production" + } + ] + } + }, + "example": { + "auth": { + "type": "static_bearer", + "token": "bearer_exampletoken", + "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse" + }, + "display_name": "Example credential", + "metadata": { + "environment": "production" + } + } + }, + "BetaManagedAgentsCreateMemoryParams": { + "description": "Request parameters for [Create a memory](/en/api/beta/memory_stores/memories/create). The path must be unoccupied: if a memory already exists at the path, or the path is an ancestor or descendant of an existing memory's path, the request returns `memory_path_conflict_error` (HTTP 409). Create never overwrites; to modify an existing memory, use [Update a memory](/en/api/beta/memory_stores/memories/update).", + "type": "object", + "additionalProperties": false, + "required": [ + "path", + "content" + ], + "properties": { + "path": { + "description": "Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`. Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, and must be NFC-normalized. Paths are case-sensitive.", + "type": "string", + "minLength": 2, + "maxLength": 1024 + }, + "content": { + "description": "UTF-8 text content for the new memory. Maximum 100 kB (102,400 bytes). Required; pass `\"\"` explicitly to create an empty memory.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsCreateMemoryStoreRequest": { + "description": "Request parameters for creating a `memory_store`.", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Human-readable name for the store. Required; 1–255 characters; no control characters. The mount-path slug under `/mnt/memory/` is derived from this name (lowercased, non-alphanumeric runs collapsed to a hyphen). Names need not be unique within a workspace.", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "description": { + "description": "Free-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent.", + "type": "string", + "maxLength": 1024 + }, + "metadata": { + "description": "Arbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Not visible to the agent.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "BetaManagedAgentsCreateMemoryStoreResponse": { + "description": "Response from creating a `memory_store`. Returns the created store.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "memory_store": "#/components/schemas/BetaManagedAgentsMemoryStore" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryStore" + } + ] + }, + "BetaManagedAgentsCreateSessionParams": { + "description": "Request parameters for creating a `session`.", + "type": "object", + "additionalProperties": false, + "required": [ + "agent", + "environment_id" + ], + "properties": { + "agent": { + "description": "Agent identifier. Accepts the `agent` ID string, which pins the latest version for the session, or an `agent` object with both id and version specified.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentUnionParams" + } + ], + "examples": [ + "agent_011CZkYpogX7uDKUyvBTophP" + ] + }, + "environment_id": { + "description": "ID of the `environment` defining the container configuration for this session.", + "type": "string", + "minLength": 1, + "maxLength": 128, + "examples": [ + "env_011CZkZ9X2dpNyB7HsEFoRfW" + ] + }, + "title": { + "description": "Human-readable session title.", + "type": "string", + "maxLength": 500, + "nullable": true, + "examples": [ + "Order #1234 inquiry" + ] + }, + "metadata": { + "description": "Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "resources": { + "description": "Resources (e.g. repositories, files) to mount into the session's container.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionResourceParams" + } + }, + "vault_ids": { + "description": "Vault IDs for stored credentials the agent can use during the session.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "example": { + "agent": "agent_011CZkYpogX7uDKUyvBTophP", + "environment_id": "env_011CZkZ9X2dpNyB7HsEFoRfW", + "title": "Order #1234 inquiry" + } + }, + "BetaManagedAgentsCreateVaultRequest": { + "description": "Request parameters for creating a vault.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name" + ], + "properties": { + "display_name": { + "description": "Human-readable name for the vault. 1-255 characters.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "examples": [ + "Example vault" + ] + }, + "metadata": { + "description": "Arbitrary key-value metadata to attach to the vault. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "examples": [ + { + "environment": "production" + } + ] + } + }, + "example": { + "display_name": "Example vault", + "metadata": { + "environment": "production" + } + } + }, + "BetaManagedAgentsCredential": { + "description": "A credential stored in a vault. Sensitive fields are never returned in responses.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "vault_id", + "metadata", + "created_at", + "updated_at", + "archived_at", + "auth" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "vault_credential" + ], + "examples": [ + "vault_credential" + ] + }, + "id": { + "description": "Unique identifier for the credential.", + "type": "string", + "examples": [ + "vcrd_011CZkZEMt8gZan2iYOQfSkw" + ] + }, + "vault_id": { + "description": "Identifier of the vault this credential belongs to.", + "type": "string", + "examples": [ + "vlt_011CZkZDLs7fYzm1hXNPeRjv" + ] + }, + "display_name": { + "description": "Human-readable name for the credential.", + "type": "string", + "nullable": true, + "examples": [ + "Example credential" + ] + }, + "metadata": { + "description": "Arbitrary key-value metadata attached to the credential.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "examples": [ + { + "environment": "production" + } + ] + }, + "created_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "updated_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "archived_at": { + "description": "When the credential was archived. Null if not archived.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true, + "examples": [ + null + ] + }, + "auth": { + "description": "Authentication configuration for this credential.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsCredentialAuth" + } + ], + "examples": [ + { + "type": "static_bearer", + "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse" + } + ] + } + }, + "example": { + "type": "vault_credential", + "id": "vcrd_011CZkZEMt8gZan2iYOQfSkw", + "vault_id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", + "display_name": "Example credential", + "metadata": { + "environment": "production" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null, + "auth": { + "type": "static_bearer", + "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse" + } + } + }, + "BetaManagedAgentsCredentialAuth": { + "description": "Authentication details for a credential.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "mcp_oauth": "#/components/schemas/BetaManagedAgentsMcpOauthAuthResponse", + "static_bearer": "#/components/schemas/BetaManagedAgentsStaticBearerAuthResponse" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMcpOauthAuthResponse" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsStaticBearerAuthResponse" + } + ], + "example": { + "type": "static_bearer", + "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse" + } + }, + "BetaManagedAgentsCredentialCreateAuth": { + "description": "Authentication details for creating a credential.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "mcp_oauth": "#/components/schemas/BetaManagedAgentsMcpOauthCreateParams", + "static_bearer": "#/components/schemas/BetaManagedAgentsStaticBearerCreateParams" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMcpOauthCreateParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsStaticBearerCreateParams" + } + ], + "example": { + "type": "static_bearer", + "token": "bearer_exampletoken", + "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse" + } + }, + "BetaManagedAgentsCredentialRefreshStatus": { + "type": "string", + "description": "Outcome of a refresh-token exchange attempted during credential validation.", + "enum": [ + "succeeded", + "failed", + "connect_error", + "no_refresh_token" + ] + }, + "BetaManagedAgentsCredentialUpdateAuth": { + "description": "Updated authentication details for a credential.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "mcp_oauth": "#/components/schemas/BetaManagedAgentsMcpOauthUpdateParams", + "static_bearer": "#/components/schemas/BetaManagedAgentsStaticBearerUpdateParams" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMcpOauthUpdateParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsStaticBearerUpdateParams" + } + ] + }, + "BetaManagedAgentsCredentialValidation": { + "description": "Result of live-probing a credential against its configured MCP server.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "credential_id", + "vault_id", + "status", + "validated_at", + "has_refresh_token", + "mcp_probe", + "refresh" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "vault_credential_validation" + ], + "examples": [ + "vault_credential_validation" + ] + }, + "credential_id": { + "description": "Unique identifier of the credential that was validated.", + "type": "string", + "examples": [ + "vcrd_011CZkZEMt8gZan2iYOQfSkw" + ] + }, + "vault_id": { + "description": "Identifier of the vault containing the credential.", + "type": "string", + "examples": [ + "vlt_011CZkZDLs7fYzm1hXNPeRjv" + ] + }, + "status": { + "description": "Overall verdict of the validation probe.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsCredentialValidationStatus" + } + ], + "examples": [ + "valid" + ] + }, + "validated_at": { + "description": "When the validation probe was performed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "has_refresh_token": { + "description": "Whether the credential has a refresh token configured.", + "type": "boolean", + "examples": [ + true + ] + }, + "mcp_probe": { + "description": "Details of the failing MCP probe step. Null when the probe succeeded.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMcpProbe" + } + ], + "nullable": true, + "examples": [ + null + ] + }, + "refresh": { + "description": "Details of the refresh-token exchange attempted on a 401. Null when no refresh was attempted.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRefreshObject" + } + ], + "nullable": true, + "examples": [ + null + ] + } + }, + "example": { + "type": "vault_credential_validation", + "credential_id": "vcrd_011CZkZEMt8gZan2iYOQfSkw", + "vault_id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", + "status": "valid", + "validated_at": "2026-03-15T10:00:00Z", + "has_refresh_token": true, + "mcp_probe": null, + "refresh": null + } + }, + "BetaManagedAgentsCredentialValidationStatus": { + "type": "string", + "description": "Overall verdict of a credential validation probe.", + "enum": [ + "valid", + "invalid", + "unknown" + ] + }, + "BetaManagedAgentsCustomSkill": { + "description": "A resolved user-created custom skill.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "skill_id", + "version" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ], + "examples": [ + "custom" + ] + }, + "skill_id": { + "type": "string", + "examples": [ + "skill_011CZkZFNu9hAbo3jZPRgTlx" + ] + }, + "version": { + "type": "string", + "examples": [ + "2" + ] + } + }, + "example": { + "type": "custom", + "skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx", + "version": "2" + } + }, + "BetaManagedAgentsCustomSkillParams": { + "description": "A user-created custom skill.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "skill_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ], + "examples": [ + "custom" + ] + }, + "skill_id": { + "description": "Tagged ID of the custom skill (e.g., \"skill_01XJ5...\").", + "type": "string", + "minLength": 1, + "maxLength": 64, + "examples": [ + "skill_011CZkZFNu9hAbo3jZPRgTlx" + ] + }, + "version": { + "description": "Version to pin. Defaults to latest if omitted.", + "type": "string", + "minLength": 1, + "maxLength": 64, + "nullable": true, + "examples": [ + "2" + ] + } + }, + "example": { + "type": "custom", + "skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx", + "version": "2" + } + }, + "BetaManagedAgentsCustomTool": { + "description": "A custom tool as returned in API responses.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "name", + "description", + "input_schema" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ] + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "input_schema": { + "$ref": "#/components/schemas/BetaManagedAgentsCustomToolInputSchema" + } + } + }, + "BetaManagedAgentsCustomToolInputSchema": { + "description": "JSON Schema for custom tool input parameters.", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "description": "Must be 'object' for tool input schemas.", + "type": "string", + "enum": [ + "object" + ] + }, + "properties": { + "description": "JSON Schema properties defining the tool's input parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsStruct" + } + ], + "nullable": true, + "x-stainless-skip": [ + "terraform" + ] + }, + "required": { + "description": "List of required property names.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "BetaManagedAgentsCustomToolParams": { + "description": "A custom tool that is executed by the API client rather than the agent. When the agent calls this tool, an `agent.custom_tool_use` event is emitted and the session goes idle, waiting for the client to provide the result via a `user.custom_tool_result` event.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "name", + "description", + "input_schema" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ] + }, + "name": { + "description": "Unique name for the tool. 1-128 characters; letters, digits, underscores, and hyphens.", + "type": "string", + "minLength": 1, + "maxLength": 128 + }, + "description": { + "description": "Description of what the tool does, shown to the agent to help it decide when to use the tool. 1-1024 characters.", + "type": "string", + "minLength": 1, + "maxLength": 1024 + }, + "input_schema": { + "description": "JSON Schema defining the expected input parameters for the tool.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsCustomToolInputSchema" + } + ] + } + } + }, + "BetaManagedAgentsDeleteMemoryStoreResponse": { + "description": "Response from deleting a `memory_store`. Confirms the deleted ID.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "memory_store_deleted": "#/components/schemas/BetaManagedAgentsDeletedMemoryStore" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsDeletedMemoryStore" + } + ] + }, + "BetaManagedAgentsDeleteSessionResource": { + "description": "Confirmation of resource deletion.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session_resource_deleted" + ], + "examples": [ + "session_resource_deleted" + ] + }, + "id": { + "type": "string", + "examples": [ + "sesrsc_011CZkZBJq5dWxk9fVLNcPht" + ] + } + }, + "example": { + "type": "session_resource_deleted", + "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht" + } + }, + "BetaManagedAgentsDeletedCredential": { + "description": "Confirmation of a deleted credential.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "vault_credential_deleted" + ], + "examples": [ + "vault_credential_deleted" + ] + }, + "id": { + "description": "Unique identifier of the deleted credential.", + "type": "string", + "examples": [ + "vcrd_011CZkZEMt8gZan2iYOQfSkw" + ] + } + }, + "example": { + "type": "vault_credential_deleted", + "id": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + } + }, + "BetaManagedAgentsDeletedMemory": { + "description": "Tombstone returned by [Delete a memory](/en/api/beta/memory_stores/memories/delete). The memory's version history persists and remains listable via [List memory versions](/en/api/beta/memory_stores/memory_versions/list) until the store itself is deleted.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_deleted" + ] + }, + "id": { + "description": "ID of the deleted memory (a `mem_...` value).", + "type": "string" + } + } + }, + "BetaManagedAgentsDeletedMemoryStore": { + "description": "Confirmation that a `memory_store` was deleted.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_store_deleted" + ] + }, + "id": { + "description": "ID of the deleted memory store (a `memstore_...` identifier). The store and all its memories and versions are no longer retrievable.", + "type": "string" + } + } + }, + "BetaManagedAgentsDeletedSession": { + "description": "Confirmation that a `session` has been permanently deleted.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session_deleted" + ], + "examples": [ + "session_deleted" + ] + }, + "id": { + "type": "string", + "examples": [ + "sesn_011CZkZAtmR3yMPDzynEDxu7" + ] + } + }, + "example": { + "type": "session_deleted", + "id": "sesn_011CZkZAtmR3yMPDzynEDxu7" + } + }, + "BetaManagedAgentsDeletedVault": { + "description": "Confirmation of a deleted vault.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "vault_deleted" + ], + "examples": [ + "vault_deleted" + ] + }, + "id": { + "description": "Unique identifier of the deleted vault.", + "type": "string", + "examples": [ + "vlt_011CZkZDLs7fYzm1hXNPeRjv" + ] + } + }, + "example": { + "type": "vault_deleted", + "id": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + } + }, + "BetaManagedAgentsDocumentBlock": { + "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "document" + ] + }, + "source": { + "description": "The source of the document data.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsDocumentSource" + } + ] + }, + "title": { + "description": "The title of the document.", + "type": "string", + "nullable": true + }, + "context": { + "description": "Additional context about the document for the model.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsDocumentSource": { + "description": "Union type for document source variants.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "base64": "#/components/schemas/BetaManagedAgentsBase64DocumentSource", + "text": "#/components/schemas/BetaManagedAgentsPlainTextDocumentSource", + "url": "#/components/schemas/BetaManagedAgentsURLDocumentSource", + "file": "#/components/schemas/BetaManagedAgentsFileDocumentSource" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsBase64DocumentSource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsPlainTextDocumentSource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsURLDocumentSource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsFileDocumentSource" + } + ] + }, + "BetaManagedAgentsErrorResponse": { + "type": "object", + "required": [ + "type", + "error" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "error" + ], + "description": "Always \"error\" for error responses" + }, + "error": { + "$ref": "#/components/schemas/BetaManagedAgentsError" + } + } + }, + "BetaManagedAgentsEventParams": { + "description": "Union type for event parameters that can be sent to a session.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "user.message": "#/components/schemas/BetaManagedAgentsUserMessageEventParams", + "user.interrupt": "#/components/schemas/BetaManagedAgentsUserInterruptEventParams", + "user.tool_confirmation": "#/components/schemas/BetaManagedAgentsUserToolConfirmationEventParams", + "user.custom_tool_result": "#/components/schemas/BetaManagedAgentsUserCustomToolResultEventParams", + "user.define_outcome": "#/components/schemas/BetaManagedAgentsUserDefineOutcomeEventParams", + "user.tool_result": "#/components/schemas/BetaManagedAgentsUserToolResultEventParams" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsUserMessageEventParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserInterruptEventParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolConfirmationEventParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserCustomToolResultEventParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserDefineOutcomeEventParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolResultEventParams" + } + ] + }, + "BetaManagedAgentsFileDocumentSource": { + "description": "Document referenced by file ID.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "file_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "file_id": { + "description": "ID of a previously uploaded file.", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsFileImageSource": { + "description": "Image referenced by file ID.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "file_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "file_id": { + "description": "ID of a previously uploaded file.", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsFileResource": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "file_id", + "mount_path", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file" + ], + "examples": [ + "file" + ] + }, + "id": { + "type": "string", + "examples": [ + "sesrsc_011CZkZBJq5dWxk9fVLNcPht" + ] + }, + "file_id": { + "type": "string", + "examples": [ + "file_011CNha8iCJcU1wXNR6q4V8w" + ] + }, + "mount_path": { + "type": "string", + "examples": [ + "/uploads/receipt.pdf" + ] + }, + "created_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "updated_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + } + }, + "example": { + "type": "file", + "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", + "mount_path": "/uploads/receipt.pdf", + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + } + }, + "BetaManagedAgentsFileResourceParams": { + "description": "Mount a file uploaded via the Files API into the session.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "file_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file" + ], + "examples": [ + "file" + ] + }, + "file_id": { + "description": "ID of a previously uploaded file.", + "type": "string", + "minLength": 1, + "maxLength": 128, + "examples": [ + "file_011CNha8iCJcU1wXNR6q4V8w" + ] + }, + "mount_path": { + "description": "Mount path in the container. Defaults to `/mnt/session/uploads/`.", + "type": "string", + "minLength": 1, + "maxLength": 4096, + "nullable": true, + "examples": [ + "/uploads/receipt.pdf" + ] + } + }, + "example": { + "type": "file", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", + "mount_path": "/uploads/receipt.pdf" + } + }, + "BetaManagedAgentsFileRubric": { + "description": "Rubric referenced by a file uploaded via the Files API.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "file_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "file_id": { + "description": "ID of the rubric file.", + "type": "string" + } + } + }, + "BetaManagedAgentsFileRubricParams": { + "description": "Rubric referenced by a file uploaded via the Files API.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "file_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file" + ], + "examples": [ + "file" + ] + }, + "file_id": { + "description": "ID of the rubric file.", + "type": "string", + "examples": [ + "file_011CNha8iCJcU1wXNR6q4V8w" + ] + } + }, + "example": { + "type": "file", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w" + } + }, + "BetaManagedAgentsGetMemoryStoreResponse": { + "description": "Response from retrieving a `memory_store`. Returns the store, including archived stores.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "memory_store": "#/components/schemas/BetaManagedAgentsMemoryStore" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryStore" + } + ] + }, + "BetaManagedAgentsGetSessionResource": { + "description": "The requested session resource.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "github_repository": "#/components/schemas/BetaManagedAgentsGitHubRepositoryResource", + "file": "#/components/schemas/BetaManagedAgentsFileResource", + "memory_store": "#/components/schemas/BetaManagedAgentsMemoryStoreResource" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsGitHubRepositoryResource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsFileResource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryStoreResource" + } + ] + }, + "BetaManagedAgentsGitHubRepositoryResource": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "url", + "mount_path", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "github_repository" + ], + "examples": [ + "github_repository" + ] + }, + "id": { + "type": "string", + "examples": [ + "sesrsc_011CZkZCKr6eXyl0gWMOdQiu" + ] + }, + "url": { + "type": "string", + "examples": [ + "https://github.com/example-org/example-repo" + ] + }, + "mount_path": { + "type": "string", + "examples": [ + "/workspace/example-repo" + ] + }, + "checkout": { + "$ref": "#/components/schemas/BetaManagedAgentsRepositoryCheckout", + "nullable": true, + "examples": [ + { + "type": "branch", + "name": "main" + } + ] + }, + "created_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "updated_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + } + }, + "example": { + "type": "github_repository", + "id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu", + "url": "https://github.com/example-org/example-repo", + "mount_path": "/workspace/example-repo", + "checkout": { + "type": "branch", + "name": "main" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + } + }, + "BetaManagedAgentsGitHubRepositoryResourceParams": { + "description": "Mount a GitHub repository into the session's container.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "url", + "authorization_token" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "github_repository" + ], + "examples": [ + "github_repository" + ] + }, + "url": { + "description": "Github URL of the repository", + "type": "string", + "minLength": 1, + "maxLength": 2048, + "examples": [ + "https://github.com/example-org/example-repo" + ] + }, + "authorization_token": { + "description": "GitHub authorization token used to clone the repository.", + "type": "string", + "minLength": 1, + "maxLength": 4096, + "examples": [ + "ghp_exampletoken" + ] + }, + "mount_path": { + "description": "Mount path in the container. Defaults to `/workspace/`.", + "type": "string", + "minLength": 1, + "maxLength": 4096, + "nullable": true + }, + "checkout": { + "description": "Branch or commit to check out. Defaults to the repository's default branch.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRepositoryCheckout" + } + ], + "nullable": true + } + }, + "example": { + "type": "github_repository", + "url": "https://github.com/example-org/example-repo", + "authorization_token": "ghp_exampletoken" + } + }, + "BetaManagedAgentsImageBlock": { + "description": "Image content specified directly as base64 data or as a reference via a URL.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image" + ] + }, + "source": { + "description": "The source of the image data.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsImageSource" + } + ] + } + } + }, + "BetaManagedAgentsImageSource": { + "description": "Union type for image source variants.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "base64": "#/components/schemas/BetaManagedAgentsBase64ImageSource", + "url": "#/components/schemas/BetaManagedAgentsURLImageSource", + "file": "#/components/schemas/BetaManagedAgentsFileImageSource" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsBase64ImageSource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsURLImageSource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsFileImageSource" + } + ] + }, + "BetaManagedAgentsInputEvent": { + "description": "Union type for events that can be sent to a session.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "user.message": "#/components/schemas/BetaManagedAgentsUserMessageEvent", + "user.interrupt": "#/components/schemas/BetaManagedAgentsUserInterruptEvent", + "user.tool_confirmation": "#/components/schemas/BetaManagedAgentsUserToolConfirmationEvent", + "user.custom_tool_result": "#/components/schemas/BetaManagedAgentsUserCustomToolResultEvent", + "user.define_outcome": "#/components/schemas/BetaManagedAgentsUserDefineOutcomeEvent", + "user.tool_result": "#/components/schemas/BetaManagedAgentsUserToolResultEvent" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsUserMessageEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserInterruptEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolConfirmationEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserCustomToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserDefineOutcomeEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolResultEvent" + } + ] + }, + "BetaManagedAgentsListAgentVersions": { + "description": "Paginated list of agent versions.", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "Agent versions.", + "x-stainless-pagination-property": { + "purpose": "items" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgent" + } + }, + "next_page": { + "description": "Opaque cursor for the next page. Null when no more results.", + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + }, + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsListAgents": { + "description": "Paginated list of agents.", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "List of agents.", + "x-stainless-pagination-property": { + "purpose": "items" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgent" + } + }, + "next_page": { + "description": "Opaque cursor for the next page. Null when no more results.", + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + }, + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsListCredentialsResponse": { + "description": "Response containing a paginated list of credentials.", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "List of credentials.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsCredential" + }, + "examples": [ + [ + { + "type": "vault_credential", + "id": "vcrd_011CZkZEMt8gZan2iYOQfSkw", + "vault_id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", + "display_name": "Example credential", + "metadata": { + "environment": "production" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null, + "auth": { + "type": "static_bearer", + "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse" + } + } + ] + ] + }, + "next_page": { + "description": "Pagination token for the next page, or null if no more results.", + "type": "string", + "nullable": true, + "examples": [ + "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + ] + } + }, + "example": { + "data": [ + { + "type": "vault_credential", + "id": "vcrd_011CZkZEMt8gZan2iYOQfSkw", + "vault_id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", + "display_name": "Example credential", + "metadata": { + "environment": "production" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null, + "auth": { + "type": "static_bearer", + "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse" + } + } + ], + "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + } + }, + "BetaManagedAgentsListMemoriesResult": { + "description": "Response payload for [List memories](/en/api/beta/memory_stores/memories/list).", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "One page of results. Each item is either a `memory` object or, when `depth` was set, a `memory_prefix` rollup marker. Items appear in the requested `order_by`/`order`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryListItem" + } + }, + "next_page": { + "description": "Opaque cursor for the next page (a `page_...` value), or `null` if there are no more results. Pass as `page` on the next request.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsListMemoryStoresResponse": { + "description": "A page of `memory_store` results, ordered by `created_at` descending (newest first).", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "Memory stores on this page, newest first. Empty when there are no stores matching the filters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryStore" + } + }, + "next_page": { + "description": "Opaque cursor for the next page (a `page_...` value). Pass as `page` on the next request. `null` when there are no more results.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsListMemoryVersionsResult": { + "description": "Response payload for [List memory versions](/en/api/beta/memory_stores/memory_versions/list).", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "One page of `memory_version` objects, ordered by `created_at` descending (newest first), with `id` as tiebreak.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersion" + } + }, + "next_page": { + "description": "Opaque cursor for the next page (a `page_...` value), or `null` if there are no more results. Pass as `page` on the next request.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsListOrder": { + "type": "string", + "description": "ListOrder enum", + "enum": [ + "asc", + "desc" + ] + }, + "BetaManagedAgentsListSessionEvents": { + "description": "Paginated list of events for a `session`.", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "Events for the session, ordered by `created_at`.", + "x-stainless-pagination-property": { + "purpose": "items" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionEvent" + }, + "examples": [ + [ + { + "type": "user.message", + "id": "sevt_011CZkZGOp0iBcp4kaQSihUmy", + "content": [ + { + "type": "text", + "text": "Where is my order #1234?" + } + ], + "processed_at": "2026-03-15T10:00:00Z" + }, + { + "type": "agent.message", + "id": "sevt_011CZkZHPq1jCdq5lbRTjiVnz", + "content": [ + { + "type": "text", + "text": "Let me look up order #1234 for you." + } + ], + "processed_at": "2026-03-15T10:00:00Z" + } + ] + ] + }, + "next_page": { + "description": "Opaque cursor for the next page. Null when no more results.", + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + }, + "type": "string", + "nullable": true, + "examples": [ + "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + ] + } + }, + "example": { + "data": [ + { + "type": "user.message", + "id": "sevt_011CZkZGOp0iBcp4kaQSihUmy", + "content": [ + { + "type": "text", + "text": "Where is my order #1234?" + } + ], + "processed_at": "2026-03-15T10:00:00Z" + }, + { + "type": "agent.message", + "id": "sevt_011CZkZHPq1jCdq5lbRTjiVnz", + "content": [ + { + "type": "text", + "text": "Let me look up order #1234 for you." + } + ], + "processed_at": "2026-03-15T10:00:00Z" + } + ], + "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + } + }, + "BetaManagedAgentsListSessionResources": { + "description": "Paginated list of resources attached to a session.", + "type": "object", + "additionalProperties": false, + "required": [ + "data" + ], + "properties": { + "data": { + "description": "Resources for the session, ordered by `created_at`.", + "x-stainless-pagination-property": { + "purpose": "items" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionResource" + }, + "examples": [ + [ + { + "type": "file", + "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", + "mount_path": "/uploads/receipt.pdf", + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + }, + { + "type": "github_repository", + "id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu", + "url": "https://github.com/example-org/example-repo", + "mount_path": "/workspace/example-repo", + "checkout": { + "type": "branch", + "name": "main" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + } + ] + ] + }, + "next_page": { + "description": "Opaque cursor for the next page. Null when no more results.", + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + }, + "type": "string", + "nullable": true, + "examples": [ + "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + ] + } + }, + "example": { + "data": [ + { + "type": "file", + "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", + "mount_path": "/uploads/receipt.pdf", + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + }, + { + "type": "github_repository", + "id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu", + "url": "https://github.com/example-org/example-repo", + "mount_path": "/workspace/example-repo", + "checkout": { + "type": "branch", + "name": "main" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + } + ], + "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + } + }, + "BetaManagedAgentsListSessionThreadEvents": { + "description": "Paginated list of events for a single thread within a `session`.", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "Events for the thread, ordered by `created_at`.", + "x-stainless-pagination-property": { + "purpose": "items" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionEvent" + } + }, + "next_page": { + "description": "Opaque cursor for the next page. Null when no more results.", + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + }, + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsListSessionThreads": { + "description": "Paginated list of threads within a `session`.", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "Threads in the session, primary first then children in spawn order.", + "x-stainless-pagination-property": { + "purpose": "items" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThread" + }, + "examples": [ + [ + { + "type": "session_thread", + "id": "sthr_011CZkZVWa6oIjw0rgXZpnBt", + "session_id": "sesn_011CZkZAtmR3yMPDzynEDxu7", + "status": "idle", + "agent": { + "type": "agent", + "id": "agent_011CZkYqphY8vELVzwCUpqiQ", + "version": 1, + "name": "Researcher", + "description": "A focused research subagent.", + "model": { + "id": "claude-sonnet-4-6", + "speed": "standard" + }, + "system": "You are a research subagent that gathers and summarises sources for the coordinating agent.", + "tools": [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ], + "mcp_servers": [], + "skills": [] + }, + "parent_thread_id": null, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null, + "usage": { + "input_tokens": 0, + "output_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + } + }, + "stats": { + "duration_seconds": 0, + "startup_seconds": 0, + "active_seconds": 0 + } + } + ] + ] + }, + "next_page": { + "description": "Opaque cursor for the next page. Null when no more results.", + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + }, + "type": "string", + "nullable": true, + "examples": [ + "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + ] + } + }, + "example": { + "data": [ + { + "type": "session_thread", + "id": "sthr_011CZkZVWa6oIjw0rgXZpnBt", + "session_id": "sesn_011CZkZAtmR3yMPDzynEDxu7", + "status": "idle", + "agent": { + "type": "agent", + "id": "agent_011CZkYqphY8vELVzwCUpqiQ", + "version": 1, + "name": "Researcher", + "description": "A focused research subagent.", + "model": { + "id": "claude-sonnet-4-6", + "speed": "standard" + }, + "system": "You are a research subagent that gathers and summarises sources for the coordinating agent.", + "tools": [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ], + "mcp_servers": [], + "skills": [] + }, + "parent_thread_id": null, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null, + "usage": { + "input_tokens": 0, + "output_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + } + }, + "stats": { + "duration_seconds": 0, + "startup_seconds": 0, + "active_seconds": 0 + } + } + ], + "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + } + }, + "BetaManagedAgentsListSessions": { + "description": "Paginated list of sessions.", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "List of sessions.", + "x-stainless-pagination-property": { + "purpose": "items" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSession" + }, + "examples": [ + [] + ] + }, + "next_page": { + "description": "Opaque cursor for the next page. Null when no more results.", + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + }, + "type": "string", + "nullable": true, + "examples": [ + "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + ] + } + }, + "example": { + "data": [], + "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + } + }, + "BetaManagedAgentsListVaultsResponse": { + "description": "Response containing a paginated list of vaults.", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "List of vaults.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsVault" + }, + "examples": [ + [ + { + "type": "vault", + "id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", + "display_name": "Example vault", + "metadata": { + "environment": "production" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null + } + ] + ] + }, + "next_page": { + "description": "Pagination token for the next page, or null if no more results.", + "type": "string", + "nullable": true, + "examples": [ + "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + ] + } + }, + "example": { + "data": [ + { + "type": "vault", + "id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", + "display_name": "Example vault", + "metadata": { + "environment": "production" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null + } + ], + "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" + } + }, + "BetaManagedAgentsMCPServer": { + "description": "Union type for MCP server connection definitions returned in API responses.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "url": "#/components/schemas/BetaManagedAgentsMCPServerURLDefinition" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMCPServerURLDefinition" + } + ] + }, + "BetaManagedAgentsMCPServerParams": { + "description": "Union type for MCP server connection definitions.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "url": "#/components/schemas/BetaManagedAgentsURLMCPServerParams" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsURLMCPServerParams" + } + ] + }, + "BetaManagedAgentsMCPServerURLDefinition": { + "description": "URL-based MCP server connection as returned in API responses.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "name", + "url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "url" + ], + "examples": [ + "url" + ] + }, + "name": { + "type": "string", + "examples": [ + "example-mcp" + ] + }, + "url": { + "type": "string", + "examples": [ + "https://example-server.modelcontextprotocol.io/sse" + ] + } + }, + "example": { + "type": "url", + "name": "example-mcp", + "url": "https://example-server.modelcontextprotocol.io/sse" + } + }, + "BetaManagedAgentsMCPToolConfig": { + "description": "Resolved configuration for a specific MCP tool.", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "enabled", + "permission_policy" + ], + "properties": { + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "permission_policy": { + "$ref": "#/components/schemas/BetaManagedAgentsPermissionPolicy" + } + } + }, + "BetaManagedAgentsMCPToolConfigParams": { + "description": "Configuration override for a specific MCP tool.", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name of the MCP tool to configure. 1-128 characters.", + "type": "string", + "minLength": 1, + "maxLength": 128 + }, + "enabled": { + "description": "Whether this tool is enabled. Overrides the `default_config` setting.", + "type": "boolean", + "nullable": true + }, + "permission_policy": { + "description": "Permission policy for this tool. Overrides the `default_config` setting.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsPermissionPolicy" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsMCPToolset": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "mcp_server_name", + "default_config", + "configs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_toolset" + ] + }, + "mcp_server_name": { + "type": "string" + }, + "default_config": { + "$ref": "#/components/schemas/BetaManagedAgentsMCPToolsetDefaultConfig" + }, + "configs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMCPToolConfig" + } + } + } + }, + "BetaManagedAgentsMCPToolsetDefaultConfig": { + "description": "Resolved default configuration for all tools from an MCP server.", + "type": "object", + "additionalProperties": false, + "required": [ + "enabled", + "permission_policy" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "permission_policy": { + "$ref": "#/components/schemas/BetaManagedAgentsPermissionPolicy" + } + } + }, + "BetaManagedAgentsMCPToolsetDefaultConfigParams": { + "description": "Default configuration for all tools from an MCP server.", + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "description": "Whether tools are enabled by default. Defaults to true if not specified.", + "type": "boolean", + "nullable": true + }, + "permission_policy": { + "description": "Default permission policy for tools from this server.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsPermissionPolicy" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsMCPToolsetParams": { + "description": "Configuration for tools from an MCP server defined in `mcp_servers`.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "mcp_server_name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_toolset" + ] + }, + "mcp_server_name": { + "description": "Name of the MCP server. Must match a server name from the mcp_servers array. 1-255 characters.", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "default_config": { + "description": "Default configuration for all tools from this server.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMCPToolsetDefaultConfigParams" + } + ], + "nullable": true + }, + "configs": { + "description": "Per-tool configuration overrides.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMCPToolConfigParams" + } + } + } + }, + "BetaManagedAgentsMcpAuthenticationFailedError": { + "description": "Authentication to an MCP server failed.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "message", + "retry_status", + "mcp_server_name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_authentication_failed_error" + ] + }, + "message": { + "description": "Human-readable error description.", + "type": "string" + }, + "retry_status": { + "description": "What the client should do next.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRetryStatus" + } + ] + }, + "mcp_server_name": { + "description": "Name of the MCP server that failed authentication.", + "type": "string" + } + } + }, + "BetaManagedAgentsMcpConnectionFailedError": { + "description": "Failed to connect to an MCP server.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "message", + "retry_status", + "mcp_server_name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_connection_failed_error" + ] + }, + "message": { + "description": "Human-readable error description.", + "type": "string" + }, + "retry_status": { + "description": "What the client should do next.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRetryStatus" + } + ] + }, + "mcp_server_name": { + "description": "Name of the MCP server that failed to connect.", + "type": "string" + } + } + }, + "BetaManagedAgentsMcpOauthAuthResponse": { + "description": "OAuth credential details for an MCP server.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "mcp_server_url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_oauth" + ] + }, + "mcp_server_url": { + "description": "URL of the MCP server this credential authenticates against.", + "type": "string" + }, + "expires_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "nullable": true + }, + "refresh": { + "description": "Refresh token configuration, if the credential supports token refresh.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMcpOauthRefreshResponse" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsMcpOauthCreateParams": { + "description": "Parameters for creating an MCP OAuth credential.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "mcp_server_url", + "access_token" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_oauth" + ] + }, + "mcp_server_url": { + "description": "URL of the MCP server this credential authenticates against.", + "type": "string", + "minLength": 1, + "maxLength": 2047 + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "minLength": 1, + "maxLength": 8192 + }, + "expires_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "nullable": true + }, + "refresh": { + "description": "Refresh token configuration, if the credential supports token refresh.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMcpOauthRefreshParams" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsMcpOauthRefreshParams": { + "description": "OAuth refresh token parameters for creating a credential with refresh support.", + "type": "object", + "additionalProperties": false, + "required": [ + "refresh_token", + "token_endpoint", + "client_id", + "token_endpoint_auth" + ], + "properties": { + "refresh_token": { + "description": "OAuth refresh token.", + "type": "string", + "minLength": 1, + "maxLength": 4096 + }, + "token_endpoint": { + "description": "Token endpoint URL used to refresh the access token.", + "type": "string", + "minLength": 1, + "maxLength": 2047 + }, + "client_id": { + "description": "OAuth client ID.", + "type": "string", + "minLength": 1, + "maxLength": 1024 + }, + "scope": { + "description": "OAuth scope for the refresh request.", + "type": "string", + "minLength": 1, + "maxLength": 8192, + "nullable": true + }, + "resource": { + "description": "OAuth resource indicator.", + "type": "string", + "minLength": 1, + "maxLength": 2047, + "nullable": true + }, + "token_endpoint_auth": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "none": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthNoneParam", + "client_secret_basic": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthBasicParam", + "client_secret_post": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthPostParam" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthNoneParam" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthBasicParam" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthPostParam" + } + ] + } + } + }, + "BetaManagedAgentsMcpOauthRefreshResponse": { + "description": "OAuth refresh token configuration returned in credential responses.", + "type": "object", + "additionalProperties": false, + "required": [ + "token_endpoint", + "client_id", + "token_endpoint_auth" + ], + "properties": { + "token_endpoint": { + "description": "Token endpoint URL used to refresh the access token.", + "type": "string" + }, + "client_id": { + "description": "OAuth client ID.", + "type": "string" + }, + "resource": { + "description": "OAuth resource indicator.", + "type": "string", + "nullable": true + }, + "scope": { + "description": "OAuth scope for the refresh request.", + "type": "string", + "nullable": true + }, + "token_endpoint_auth": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "none": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthNoneResponse", + "client_secret_basic": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthBasicResponse", + "client_secret_post": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthPostResponse" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthNoneResponse" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthBasicResponse" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthPostResponse" + } + ] + } + } + }, + "BetaManagedAgentsMcpOauthRefreshUpdateParams": { + "description": "Parameters for updating OAuth refresh token configuration.", + "type": "object", + "additionalProperties": false, + "properties": { + "refresh_token": { + "description": "Updated OAuth refresh token.", + "type": "string", + "minLength": 1, + "maxLength": 4096, + "nullable": true + }, + "scope": { + "description": "Updated OAuth scope for the refresh request.", + "type": "string", + "maxLength": 8192, + "nullable": true + }, + "token_endpoint_auth": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "client_secret_basic": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthBasicUpdateParam", + "client_secret_post": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthPostUpdateParam" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthBasicUpdateParam" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsTokenEndpointAuthPostUpdateParam" + } + ] + } + } + }, + "BetaManagedAgentsMcpOauthUpdateParams": { + "description": "Parameters for updating an MCP OAuth credential. The `mcp_server_url` is immutable.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_oauth" + ] + }, + "access_token": { + "description": "Updated OAuth access token.", + "type": "string", + "minLength": 1, + "maxLength": 8192, + "nullable": true + }, + "expires_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "nullable": true + }, + "refresh": { + "description": "Updated refresh token configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMcpOauthRefreshUpdateParams" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsMcpProbe": { + "description": "The failing step of an MCP validation probe.", + "type": "object", + "additionalProperties": false, + "required": [ + "method", + "http_response" + ], + "properties": { + "method": { + "description": "The MCP method that failed (for example `initialize` or `tools/list`).", + "type": "string" + }, + "http_response": { + "description": "The captured HTTP error response. Null when no HTTP response was received (timeout, DNS, TLS).", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRefreshHttpResponse" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsMemory": { + "description": "A `memory` object: a single text document at a hierarchical path inside a memory store. The `content` field is populated when `view=full` and `null` when `view=basic`; the `content_size_bytes` and `content_sha256` fields are always populated so sync clients can diff without fetching content. Memories are addressed by their `mem_...` ID; the path is the create key and can be changed via update.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "memory_store_id", + "path", + "content_size_bytes", + "content_sha256", + "memory_version_id", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory" + ] + }, + "id": { + "description": "Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.", + "type": "string" + }, + "memory_store_id": { + "description": "ID of the memory store this memory belongs to (a `memstore_...` value).", + "type": "string" + }, + "path": { + "description": "Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.", + "type": "string" + }, + "content": { + "description": "The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).", + "type": "string", + "nullable": true + }, + "content_size_bytes": { + "description": "Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.", + "type": "integer", + "format": "int32" + }, + "content_sha256": { + "description": "Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.", + "type": "string" + }, + "memory_version_id": { + "description": "ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the full history via [List memory versions](/en/api/beta/memory_stores/memory_versions/list).", + "type": "string" + }, + "created_at": { + "description": "When this memory was created, in RFC 3339 format.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "updated_at": { + "description": "When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/en/api/beta/memory_stores/memory_versions/list).", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + } + } + }, + "BetaManagedAgentsMemoryListItem": { + "description": "One item in a [List memories](/en/api/beta/memory_stores/memories/list) response: either a `memory` object or, when `depth` is set, a `memory_prefix` rollup marker.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "memory": "#/components/schemas/BetaManagedAgentsMemory", + "memory_prefix": "#/components/schemas/BetaManagedAgentsMemoryPrefix" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMemory" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryPrefix" + } + ] + }, + "BetaManagedAgentsMemoryPathConflictError": { + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_path_conflict_error" + ] + }, + "message": { + "type": "string" + }, + "conflicting_path": { + "type": "string" + }, + "conflicting_memory_id": { + "type": "string" + } + } + }, + "BetaManagedAgentsMemoryPreconditionFailedError": { + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_precondition_failed_error" + ] + }, + "message": { + "type": "string" + } + } + }, + "BetaManagedAgentsMemoryPrefix": { + "description": "A rolled-up directory marker returned by [List memories](/en/api/beta/memory_stores/memories/list) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "path" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_prefix" + ] + }, + "path": { + "description": "The rolled-up path prefix, including a trailing `/` (e.g. `/projects/foo/`). Pass this value as `path_prefix` on a subsequent list call to drill into the directory.", + "type": "string" + } + } + }, + "BetaManagedAgentsMemoryStore": { + "description": "A `memory_store`: a named container for agent memories, scoped to a workspace. Attach a store to a session via `resources[]` to mount it as a directory the agent can read and write.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "name", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_store" + ] + }, + "id": { + "description": "Unique identifier for the memory store (a `memstore_...` tagged ID). Use this when attaching the store to a session, or in the `{memory_store_id}` path parameter of subsequent calls.", + "type": "string" + }, + "name": { + "description": "Human-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name.", + "type": "string" + }, + "description": { + "description": "Free-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset.", + "type": "string" + }, + "created_at": { + "description": "Timestamp when the store was created.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "updated_at": { + "description": "Timestamp when the store's `name`, `description`, or `metadata` was last modified. Memory writes inside the store do not advance this.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "metadata": { + "description": "Arbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "archived_at": { + "description": "Timestamp when the store was archived, or `null` if active. Set once and never cleared; archiving is one-way. Archived stores are read-only and cannot be attached to new sessions.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsMemoryStoreResource": { + "description": "A memory store attached to an agent session.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "memory_store_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_store" + ] + }, + "memory_store_id": { + "description": "The memory store ID (memstore_...). Must belong to the caller's organization and workspace.", + "type": "string" + }, + "access": { + "description": "Access mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMountMode" + } + ], + "nullable": true + }, + "name": { + "description": "Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.", + "type": "string", + "nullable": true + }, + "description": { + "description": "Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.", + "type": "string" + }, + "instructions": { + "description": "Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.", + "type": "string", + "maxLength": 4096, + "nullable": true + }, + "mount_path": { + "description": "Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsMemoryStoreResourceParam": { + "description": "Parameters for attaching a memory store to an agent session.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "memory_store_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_store" + ] + }, + "memory_store_id": { + "description": "The memory store ID (memstore_...). Must belong to the caller's organization and workspace.", + "type": "string" + }, + "access": { + "description": "Access mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMountMode" + } + ], + "nullable": true + }, + "instructions": { + "description": "Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.", + "type": "string", + "maxLength": 4096, + "nullable": true + } + } + }, + "BetaManagedAgentsMemoryVersion": { + "description": "A `memory_version` object: one immutable, attributed row in a memory's append-only history. Every non-no-op mutation to a memory produces a new version. Versions belong to the store (not the individual memory) and persist after the memory is deleted. Retrieving a redacted version returns 200 with `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`; branch on `redacted_at`, not HTTP status.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "memory_store_id", + "memory_id", + "operation", + "created_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_version" + ] + }, + "id": { + "description": "Unique identifier for this version (a `memver_...` value).", + "type": "string" + }, + "memory_store_id": { + "description": "ID of the memory store this version belongs to (a `memstore_...` value).", + "type": "string" + }, + "memory_id": { + "description": "ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/en/api/beta/memory_stores/memory_versions/list) to retrieve the full lineage including the `deleted` row.", + "type": "string" + }, + "path": { + "description": "The memory's path at the time of this write. `null` if and only if `redacted_at` is set.", + "type": "string", + "nullable": true + }, + "operation": { + "description": "The kind of mutation this version records: `created`, `modified`, or `deleted`.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersionOperation" + } + ] + }, + "content": { + "description": "The memory's UTF-8 text content as of this version. `null` when `view=basic`, when `operation` is `deleted`, or when `redacted_at` is set.", + "type": "string", + "nullable": true + }, + "content_size_bytes": { + "description": "Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.", + "type": "integer", + "format": "int32", + "nullable": true + }, + "content_sha256": { + "description": "Lowercase hex SHA-256 digest of `content` as of this version (64 characters). `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.", + "type": "string", + "nullable": true + }, + "created_by": { + "description": "Who performed this write: a `session_actor`, `api_actor`, or `user_actor`. Captured at write time and preserved through redaction.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsActor" + } + ] + }, + "created_at": { + "description": "When this version was written, in RFC 3339 format.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "redacted_at": { + "description": "When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/en/api/beta/memory_stores/memory_versions/redact).", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true + }, + "redacted_by": { + "description": "Who redacted this version, or `null` if it has not been redacted. In practice always an `api_actor` or `user_actor` (agents do not have a redact capability).", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsActor" + } + ] + } + } + }, + "BetaManagedAgentsMemoryVersionOperation": { + "type": "string", + "description": "The kind of mutation a `memory_version` records. Every non-no-op mutation to a memory appends exactly one version row with one of these values.", + "enum": [ + "created", + "modified", + "deleted" + ] + }, + "BetaManagedAgentsMemoryView": { + "type": "string", + "description": "Selects which projection of a `memory` or `memory_version` the server returns. `basic` returns the object with `content` set to `null`; `full` populates `content`. When omitted, the default is endpoint-specific: retrieve operations default to `full`; list, create, and update operations default to `basic`. Listing with `view=full` caps `limit` at 20.", + "enum": [ + "basic", + "full" + ] + }, + "BetaManagedAgentsModelConfig": { + "description": "Model identifier and configuration.", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/BetaManagedAgentsModel" + }, + "speed": { + "description": "Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Defaults to `standard`. Not all models support `fast`; invalid combinations are rejected at create time.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSpeed" + } + ], + "examples": [ + "standard" + ] + } + }, + "example": { + "id": "claude-opus-4-6", + "speed": "standard" + } + }, + "BetaManagedAgentsModelConfigParams": { + "description": "An object that defines additional configuration control over model use", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/BetaManagedAgentsModel" + }, + "speed": { + "description": "Inference speed mode. Defaults to `standard`.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSpeed" + } + ], + "nullable": true + } + }, + "example": { + "id": "claude-opus-4-6" + } + }, + "BetaManagedAgentsModelOverloadedError": { + "description": "The model is currently overloaded. Emitted after automatic retries are exhausted.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "message", + "retry_status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "model_overloaded_error" + ] + }, + "message": { + "description": "Human-readable error description.", + "type": "string" + }, + "retry_status": { + "description": "What the client should do next.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRetryStatus" + } + ] + } + } + }, + "BetaManagedAgentsModelParams": { + "oneOf": [ + { + "title": "BetaManagedAgentsModel", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsModel" + } + ], + "x-stainless-skip": [ + "go", + "cli" + ] + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsModelConfigParams" + } + ] + }, + "BetaManagedAgentsModelRateLimitedError": { + "description": "The model request was rate-limited.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "message", + "retry_status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "model_rate_limited_error" + ] + }, + "message": { + "description": "Human-readable error description.", + "type": "string" + }, + "retry_status": { + "description": "What the client should do next.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRetryStatus" + } + ] + } + } + }, + "BetaManagedAgentsModelRequestFailedError": { + "description": "A model request failed for a reason other than overload or rate-limiting.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "message", + "retry_status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "model_request_failed_error" + ] + }, + "message": { + "description": "Human-readable error description.", + "type": "string" + }, + "retry_status": { + "description": "What the client should do next.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRetryStatus" + } + ] + } + } + }, + "BetaManagedAgentsMountMode": { + "type": "string", + "description": "Access mode for an attached memory store.", + "enum": [ + "read_write", + "read_only" + ] + }, + "BetaManagedAgentsMultiagent": { + "description": "Resolved multiagent orchestration configuration as returned in API responses.", + "discriminator": { + "propertyName": "type", + "mapping": { + "coordinator": "#/components/schemas/BetaManagedAgentsMultiagentCoordinator" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMultiagentCoordinator" + } + ] + }, + "BetaManagedAgentsMultiagentCoordinator": { + "description": "Resolved coordinator topology with a concrete agent roster.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "agents" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "coordinator" + ] + }, + "agents": { + "description": "Agents the coordinator may spawn as session threads, each resolved to a specific version.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentReference" + } + } + } + }, + "BetaManagedAgentsMultiagentCoordinatorParams": { + "description": "A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the `agents` roster.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "agents" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "coordinator" + ], + "examples": [ + "coordinator" + ] + }, + "agents": { + "description": "Agents the coordinator may spawn as session threads. 1–20 entries. Each entry is an agent ID string, a versioned `{\"type\":\"agent\",\"id\",\"version\"}` reference, or `{\"type\":\"self\"}` to allow recursive self-invocation. Entries must reference distinct agents (after resolving `self` and string forms); at most one `self`. Referenced agents must exist, must not be archived, and must not themselves have `multiagent` set (depth limit 1).", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMultiagentRosterEntryParams" + }, + "examples": [ + [ + "agent_011CZkYqphY8vELVzwCUpqiQ", + { + "type": "self" + } + ] + ] + } + }, + "example": { + "type": "coordinator", + "agents": [ + "agent_011CZkYqphY8vELVzwCUpqiQ", + { + "type": "self" + } + ] + } + }, + "BetaManagedAgentsMultiagentParams": { + "description": "Multiagent orchestration configuration. Currently supports the `coordinator` topology.", + "discriminator": { + "propertyName": "type", + "mapping": { + "coordinator": "#/components/schemas/BetaManagedAgentsMultiagentCoordinatorParams" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMultiagentCoordinatorParams" + } + ] + }, + "BetaManagedAgentsMultiagentRosterEntryParams": { + "description": "An entry in a multiagent roster: an agent ID string, a versioned agent reference, or `self`.", + "oneOf": [ + { + "type": "string" + }, + { + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMultiagentSelfParams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "agent": "#/components/schemas/BetaManagedAgentsAgentParams", + "self": "#/components/schemas/BetaManagedAgentsMultiagentSelfParams" + } + } + } + ] + }, + "BetaManagedAgentsMultiagentSelfParams": { + "description": "Sentinel roster entry meaning \"the agent that owns this configuration\". Resolved server-side to a concrete agent reference.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "self" + ], + "examples": [ + "self" + ] + } + }, + "example": { + "type": "self" + } + }, + "BetaManagedAgentsOutcomeEvaluationResource": { + "description": "Evaluation state for a single outcome defined via a define_outcome event.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "outcome_id", + "description", + "result", + "iteration", + "completed_at", + "explanation" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "outcome_evaluation" + ], + "examples": [ + "outcome_evaluation" + ] + }, + "outcome_id": { + "description": "Server-generated outc_ ID for this outcome.", + "type": "string", + "examples": [ + "outc_011CZkZRSw2kEfs6ncTVljxP" + ] + }, + "description": { + "description": "What the agent should produce.", + "type": "string", + "examples": [ + "Produce a 2-page summary as summary.md" + ] + }, + "result": { + "description": "Current evaluation state. `pending` before the agent begins work; `running` while producing or revising; `evaluating` while the grader scores; `satisfied`/`max_iterations_reached`/`failed`/`interrupted` are terminal.", + "type": "string", + "examples": [ + "satisfied" + ] + }, + "iteration": { + "description": "0-indexed revision cycle the outcome is currently on.", + "type": "integer", + "format": "int32", + "examples": [ + 0 + ] + }, + "completed_at": { + "description": "When the outcome reached a terminal result. Null while pending/running/evaluating.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true, + "examples": [ + "2026-03-15T10:02:31Z" + ] + }, + "explanation": { + "description": "Grader's verdict text from the most recent evaluation. For satisfied, explains why criteria are met; for needs_revision (intermediate), what's missing; for failed, why unrecoverable.", + "type": "string", + "nullable": true, + "examples": [ + "All five sections present with inline citations." + ] + } + }, + "example": { + "type": "outcome_evaluation", + "outcome_id": "outc_011CZkZRSw2kEfs6ncTVljxP", + "description": "Produce a 2-page summary as summary.md", + "result": "satisfied", + "iteration": 0, + "completed_at": "2026-03-15T10:02:31Z", + "explanation": "All five sections present with inline citations." + } + }, + "BetaManagedAgentsPermissionPolicy": { + "description": "Permission policy for tool execution.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "always_allow": "#/components/schemas/BetaManagedAgentsAlwaysAllowPolicy", + "always_ask": "#/components/schemas/BetaManagedAgentsAlwaysAskPolicy" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAlwaysAllowPolicy" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAlwaysAskPolicy" + } + ] + }, + "BetaManagedAgentsPlainTextDocumentSource": { + "description": "Plain text document content.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "media_type", + "data" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ] + }, + "media_type": { + "description": "MIME type of the text content. Must be \"text/plain\".", + "type": "string", + "enum": [ + "text/plain" + ] + }, + "data": { + "description": "The plain text content.", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsPrecondition": { + "description": "Optional condition that must hold for an update to apply. When omitted, the update is unconditional. Asserts the current state of the memory being updated. When an update changes `path`, the precondition still refers to the memory's current content, not the destination path. Currently the only supported variant is `content_sha256`.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "content_sha256": "#/components/schemas/BetaManagedAgentsContentSha256Precondition" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsContentSha256Precondition" + } + ] + }, + "BetaManagedAgentsRefreshHttpResponse": { + "description": "An HTTP response captured during a credential validation probe.", + "type": "object", + "additionalProperties": false, + "required": [ + "status_code", + "content_type", + "body", + "body_truncated" + ], + "properties": { + "status_code": { + "description": "HTTP status code.", + "type": "integer", + "format": "int32" + }, + "content_type": { + "description": "Value of the `Content-Type` response header.", + "type": "string" + }, + "body": { + "description": "Response body. May be truncated and has sensitive values scrubbed.", + "type": "string" + }, + "body_truncated": { + "description": "Whether `body` was truncated.", + "type": "boolean" + } + } + }, + "BetaManagedAgentsRefreshObject": { + "description": "Outcome of a refresh-token exchange attempted during credential validation.", + "type": "object", + "additionalProperties": false, + "required": [ + "status", + "http_response" + ], + "properties": { + "status": { + "description": "Outcome of the refresh attempt.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsCredentialRefreshStatus" + } + ] + }, + "http_response": { + "description": "The captured HTTP error response from the token endpoint. Populated only when `status` is `failed`.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRefreshHttpResponse" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsRepositoryCheckout": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "branch": "#/components/schemas/BetaManagedAgentsBranchCheckout", + "commit": "#/components/schemas/BetaManagedAgentsCommitCheckout" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsBranchCheckout" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsCommitCheckout" + } + ] + }, + "BetaManagedAgentsRetryStatus": { + "description": "What the client should do next in response to this error.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "retrying": "#/components/schemas/BetaManagedAgentsRetryStatusRetrying", + "exhausted": "#/components/schemas/BetaManagedAgentsRetryStatusExhausted", + "terminal": "#/components/schemas/BetaManagedAgentsRetryStatusTerminal" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRetryStatusRetrying" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsRetryStatusExhausted" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsRetryStatusTerminal" + } + ] + }, + "BetaManagedAgentsRetryStatusExhausted": { + "description": "This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "exhausted" + ] + } + } + }, + "BetaManagedAgentsRetryStatusRetrying": { + "description": "The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "retrying" + ] + } + } + }, + "BetaManagedAgentsRetryStatusTerminal": { + "description": "The session encountered a terminal error and will transition to `terminated` state.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "terminal" + ] + } + } + }, + "BetaManagedAgentsRubric": { + "description": "Rubric for grading the quality of an outcome.", + "discriminator": { + "propertyName": "type", + "mapping": { + "file": "#/components/schemas/BetaManagedAgentsFileRubric", + "text": "#/components/schemas/BetaManagedAgentsTextRubric" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsFileRubric" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsTextRubric" + } + ] + }, + "BetaManagedAgentsRubricParams": { + "description": "Rubric for grading the quality of an outcome.", + "discriminator": { + "propertyName": "type", + "mapping": { + "file": "#/components/schemas/BetaManagedAgentsFileRubricParams", + "text": "#/components/schemas/BetaManagedAgentsTextRubricParams" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsFileRubricParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsTextRubricParams" + } + ] + }, + "BetaManagedAgentsSearchResultBlock": { + "description": "A block containing a web search result.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "source", + "title", + "content", + "citations" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "search_result" + ] + }, + "source": { + "description": "The URL source of the search result.", + "type": "string", + "minLength": 1 + }, + "title": { + "description": "The title of the search result.", + "type": "string", + "minLength": 1 + }, + "content": { + "description": "Array of text content blocks from the search result.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSearchResultContent" + } + }, + "citations": { + "description": "Citation settings for this search result.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSearchResultCitations" + } + ] + } + } + }, + "BetaManagedAgentsSearchResultCitations": { + "description": "Citation settings for a search result.", + "type": "object", + "additionalProperties": false, + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "description": "Whether citations are enabled for this search result.", + "type": "boolean" + } + } + }, + "BetaManagedAgentsSearchResultContent": { + "description": "Text content within a search result.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ] + }, + "text": { + "description": "The text content.", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsSendSessionEvents": { + "description": "Events that were successfully sent to the session.", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "description": "Sent events", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsInputEvent" + } + } + } + }, + "BetaManagedAgentsSendSessionEventsParams": { + "description": "Request parameters for sending events to a `session`.", + "type": "object", + "additionalProperties": false, + "required": [ + "events" + ], + "properties": { + "events": { + "description": "Events to send to the `session`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsEventParams" + }, + "examples": [ + [ + { + "type": "user.message", + "content": [ + { + "type": "text", + "text": "Where is my order #1234?" + } + ] + } + ] + ] + } + }, + "example": { + "events": [ + { + "type": "user.message", + "content": [ + { + "type": "text", + "text": "Where is my order #1234?" + } + ] + } + ] + } + }, + "BetaManagedAgentsSession": { + "description": "A Managed Agents `session`.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "status", + "created_at", + "updated_at", + "environment_id", + "title", + "metadata", + "agent", + "resources", + "vault_ids", + "outcome_evaluations", + "usage", + "stats", + "archived_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session" + ], + "examples": [ + "session" + ] + }, + "id": { + "type": "string", + "examples": [ + "sesn_011CZkZAtmR3yMPDzynEDxu7" + ] + }, + "status": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatus", + "examples": [ + "idle" + ] + }, + "created_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "updated_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "environment_id": { + "type": "string", + "examples": [ + "env_011CZkZ9X2dpNyB7HsEFoRfW" + ] + }, + "title": { + "type": "string", + "nullable": true, + "examples": [ + "Order #1234 inquiry" + ] + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "examples": [ + { + "key": "value" + } + ] + }, + "agent": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionAgent", + "examples": [ + { + "type": "agent", + "id": "agent_011CZkYpogX7uDKUyvBTophP", + "version": 1, + "name": "My First Agent", + "description": "A general-purpose starter agent.", + "model": { + "id": "claude-sonnet-4-6", + "speed": "standard" + }, + "system": "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.", + "tools": [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ], + "mcp_servers": [ + { + "type": "url", + "name": "example-mcp", + "url": "https://example-server.modelcontextprotocol.io/sse" + } + ], + "skills": [ + { + "type": "anthropic", + "skill_id": "xlsx", + "version": "1" + }, + { + "type": "custom", + "skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx", + "version": "2" + } + ], + "multiagent": null + } + ] + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionResource" + }, + "examples": [ + [ + { + "type": "file", + "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", + "mount_path": "/uploads/receipt.pdf", + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + }, + { + "type": "github_repository", + "id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu", + "url": "https://github.com/example-org/example-repo", + "mount_path": "/workspace/example-repo", + "checkout": { + "type": "branch", + "name": "main" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + } + ] + ] + }, + "vault_ids": { + "description": "Vault IDs attached to the session at creation. Empty when no vaults were supplied.", + "type": "array", + "items": { + "type": "string" + }, + "examples": [ + [ + "vlt_011CZkZDLs7fYzm1hXNPeRjv" + ] + ] + }, + "outcome_evaluations": { + "description": "Per-outcome evaluation state. One entry per define_outcome event sent to the session.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsOutcomeEvaluationResource" + }, + "examples": [ + [ + { + "type": "outcome_evaluation", + "outcome_id": "outc_011CZkZRSw2kEfs6ncTVljxP", + "description": "Produce a 2-page summary as summary.md", + "result": "satisfied", + "iteration": 0, + "completed_at": "2026-03-15T10:02:31Z", + "explanation": "All five sections present with inline citations." + } + ] + ] + }, + "usage": { + "description": "Cumulative token usage for the session.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionUsage" + } + ], + "examples": [ + { + "input_tokens": 0, + "output_tokens": 0, + "cache_read_input_tokens": 0 + } + ] + }, + "stats": { + "description": "Timing statistics for the session.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStats" + } + ], + "examples": [ + { + "duration_seconds": 0, + "active_seconds": 0 + } + ] + }, + "archived_at": { + "description": "When the session was archived. Null if not archived.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true, + "examples": [ + null + ] + } + }, + "example": { + "type": "session", + "id": "sesn_011CZkZAtmR3yMPDzynEDxu7", + "status": "idle", + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null, + "environment_id": "env_011CZkZ9X2dpNyB7HsEFoRfW", + "title": "Order #1234 inquiry", + "metadata": {}, + "agent": { + "type": "agent", + "id": "agent_011CZkYpogX7uDKUyvBTophP", + "version": 1, + "name": "My First Agent", + "description": "A general-purpose starter agent.", + "model": { + "id": "claude-sonnet-4-6", + "speed": "standard" + }, + "system": "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.", + "tools": [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ], + "mcp_servers": [ + { + "type": "url", + "name": "example-mcp", + "url": "https://example-server.modelcontextprotocol.io/sse" + } + ], + "skills": [ + { + "type": "anthropic", + "skill_id": "xlsx", + "version": "1" + }, + { + "type": "custom", + "skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx", + "version": "2" + } + ], + "multiagent": null + }, + "resources": [ + { + "type": "file", + "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", + "mount_path": "/uploads/receipt.pdf", + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + }, + { + "type": "github_repository", + "id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu", + "url": "https://github.com/example-org/example-repo", + "mount_path": "/workspace/example-repo", + "checkout": { + "type": "branch", + "name": "main" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + } + ], + "vault_ids": [ + "vlt_011CZkZDLs7fYzm1hXNPeRjv" + ], + "usage": { + "input_tokens": 0, + "output_tokens": 0, + "cache_read_input_tokens": 0 + }, + "stats": { + "duration_seconds": 0, + "active_seconds": 0 + }, + "outcome_evaluations": [ + { + "type": "outcome_evaluation", + "outcome_id": "outc_011CZkZRSw2kEfs6ncTVljxP", + "description": "Produce a 2-page summary as summary.md", + "result": "satisfied", + "iteration": 0, + "completed_at": "2026-03-15T10:02:31Z", + "explanation": "All five sections present with inline citations." + } + ] + } + }, + "BetaManagedAgentsSessionActor": { + "description": "Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "session_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session_actor" + ] + }, + "session_id": { + "description": "ID of the session that performed the write (a `sesn_...` value). Look up the session via [Retrieve a session](/en/api/sessions-retrieve) for further provenance.", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsSessionAgent": { + "description": "Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "version", + "name", + "description", + "model", + "system", + "tools", + "mcp_servers", + "skills", + "multiagent" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent" + ], + "examples": [ + "agent" + ] + }, + "id": { + "type": "string", + "examples": [ + "agent_011CZkYpogX7uDKUyvBTophP" + ] + }, + "version": { + "type": "integer", + "format": "int32", + "examples": [ + 1 + ] + }, + "name": { + "type": "string", + "examples": [ + "My First Agent" + ] + }, + "description": { + "type": "string", + "nullable": true, + "examples": [ + "A general-purpose starter agent." + ] + }, + "model": { + "$ref": "#/components/schemas/BetaManagedAgentsModelConfig", + "examples": [ + { + "id": "claude-sonnet-4-6", + "speed": "standard" + } + ] + }, + "system": { + "type": "string", + "nullable": true, + "examples": [ + "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end." + ] + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentTool" + }, + "examples": [ + [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ] + ] + }, + "mcp_servers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMCPServer" + }, + "examples": [ + [ + { + "type": "url", + "name": "example-mcp", + "url": "https://example-server.modelcontextprotocol.io/sse" + } + ] + ] + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSkill" + }, + "examples": [ + [ + { + "type": "anthropic", + "skill_id": "xlsx", + "version": "1" + }, + { + "type": "custom", + "skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx", + "version": "2" + } + ] + ] + }, + "multiagent": { + "description": "Resolved multiagent orchestration configuration. Null when the agent is single-threaded.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionMultiagent" + } + ], + "nullable": true, + "examples": [ + null + ] + } + }, + "example": { + "type": "agent", + "id": "agent_011CZkYpogX7uDKUyvBTophP", + "version": 1, + "name": "My First Agent", + "description": "A general-purpose starter agent.", + "model": { + "id": "claude-sonnet-4-6", + "speed": "standard" + }, + "system": "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.", + "tools": [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ], + "mcp_servers": [ + { + "type": "url", + "name": "example-mcp", + "url": "https://example-server.modelcontextprotocol.io/sse" + } + ], + "skills": [ + { + "type": "anthropic", + "skill_id": "xlsx", + "version": "1" + }, + { + "type": "custom", + "skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx", + "version": "2" + } + ], + "multiagent": null + } + }, + "BetaManagedAgentsSessionAgentUpdate": { + "description": "Mid-session agent configuration update. Only `tools` and `mcp_servers` are updatable. Full replacement: the provided array becomes the new value. To preserve existing entries, GET the session, modify the array, and POST it back.", + "type": "object", + "additionalProperties": false, + "properties": { + "tools": { + "description": "Replacement tool list. Full replacement: the provided array becomes the new value. Send an empty array to clear; omit to preserve.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolParams" + } + }, + "mcp_servers": { + "description": "Replacement MCP server list. Full replacement: the provided array becomes the new value. Send an empty array to clear; omit to preserve.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMCPServerParams" + } + } + } + }, + "BetaManagedAgentsSessionDeletedEvent": { + "description": "Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.deleted" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp when the session was deleted.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + } + } + }, + "BetaManagedAgentsSessionEndTurn": { + "description": "The agent completed its turn naturally and is ready for the next user message.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "end_turn" + ] + } + } + }, + "BetaManagedAgentsSessionErrorEvent": { + "description": "An error event indicating a problem occurred during session execution.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at", + "error" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.error" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp when the error occurred.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "error": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "unknown_error": "#/components/schemas/BetaManagedAgentsUnknownError", + "model_overloaded_error": "#/components/schemas/BetaManagedAgentsModelOverloadedError", + "model_rate_limited_error": "#/components/schemas/BetaManagedAgentsModelRateLimitedError", + "model_request_failed_error": "#/components/schemas/BetaManagedAgentsModelRequestFailedError", + "mcp_connection_failed_error": "#/components/schemas/BetaManagedAgentsMcpConnectionFailedError", + "mcp_authentication_failed_error": "#/components/schemas/BetaManagedAgentsMcpAuthenticationFailedError", + "billing_error": "#/components/schemas/BetaManagedAgentsBillingError" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsUnknownError" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsModelOverloadedError" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsModelRateLimitedError" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsModelRequestFailedError" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMcpConnectionFailedError" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMcpAuthenticationFailedError" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsBillingError" + } + ] + } + } + }, + "BetaManagedAgentsSessionEvent": { + "description": "Union type for all event types in a session.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "user.message": "#/components/schemas/BetaManagedAgentsUserMessageEvent", + "user.interrupt": "#/components/schemas/BetaManagedAgentsUserInterruptEvent", + "user.tool_confirmation": "#/components/schemas/BetaManagedAgentsUserToolConfirmationEvent", + "user.custom_tool_result": "#/components/schemas/BetaManagedAgentsUserCustomToolResultEvent", + "agent.custom_tool_use": "#/components/schemas/BetaManagedAgentsAgentCustomToolUseEvent", + "agent.message": "#/components/schemas/BetaManagedAgentsAgentMessageEvent", + "agent.thinking": "#/components/schemas/BetaManagedAgentsAgentThinkingEvent", + "agent.mcp_tool_use": "#/components/schemas/BetaManagedAgentsAgentMcpToolUseEvent", + "agent.mcp_tool_result": "#/components/schemas/BetaManagedAgentsAgentMcpToolResultEvent", + "agent.tool_use": "#/components/schemas/BetaManagedAgentsAgentToolUseEvent", + "agent.tool_result": "#/components/schemas/BetaManagedAgentsAgentToolResultEvent", + "agent.thread_message_received": "#/components/schemas/BetaManagedAgentsAgentThreadMessageReceivedEvent", + "agent.thread_message_sent": "#/components/schemas/BetaManagedAgentsAgentThreadMessageSentEvent", + "agent.thread_context_compacted": "#/components/schemas/BetaManagedAgentsAgentThreadContextCompactedEvent", + "session.error": "#/components/schemas/BetaManagedAgentsSessionErrorEvent", + "session.status_rescheduled": "#/components/schemas/BetaManagedAgentsSessionStatusRescheduledEvent", + "session.status_running": "#/components/schemas/BetaManagedAgentsSessionStatusRunningEvent", + "session.status_idle": "#/components/schemas/BetaManagedAgentsSessionStatusIdleEvent", + "session.status_terminated": "#/components/schemas/BetaManagedAgentsSessionStatusTerminatedEvent", + "session.thread_created": "#/components/schemas/BetaManagedAgentsSessionThreadCreatedEvent", + "span.outcome_evaluation_start": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationStartEvent", + "span.outcome_evaluation_end": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationEndEvent", + "span.model_request_start": "#/components/schemas/BetaManagedAgentsSpanModelRequestStartEvent", + "span.model_request_end": "#/components/schemas/BetaManagedAgentsSpanModelRequestEndEvent", + "span.outcome_evaluation_ongoing": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent", + "user.define_outcome": "#/components/schemas/BetaManagedAgentsUserDefineOutcomeEvent", + "session.deleted": "#/components/schemas/BetaManagedAgentsSessionDeletedEvent", + "session.thread_status_running": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRunningEvent", + "session.thread_status_idle": "#/components/schemas/BetaManagedAgentsSessionThreadStatusIdleEvent", + "session.thread_status_terminated": "#/components/schemas/BetaManagedAgentsSessionThreadStatusTerminatedEvent", + "user.tool_result": "#/components/schemas/BetaManagedAgentsUserToolResultEvent", + "session.thread_status_rescheduled": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRescheduledEvent", + "session.updated": "#/components/schemas/BetaManagedAgentsSessionUpdatedEvent" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsUserMessageEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserInterruptEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolConfirmationEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserCustomToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentCustomToolUseEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentMessageEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThinkingEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentMcpToolUseEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentMcpToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolUseEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThreadMessageReceivedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThreadMessageSentEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThreadContextCompactedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionErrorEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusRescheduledEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusRunningEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusIdleEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusTerminatedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadCreatedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationStartEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationEndEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanModelRequestStartEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanModelRequestEndEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserDefineOutcomeEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionDeletedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRunningEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusIdleEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusTerminatedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRescheduledEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionUpdatedEvent" + } + ] + }, + "BetaManagedAgentsSessionMultiagent": { + "description": "Resolved multiagent orchestration configuration as returned on a `session`.", + "discriminator": { + "propertyName": "type", + "mapping": { + "coordinator": "#/components/schemas/BetaManagedAgentsSessionMultiagentCoordinator" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionMultiagentCoordinator" + } + ] + }, + "BetaManagedAgentsSessionMultiagentCoordinator": { + "description": "Resolved coordinator topology with full agent definitions for each roster member.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "agents" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "coordinator" + ] + }, + "agents": { + "description": "Full `agent` definitions the coordinator may spawn as session threads.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadAgent" + } + } + } + }, + "BetaManagedAgentsSessionRequiresAction": { + "description": "The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "event_ids" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "requires_action" + ] + }, + "event_ids": { + "description": "The ids of events the agent is blocked on. Resolving fewer than all re-emits `session.status_idle` with the remainder.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "BetaManagedAgentsSessionResource": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "github_repository": "#/components/schemas/BetaManagedAgentsGitHubRepositoryResource", + "file": "#/components/schemas/BetaManagedAgentsFileResource", + "memory_store": "#/components/schemas/BetaManagedAgentsMemoryStoreResource" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsGitHubRepositoryResource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsFileResource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryStoreResource" + } + ] + }, + "BetaManagedAgentsSessionResourceParams": { + "description": "Union of resources that can be mounted into a session.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "github_repository": "#/components/schemas/BetaManagedAgentsGitHubRepositoryResourceParams", + "file": "#/components/schemas/BetaManagedAgentsFileResourceParams", + "memory_store": "#/components/schemas/BetaManagedAgentsMemoryStoreResourceParam" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsGitHubRepositoryResourceParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsFileResourceParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryStoreResourceParam" + } + ], + "example": { + "type": "file", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", + "mount_path": "/uploads/receipt.pdf" + } + }, + "BetaManagedAgentsSessionRetriesExhausted": { + "description": "The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`).", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "retries_exhausted" + ] + } + } + }, + "BetaManagedAgentsSessionStats": { + "description": "Timing statistics for a session.", + "type": "object", + "additionalProperties": false, + "properties": { + "duration_seconds": { + "description": "Elapsed time since session creation in seconds. For terminated sessions, frozen at the final update.", + "type": "number", + "format": "double" + }, + "active_seconds": { + "description": "Cumulative time in seconds the session spent in running status. Excludes idle time.", + "type": "number", + "format": "double" + } + } + }, + "BetaManagedAgentsSessionStatus": { + "type": "string", + "description": "SessionStatus enum", + "enum": [ + "rescheduling", + "running", + "idle", + "terminated" + ] + }, + "BetaManagedAgentsSessionStatusIdleEvent": { + "description": "Indicates the agent has paused and is awaiting user input.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at", + "stop_reason" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.status_idle" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp of status change.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "stop_reason": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "end_turn": "#/components/schemas/BetaManagedAgentsSessionEndTurn", + "requires_action": "#/components/schemas/BetaManagedAgentsSessionRequiresAction", + "retries_exhausted": "#/components/schemas/BetaManagedAgentsSessionRetriesExhausted" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionEndTurn" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionRequiresAction" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionRetriesExhausted" + } + ] + } + } + }, + "BetaManagedAgentsSessionStatusRescheduledEvent": { + "description": "Indicates the session is recovering from an error state and is rescheduled for execution.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.status_rescheduled" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp of status change.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + } + } + }, + "BetaManagedAgentsSessionStatusRunningEvent": { + "description": "Indicates the session is actively running and the agent is working.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.status_running" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp of status change.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + } + } + }, + "BetaManagedAgentsSessionStatusTerminatedEvent": { + "description": "Indicates the session has terminated, either due to an error or completion.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.status_terminated" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp of status change.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + } + } + }, + "BetaManagedAgentsSessionThread": { + "description": "An execution thread within a `session`. Each session has one primary thread plus zero or more child threads spawned by the coordinator.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "session_id", + "status", + "agent", + "parent_thread_id", + "created_at", + "updated_at", + "archived_at", + "usage", + "stats" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session_thread" + ], + "examples": [ + "session_thread" + ] + }, + "id": { + "description": "Unique identifier for this thread.", + "type": "string", + "examples": [ + "sthr_011CZkZVWa6oIjw0rgXZpnBt" + ] + }, + "session_id": { + "description": "The session this thread belongs to.", + "type": "string", + "examples": [ + "sesn_011CZkZAtmR3yMPDzynEDxu7" + ] + }, + "status": { + "description": "Current execution status of the thread.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatus" + } + ], + "examples": [ + "idle" + ] + }, + "agent": { + "description": "Resolved agent definition for this thread. Snapshot of the agent at thread creation time.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadAgent" + } + ], + "examples": [ + { + "type": "agent", + "id": "agent_011CZkYqphY8vELVzwCUpqiQ", + "version": 1, + "name": "Researcher", + "description": "A focused research subagent.", + "model": { + "id": "claude-sonnet-4-6", + "speed": "standard" + }, + "system": "You are a research subagent that gathers and summarises sources for the coordinating agent.", + "tools": [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ], + "mcp_servers": [], + "skills": [] + } + ] + }, + "parent_thread_id": { + "description": "Parent thread that spawned this thread. Null for the primary thread.", + "type": "string", + "nullable": true, + "examples": [ + null + ] + }, + "created_at": { + "description": "When the thread was created.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "updated_at": { + "description": "When the thread was last updated.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "archived_at": { + "description": "When the thread was archived. Null if not archived.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true, + "examples": [ + null + ] + }, + "usage": { + "description": "Cumulative token usage for this thread. Null until the thread's first idle transition.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadUsage" + } + ], + "nullable": true, + "examples": [ + { + "input_tokens": 0, + "output_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + } + } + ] + }, + "stats": { + "description": "Timing statistics for this thread. Null until the thread's first status transition.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStats" + } + ], + "nullable": true, + "examples": [ + { + "duration_seconds": 0, + "startup_seconds": 0, + "active_seconds": 0 + } + ] + } + }, + "example": { + "type": "session_thread", + "id": "sthr_011CZkZVWa6oIjw0rgXZpnBt", + "session_id": "sesn_011CZkZAtmR3yMPDzynEDxu7", + "status": "idle", + "agent": { + "type": "agent", + "id": "agent_011CZkYqphY8vELVzwCUpqiQ", + "version": 1, + "name": "Researcher", + "description": "A focused research subagent.", + "model": { + "id": "claude-sonnet-4-6", + "speed": "standard" + }, + "system": "You are a research subagent that gathers and summarises sources for the coordinating agent.", + "tools": [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ], + "mcp_servers": [], + "skills": [] + }, + "parent_thread_id": null, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null, + "usage": { + "input_tokens": 0, + "output_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + } + }, + "stats": { + "duration_seconds": 0, + "startup_seconds": 0, + "active_seconds": 0 + } + } + }, + "BetaManagedAgentsSessionThreadAgent": { + "description": "Resolved `agent` definition for a single `session_thread`. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from `Session.agent`.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "version", + "name", + "description", + "model", + "system", + "tools", + "mcp_servers", + "skills" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent" + ], + "examples": [ + "agent" + ] + }, + "id": { + "type": "string", + "examples": [ + "agent_011CZkYqphY8vELVzwCUpqiQ" + ] + }, + "version": { + "type": "integer", + "format": "int32", + "examples": [ + 1 + ] + }, + "name": { + "type": "string", + "examples": [ + "Researcher" + ] + }, + "description": { + "type": "string", + "nullable": true, + "examples": [ + "A focused research subagent." + ] + }, + "model": { + "$ref": "#/components/schemas/BetaManagedAgentsModelConfig", + "examples": [ + { + "id": "claude-sonnet-4-6", + "speed": "standard" + } + ] + }, + "system": { + "type": "string", + "nullable": true, + "examples": [ + "You are a research subagent that gathers and summarises sources for the coordinating agent." + ] + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentTool" + }, + "examples": [ + [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ] + ] + }, + "mcp_servers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMCPServer" + }, + "examples": [ + [] + ] + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSkill" + }, + "examples": [ + [] + ] + } + }, + "example": { + "type": "agent", + "id": "agent_011CZkYqphY8vELVzwCUpqiQ", + "version": 1, + "name": "Researcher", + "description": "A focused research subagent.", + "model": { + "id": "claude-sonnet-4-6", + "speed": "standard" + }, + "system": "You are a research subagent that gathers and summarises sources for the coordinating agent.", + "tools": [ + { + "type": "agent_toolset_20260401", + "default_config": { + "enabled": true, + "permission_policy": { + "type": "always_ask" + } + }, + "configs": [] + } + ], + "mcp_servers": [], + "skills": [] + } + }, + "BetaManagedAgentsSessionThreadCreatedEvent": { + "description": "Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at", + "agent_name", + "session_thread_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.thread_created" + ], + "examples": [ + "session.thread_created" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string", + "examples": [ + "sevt_011CZkZWXb7pJkx1shYaqoCu" + ] + }, + "processed_at": { + "description": "Timestamp when the thread was created.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "agent_name": { + "description": "Name of the callable agent the thread runs.", + "type": "string", + "examples": [ + "Researcher" + ] + }, + "session_thread_id": { + "description": "Public `sthr_` ID of the newly created thread.", + "type": "string", + "examples": [ + "sthr_011CZkZVWa6oIjw0rgXZpnBt" + ] + } + }, + "example": { + "type": "session.thread_created", + "id": "sevt_011CZkZWXb7pJkx1shYaqoCu", + "session_thread_id": "sthr_011CZkZVWa6oIjw0rgXZpnBt", + "processed_at": "2026-03-15T10:00:00Z", + "agent_name": "Researcher" + } + }, + "BetaManagedAgentsSessionThreadStats": { + "description": "Timing statistics for a session thread.", + "type": "object", + "additionalProperties": false, + "properties": { + "duration_seconds": { + "description": "Elapsed time since thread creation in seconds. For archived threads, frozen at the final update.", + "type": "number", + "format": "double" + }, + "startup_seconds": { + "description": "Time in seconds for the thread to begin running. Zero for child threads, which start immediately.", + "type": "number", + "format": "double" + }, + "active_seconds": { + "description": "Cumulative time in seconds the thread spent actively running. Excludes idle time.", + "type": "number", + "format": "double" + } + } + }, + "BetaManagedAgentsSessionThreadStatus": { + "type": "string", + "description": "SessionThreadStatus enum", + "enum": [ + "running", + "idle", + "rescheduling", + "terminated" + ] + }, + "BetaManagedAgentsSessionThreadStatusIdleEvent": { + "description": "A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "session_thread_id", + "processed_at", + "agent_name", + "stop_reason" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.thread_status_idle" + ], + "examples": [ + "session.thread_status_idle" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string", + "examples": [ + "sevt_011CZkZXYc8qKly2tiZbrpDv" + ] + }, + "session_thread_id": { + "description": "Public sthr_ ID of the thread that went idle.", + "type": "string", + "examples": [ + "sthr_011CZkZVWa6oIjw0rgXZpnBt" + ] + }, + "processed_at": { + "description": "Timestamp of the status transition.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "agent_name": { + "description": "Name of the agent the thread runs.", + "type": "string", + "examples": [ + "Researcher" + ] + }, + "stop_reason": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "end_turn": "#/components/schemas/BetaManagedAgentsSessionEndTurn", + "requires_action": "#/components/schemas/BetaManagedAgentsSessionRequiresAction", + "retries_exhausted": "#/components/schemas/BetaManagedAgentsSessionRetriesExhausted" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionEndTurn" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionRequiresAction" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionRetriesExhausted" + } + ], + "examples": [ + { + "type": "end_turn" + } + ] + } + }, + "example": { + "type": "session.thread_status_idle", + "id": "sevt_011CZkZXYc8qKly2tiZbrpDv", + "session_thread_id": "sthr_011CZkZVWa6oIjw0rgXZpnBt", + "processed_at": "2026-03-15T10:00:00Z", + "agent_name": "Researcher", + "stop_reason": { + "type": "end_turn" + } + } + }, + "BetaManagedAgentsSessionThreadStatusRescheduledEvent": { + "description": "A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "session_thread_id", + "processed_at", + "agent_name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.thread_status_rescheduled" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "session_thread_id": { + "description": "Public sthr_ ID of the thread that is retrying.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp of the status transition.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "agent_name": { + "description": "Name of the agent the thread runs.", + "type": "string" + } + } + }, + "BetaManagedAgentsSessionThreadStatusRunningEvent": { + "description": "A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "session_thread_id", + "processed_at", + "agent_name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.thread_status_running" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "session_thread_id": { + "description": "Public sthr_ ID of the thread that started running.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp of the status transition.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "agent_name": { + "description": "Name of the agent the thread runs.", + "type": "string" + } + } + }, + "BetaManagedAgentsSessionThreadStatusTerminatedEvent": { + "description": "A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "session_thread_id", + "processed_at", + "agent_name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.thread_status_terminated" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "session_thread_id": { + "description": "Public sthr_ ID of the thread that terminated.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp of the status transition.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "agent_name": { + "description": "Name of the agent the thread runs.", + "type": "string" + } + } + }, + "BetaManagedAgentsSessionThreadUsage": { + "description": "Cumulative token usage for a session thread across all turns.", + "type": "object", + "additionalProperties": false, + "properties": { + "input_tokens": { + "description": "Total input tokens consumed across all turns.", + "type": "integer", + "format": "int32" + }, + "output_tokens": { + "description": "Total output tokens generated across all turns.", + "type": "integer", + "format": "int32" + }, + "cache_read_input_tokens": { + "description": "Total tokens read from prompt cache.", + "type": "integer", + "format": "int32" + }, + "cache_creation": { + "description": "Tokens used to create prompt cache entries, broken down by cache TTL.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsCacheCreationUsage" + } + ] + } + } + }, + "BetaManagedAgentsSessionUpdatedEvent": { + "description": "Emitted when an UpdateSession request changed at least one field. Carries only the fields that changed; absent fields were not part of the update. The new configuration applies from the next turn.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "session.updated" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp when the update was applied.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "title": { + "description": "The session's new title. Present only when the update changed it.", + "type": "string", + "nullable": true + }, + "metadata": { + "description": "The session's full metadata bag after the update. Present when the update set non-empty metadata; absent when metadata was unchanged or cleared to empty.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "agent": { + "description": "The session's effective agent configuration after the update. Present only when the update changed `agent` (tools or mcp_servers); when present it is the full materialised snapshot, not a diff.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionAgent" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsSessionUsage": { + "description": "Cumulative token usage for a session across all turns.", + "type": "object", + "additionalProperties": false, + "properties": { + "input_tokens": { + "description": "Total input tokens consumed across all turns.", + "type": "integer", + "format": "int32" + }, + "output_tokens": { + "description": "Total output tokens generated across all turns.", + "type": "integer", + "format": "int32" + }, + "cache_read_input_tokens": { + "description": "Total tokens read from prompt cache.", + "type": "integer", + "format": "int32" + }, + "cache_creation": { + "description": "Tokens used to create prompt cache entries, broken down by cache TTL.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsCacheCreationUsage" + } + ] + } + } + }, + "BetaManagedAgentsSkill": { + "description": "Resolved skill as returned in API responses.", + "discriminator": { + "propertyName": "type", + "mapping": { + "anthropic": "#/components/schemas/BetaManagedAgentsAnthropicSkill", + "custom": "#/components/schemas/BetaManagedAgentsCustomSkill" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAnthropicSkill" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsCustomSkill" + } + ] + }, + "BetaManagedAgentsSkillParams": { + "description": "Skill to load in the session container.", + "discriminator": { + "propertyName": "type", + "mapping": { + "anthropic": "#/components/schemas/BetaManagedAgentsAnthropicSkillParams", + "custom": "#/components/schemas/BetaManagedAgentsCustomSkillParams" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsAnthropicSkillParams" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsCustomSkillParams" + } + ] + }, + "BetaManagedAgentsSpanModelRequestEndEvent": { + "description": "Emitted when a model request completes.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at", + "is_error", + "model_usage", + "model_request_start_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "span.model_request_end" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp when the model request completed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + }, + "is_error": { + "description": "Whether the model request resulted in an error.", + "type": "boolean", + "nullable": true + }, + "model_usage": { + "description": "Token usage for this model request.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanModelUsage" + } + ] + }, + "model_request_start_id": { + "description": "The id of the corresponding `span.model_request_start` event.", + "type": "string" + } + } + }, + "BetaManagedAgentsSpanModelRequestStartEvent": { + "description": "Emitted when a model request is initiated by the agent.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "span.model_request_start" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp when the model request started.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ] + } + } + }, + "BetaManagedAgentsSpanModelUsage": { + "description": "Token usage for a single model request.", + "type": "object", + "additionalProperties": false, + "required": [ + "input_tokens", + "output_tokens", + "cache_creation_input_tokens", + "cache_read_input_tokens" + ], + "properties": { + "input_tokens": { + "description": "Input tokens consumed by this request.", + "type": "integer", + "format": "int32" + }, + "output_tokens": { + "description": "Output tokens generated by this request.", + "type": "integer", + "format": "int32" + }, + "cache_creation_input_tokens": { + "description": "Tokens used to create prompt cache in this request.", + "type": "integer", + "format": "int32" + }, + "cache_read_input_tokens": { + "description": "Tokens read from prompt cache in this request.", + "type": "integer", + "format": "int32" + }, + "speed": { + "description": "Inference speed tier this request actually ran at. Mirrors `usage.speed` on /v1/messages. Only present when the fast-mode beta is active.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSpeed" + } + ], + "nullable": true + } + } + }, + "BetaManagedAgentsSpanOutcomeEvaluationEndEvent": { + "description": "Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of `needs_revision` means another evaluation cycle follows; `satisfied`, `max_iterations_reached`, `failed`, or `interrupted` are terminal — no further evaluation cycles follow.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at", + "outcome_evaluation_start_id", + "iteration", + "result", + "explanation", + "usage", + "outcome_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "span.outcome_evaluation_end" + ], + "examples": [ + "span.outcome_evaluation_end" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string", + "examples": [ + "sevt_011CZkZUVz5nHiv9qfWYomas" + ] + }, + "processed_at": { + "description": "Timestamp when outcome evaluation ended.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:02:31Z" + ] + }, + "outcome_evaluation_start_id": { + "description": "The id of the corresponding `span.outcome_evaluation_start` event.", + "type": "string", + "examples": [ + "sevt_011CZkZTUy4mGhu8peVXnlzr" + ] + }, + "iteration": { + "description": "0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.", + "type": "integer", + "format": "int32", + "examples": [ + 0 + ] + }, + "result": { + "description": "Evaluation verdict. 'satisfied': criteria met, session goes idle. 'needs_revision': criteria not met, another revision cycle follows. 'max_iterations_reached': evaluation budget exhausted with criteria still unmet — one final acknowledgment turn follows before the session goes idle, but no further evaluation runs. 'failed': grader determined the rubric does not apply to the deliverables. 'interrupted': user sent an interrupt while evaluation was in progress.", + "type": "string", + "examples": [ + "satisfied" + ] + }, + "explanation": { + "description": "Human-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why.", + "type": "string", + "examples": [ + "All five sections present with inline citations." + ] + }, + "usage": { + "description": "Aggregate token usage for this evaluation cycle. Sums across all grader model requests within the cycle.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanModelUsage" + } + ], + "examples": [ + { + "input_tokens": 1842, + "output_tokens": 213, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 1536 + } + ] + }, + "outcome_id": { + "description": "The `outc_` ID of the outcome being evaluated.", + "type": "string", + "examples": [ + "outc_011CZkZRSw2kEfs6ncTVljxP" + ] + } + }, + "example": { + "type": "span.outcome_evaluation_end", + "id": "sevt_011CZkZUVz5nHiv9qfWYomas", + "processed_at": "2026-03-15T10:02:31Z", + "outcome_evaluation_start_id": "sevt_011CZkZTUy4mGhu8peVXnlzr", + "iteration": 0, + "result": "satisfied", + "explanation": "All five sections present with inline citations.", + "usage": { + "input_tokens": 1842, + "output_tokens": 213, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 1536 + }, + "outcome_id": "outc_011CZkZRSw2kEfs6ncTVljxP" + } + }, + "BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent": { + "description": "Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding `span.outcome_evaluation_start` and `span.outcome_evaluation_end` events.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at", + "iteration", + "outcome_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "span.outcome_evaluation_ongoing" + ], + "examples": [ + "span.outcome_evaluation_ongoing" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string", + "examples": [ + "sevt_011CZkZbCG2uOpc6xmDfvTzh" + ] + }, + "processed_at": { + "description": "Timestamp when this heartbeat was emitted.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:02:14Z" + ] + }, + "iteration": { + "description": "0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.", + "type": "integer", + "format": "int32", + "examples": [ + 0 + ] + }, + "outcome_id": { + "description": "The `outc_` ID of the outcome being evaluated.", + "type": "string", + "examples": [ + "outc_011CZkZRSw2kEfs6ncTVljxP" + ] + } + }, + "example": { + "type": "span.outcome_evaluation_ongoing", + "id": "sevt_011CZkZbCG2uOpc6xmDfvTzh", + "processed_at": "2026-03-15T10:02:14Z", + "iteration": 0, + "outcome_id": "outc_011CZkZRSw2kEfs6ncTVljxP" + } + }, + "BetaManagedAgentsSpanOutcomeEvaluationStartEvent": { + "description": "Emitted when an outcome evaluation cycle begins.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at", + "iteration", + "outcome_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "span.outcome_evaluation_start" + ], + "examples": [ + "span.outcome_evaluation_start" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string", + "examples": [ + "sevt_011CZkZTUy4mGhu8peVXnlzr" + ] + }, + "processed_at": { + "description": "Timestamp when outcome evaluation started.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:02:14Z" + ] + }, + "iteration": { + "description": "0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation after the first revision; etc.", + "type": "integer", + "format": "int32", + "examples": [ + 0 + ] + }, + "outcome_id": { + "description": "The `outc_` ID of the outcome being evaluated.", + "type": "string", + "examples": [ + "outc_011CZkZRSw2kEfs6ncTVljxP" + ] + } + }, + "example": { + "type": "span.outcome_evaluation_start", + "id": "sevt_011CZkZTUy4mGhu8peVXnlzr", + "processed_at": "2026-03-15T10:02:14Z", + "iteration": 0, + "outcome_id": "outc_011CZkZRSw2kEfs6ncTVljxP" + } + }, + "BetaManagedAgentsSpeed": { + "type": "string", + "description": "Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.", + "enum": [ + "standard", + "fast" + ] + }, + "BetaManagedAgentsStaticBearerAuthResponse": { + "description": "Static bearer token credential details for an MCP server.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "mcp_server_url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "static_bearer" + ], + "examples": [ + "static_bearer" + ] + }, + "mcp_server_url": { + "description": "URL of the MCP server this credential authenticates against.", + "type": "string", + "examples": [ + "https://example-server.modelcontextprotocol.io/sse" + ] + } + }, + "example": { + "type": "static_bearer", + "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse" + } + }, + "BetaManagedAgentsStaticBearerCreateParams": { + "description": "Parameters for creating a static bearer token credential.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "token", + "mcp_server_url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "static_bearer" + ], + "examples": [ + "static_bearer" + ] + }, + "token": { + "description": "Static bearer token value.", + "type": "string", + "minLength": 1, + "maxLength": 8192, + "examples": [ + "bearer_exampletoken" + ] + }, + "mcp_server_url": { + "description": "URL of the MCP server this credential authenticates against.", + "type": "string", + "minLength": 1, + "maxLength": 2047, + "examples": [ + "https://example-server.modelcontextprotocol.io/sse" + ] + } + }, + "example": { + "type": "static_bearer", + "token": "bearer_exampletoken", + "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse" + } + }, + "BetaManagedAgentsStaticBearerUpdateParams": { + "description": "Parameters for updating a static bearer token credential. The `mcp_server_url` is immutable.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "static_bearer" + ] + }, + "token": { + "description": "Updated static bearer token value.", + "type": "string", + "minLength": 1, + "maxLength": 8192, + "nullable": true + } + } + }, + "BetaManagedAgentsStreamSessionEvents": { + "description": "Server-sent event in the session stream.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "user.message": "#/components/schemas/BetaManagedAgentsUserMessageEvent", + "user.interrupt": "#/components/schemas/BetaManagedAgentsUserInterruptEvent", + "user.tool_confirmation": "#/components/schemas/BetaManagedAgentsUserToolConfirmationEvent", + "user.custom_tool_result": "#/components/schemas/BetaManagedAgentsUserCustomToolResultEvent", + "agent.custom_tool_use": "#/components/schemas/BetaManagedAgentsAgentCustomToolUseEvent", + "agent.message": "#/components/schemas/BetaManagedAgentsAgentMessageEvent", + "agent.thinking": "#/components/schemas/BetaManagedAgentsAgentThinkingEvent", + "agent.mcp_tool_use": "#/components/schemas/BetaManagedAgentsAgentMcpToolUseEvent", + "agent.mcp_tool_result": "#/components/schemas/BetaManagedAgentsAgentMcpToolResultEvent", + "agent.tool_use": "#/components/schemas/BetaManagedAgentsAgentToolUseEvent", + "agent.tool_result": "#/components/schemas/BetaManagedAgentsAgentToolResultEvent", + "agent.thread_message_received": "#/components/schemas/BetaManagedAgentsAgentThreadMessageReceivedEvent", + "agent.thread_message_sent": "#/components/schemas/BetaManagedAgentsAgentThreadMessageSentEvent", + "agent.thread_context_compacted": "#/components/schemas/BetaManagedAgentsAgentThreadContextCompactedEvent", + "session.error": "#/components/schemas/BetaManagedAgentsSessionErrorEvent", + "session.status_rescheduled": "#/components/schemas/BetaManagedAgentsSessionStatusRescheduledEvent", + "session.status_running": "#/components/schemas/BetaManagedAgentsSessionStatusRunningEvent", + "session.status_idle": "#/components/schemas/BetaManagedAgentsSessionStatusIdleEvent", + "session.status_terminated": "#/components/schemas/BetaManagedAgentsSessionStatusTerminatedEvent", + "session.thread_created": "#/components/schemas/BetaManagedAgentsSessionThreadCreatedEvent", + "span.outcome_evaluation_start": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationStartEvent", + "span.outcome_evaluation_end": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationEndEvent", + "span.model_request_start": "#/components/schemas/BetaManagedAgentsSpanModelRequestStartEvent", + "span.model_request_end": "#/components/schemas/BetaManagedAgentsSpanModelRequestEndEvent", + "span.outcome_evaluation_ongoing": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent", + "user.define_outcome": "#/components/schemas/BetaManagedAgentsUserDefineOutcomeEvent", + "session.deleted": "#/components/schemas/BetaManagedAgentsSessionDeletedEvent", + "session.thread_status_running": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRunningEvent", + "session.thread_status_idle": "#/components/schemas/BetaManagedAgentsSessionThreadStatusIdleEvent", + "session.thread_status_terminated": "#/components/schemas/BetaManagedAgentsSessionThreadStatusTerminatedEvent", + "user.tool_result": "#/components/schemas/BetaManagedAgentsUserToolResultEvent", + "session.thread_status_rescheduled": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRescheduledEvent", + "session.updated": "#/components/schemas/BetaManagedAgentsSessionUpdatedEvent" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsUserMessageEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserInterruptEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolConfirmationEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserCustomToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentCustomToolUseEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentMessageEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThinkingEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentMcpToolUseEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentMcpToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolUseEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThreadMessageReceivedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThreadMessageSentEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThreadContextCompactedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionErrorEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusRescheduledEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusRunningEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusIdleEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusTerminatedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadCreatedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationStartEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationEndEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanModelRequestStartEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanModelRequestEndEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserDefineOutcomeEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionDeletedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRunningEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusIdleEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusTerminatedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRescheduledEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionUpdatedEvent" + } + ] + }, + "BetaManagedAgentsStreamSessionThreadEvents": { + "description": "Server-sent event in a single thread's stream.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "user.message": "#/components/schemas/BetaManagedAgentsUserMessageEvent", + "user.interrupt": "#/components/schemas/BetaManagedAgentsUserInterruptEvent", + "user.tool_confirmation": "#/components/schemas/BetaManagedAgentsUserToolConfirmationEvent", + "user.custom_tool_result": "#/components/schemas/BetaManagedAgentsUserCustomToolResultEvent", + "agent.custom_tool_use": "#/components/schemas/BetaManagedAgentsAgentCustomToolUseEvent", + "agent.message": "#/components/schemas/BetaManagedAgentsAgentMessageEvent", + "agent.thinking": "#/components/schemas/BetaManagedAgentsAgentThinkingEvent", + "agent.mcp_tool_use": "#/components/schemas/BetaManagedAgentsAgentMcpToolUseEvent", + "agent.mcp_tool_result": "#/components/schemas/BetaManagedAgentsAgentMcpToolResultEvent", + "agent.tool_use": "#/components/schemas/BetaManagedAgentsAgentToolUseEvent", + "agent.tool_result": "#/components/schemas/BetaManagedAgentsAgentToolResultEvent", + "agent.thread_message_received": "#/components/schemas/BetaManagedAgentsAgentThreadMessageReceivedEvent", + "agent.thread_message_sent": "#/components/schemas/BetaManagedAgentsAgentThreadMessageSentEvent", + "agent.thread_context_compacted": "#/components/schemas/BetaManagedAgentsAgentThreadContextCompactedEvent", + "session.error": "#/components/schemas/BetaManagedAgentsSessionErrorEvent", + "session.status_rescheduled": "#/components/schemas/BetaManagedAgentsSessionStatusRescheduledEvent", + "session.status_running": "#/components/schemas/BetaManagedAgentsSessionStatusRunningEvent", + "session.status_idle": "#/components/schemas/BetaManagedAgentsSessionStatusIdleEvent", + "session.status_terminated": "#/components/schemas/BetaManagedAgentsSessionStatusTerminatedEvent", + "session.thread_created": "#/components/schemas/BetaManagedAgentsSessionThreadCreatedEvent", + "span.outcome_evaluation_start": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationStartEvent", + "span.outcome_evaluation_end": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationEndEvent", + "span.model_request_start": "#/components/schemas/BetaManagedAgentsSpanModelRequestStartEvent", + "span.model_request_end": "#/components/schemas/BetaManagedAgentsSpanModelRequestEndEvent", + "span.outcome_evaluation_ongoing": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent", + "user.define_outcome": "#/components/schemas/BetaManagedAgentsUserDefineOutcomeEvent", + "session.deleted": "#/components/schemas/BetaManagedAgentsSessionDeletedEvent", + "session.thread_status_running": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRunningEvent", + "session.thread_status_idle": "#/components/schemas/BetaManagedAgentsSessionThreadStatusIdleEvent", + "session.thread_status_terminated": "#/components/schemas/BetaManagedAgentsSessionThreadStatusTerminatedEvent", + "user.tool_result": "#/components/schemas/BetaManagedAgentsUserToolResultEvent", + "session.thread_status_rescheduled": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRescheduledEvent", + "session.updated": "#/components/schemas/BetaManagedAgentsSessionUpdatedEvent" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsUserMessageEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserInterruptEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolConfirmationEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserCustomToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentCustomToolUseEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentMessageEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThinkingEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentMcpToolUseEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentMcpToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolUseEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThreadMessageReceivedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThreadMessageSentEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsAgentThreadContextCompactedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionErrorEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusRescheduledEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusRunningEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusIdleEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionStatusTerminatedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadCreatedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationStartEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationEndEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanModelRequestStartEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanModelRequestEndEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserDefineOutcomeEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionDeletedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRunningEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusIdleEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusTerminatedEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolResultEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRescheduledEvent" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionUpdatedEvent" + } + ] + }, + "BetaManagedAgentsStruct": { + "type": "object", + "additionalProperties": true + }, + "BetaManagedAgentsTextBlock": { + "description": "Regular text content.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "examples": [ + "text" + ] + }, + "text": { + "description": "The text content.", + "type": "string", + "minLength": 1, + "examples": [ + "Where is my order #1234?" + ] + } + }, + "example": { + "type": "text", + "text": "Where is my order #1234?" + } + }, + "BetaManagedAgentsTextRubric": { + "description": "Rubric content provided inline as text.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "content" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ] + }, + "content": { + "description": "Rubric content. Plain text or markdown — the grader treats it as freeform text.", + "type": "string" + } + } + }, + "BetaManagedAgentsTextRubricParams": { + "description": "Rubric content provided inline as text.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "content" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "examples": [ + "text" + ] + }, + "content": { + "description": "Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters.", + "type": "string", + "maxLength": 262144, + "examples": [ + "Must cover all five sections; cite sources inline." + ] + } + }, + "example": { + "type": "text", + "content": "Must cover all five sections; cite sources inline." + } + }, + "BetaManagedAgentsTokenEndpointAuthBasicParam": { + "description": "Token endpoint uses HTTP Basic authentication with client credentials.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "client_secret" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "client_secret_basic" + ] + }, + "client_secret": { + "description": "OAuth client secret.", + "type": "string", + "minLength": 1, + "maxLength": 512 + } + } + }, + "BetaManagedAgentsTokenEndpointAuthBasicResponse": { + "description": "Token endpoint uses HTTP Basic authentication with client credentials.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "client_secret_basic" + ] + } + } + }, + "BetaManagedAgentsTokenEndpointAuthBasicUpdateParam": { + "description": "Updated HTTP Basic authentication parameters for the token endpoint.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "client_secret_basic" + ] + }, + "client_secret": { + "description": "Updated OAuth client secret.", + "type": "string", + "minLength": 1, + "maxLength": 512, + "nullable": true + } + } + }, + "BetaManagedAgentsTokenEndpointAuthNoneParam": { + "description": "Token endpoint requires no client authentication.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "none" + ] + } + } + }, + "BetaManagedAgentsTokenEndpointAuthNoneResponse": { + "description": "Token endpoint requires no client authentication.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "none" + ] + } + } + }, + "BetaManagedAgentsTokenEndpointAuthPostParam": { + "description": "Token endpoint uses POST body authentication with client credentials.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "client_secret" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "client_secret_post" + ] + }, + "client_secret": { + "description": "OAuth client secret.", + "type": "string", + "minLength": 1, + "maxLength": 512 + } + } + }, + "BetaManagedAgentsTokenEndpointAuthPostResponse": { + "description": "Token endpoint uses POST body authentication with client credentials.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "client_secret_post" + ] + } + } + }, + "BetaManagedAgentsTokenEndpointAuthPostUpdateParam": { + "description": "Updated POST body authentication parameters for the token endpoint.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "client_secret_post" + ] + }, + "client_secret": { + "description": "Updated OAuth client secret.", + "type": "string", + "minLength": 1, + "maxLength": 512, + "nullable": true + } + } + }, + "BetaManagedAgentsToolResultContentBlock": { + "description": "Content block in a tool result. Can be `text`, `image`, `document`, or `search_result`.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "text": "#/components/schemas/BetaManagedAgentsTextBlock", + "image": "#/components/schemas/BetaManagedAgentsImageBlock", + "document": "#/components/schemas/BetaManagedAgentsDocumentBlock", + "search_result": "#/components/schemas/BetaManagedAgentsSearchResultBlock" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsTextBlock" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsImageBlock" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsDocumentBlock" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsSearchResultBlock" + } + ] + }, + "BetaManagedAgentsURLDocumentSource": { + "description": "Document referenced by URL.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "url" + ] + }, + "url": { + "description": "URL of the document to fetch.", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsURLImageSource": { + "description": "Image referenced by URL.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "url" + ] + }, + "url": { + "description": "URL of the image to fetch.", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsURLMCPServerParams": { + "description": "URL-based MCP server connection.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "name", + "url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "url" + ], + "examples": [ + "url" + ] + }, + "name": { + "description": "Unique name for this server, referenced by mcp_toolset configurations. 1-255 characters.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "examples": [ + "example-mcp" + ] + }, + "url": { + "description": "Endpoint URL for the MCP server.", + "type": "string", + "maxLength": 2048, + "examples": [ + "https://example-server.modelcontextprotocol.io/sse" + ] + } + }, + "example": { + "type": "url", + "name": "example-mcp", + "url": "https://example-server.modelcontextprotocol.io/sse" + } + }, + "BetaManagedAgentsUnknownError": { + "description": "An unknown or unexpected error occurred during session execution. A fallback variant; clients that don't recognize a new error code can match on `retry_status` and `message` alone.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "message", + "retry_status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "unknown_error" + ] + }, + "message": { + "description": "Human-readable error description.", + "type": "string" + }, + "retry_status": { + "description": "What the client should do next.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRetryStatus" + } + ] + } + } + }, + "BetaManagedAgentsUpdateAgentParams": { + "description": "Request parameters for updating an `agent`. Omit a field to preserve its current value.", + "type": "object", + "additionalProperties": false, + "required": [ + "version" + ], + "properties": { + "version": { + "description": "The agent's current version, used to prevent concurrent overwrites. Obtain this value from a create or retrieve response. The request fails if this does not match the server's current version.", + "type": "integer", + "format": "int32", + "examples": [ + 1 + ] + }, + "name": { + "description": "Human-readable name. 1-256 characters. Omit to preserve. Cannot be cleared.", + "type": "string", + "maxLength": 256 + }, + "description": { + "description": "Description. Up to 2048 characters. Omit to preserve; send empty string or null to clear.", + "type": "string", + "maxLength": 2048, + "nullable": true + }, + "model": { + "description": "Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsModelParams" + } + ] + }, + "system": { + "description": "System prompt. Up to 100,000 characters. Omit to preserve; send empty string or null to clear.", + "type": "string", + "maxLength": 100000, + "nullable": true, + "examples": [ + "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end." + ] + }, + "tools": { + "description": "Tool configurations available to the agent. Full replacement. Omit to preserve; send empty array or null to clear. Maximum of 128 tools across all toolsets allowed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsAgentToolParams" + }, + "nullable": true + }, + "mcp_servers": { + "description": "MCP servers. Full replacement. Omit to preserve; send empty array or null to clear. Names must be unique. Maximum 20.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsMCPServerParams" + }, + "nullable": true + }, + "skills": { + "description": "Skills. Full replacement. Omit to preserve; send empty array or null to clear. Maximum 20.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsSkillParams" + }, + "nullable": true + }, + "metadata": { + "description": "Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars.", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "multiagent": { + "description": "Multiagent orchestration configuration. Full replacement. Omit to preserve; send null to clear.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMultiagentParams" + } + ], + "nullable": true + } + }, + "example": { + "version": 1, + "system": "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end." + } + }, + "BetaManagedAgentsUpdateCredentialRequestBody": { + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Updated human-readable name for the credential. 1-255 characters.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true, + "examples": [ + "Example credential" + ] + }, + "metadata": { + "description": "Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omitted keys are preserved.", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true, + "examples": [ + { + "environment": "production" + } + ] + }, + "auth": { + "description": "Updated authentication configuration. The `type` is immutable; the variant sent must match the stored credential's type.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsCredentialUpdateAuth" + } + ] + } + }, + "example": { + "display_name": "Example credential", + "metadata": { + "environment": "production" + } + } + }, + "BetaManagedAgentsUpdateMemoryParams": { + "description": "Request parameters for [Update a memory](/en/api/beta/memory_stores/memories/update). At least one of `content` or `path` must be provided. Renaming onto a path occupied by a different memory returns `memory_path_conflict_error` (HTTP 409). Rename never overwrites; delete or rename the blocking memory first. An update where every supplied field already matches the stored value is a no-op: it returns 200 with the existing memory and writes no new version.", + "type": "object", + "additionalProperties": false, + "properties": { + "content": { + "description": "New UTF-8 text content for the memory. Maximum 100 kB (102,400 bytes). Omit to leave the content unchanged (e.g., for a rename-only update).", + "type": "string", + "nullable": true + }, + "path": { + "description": "New path for the memory (a rename). Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, and must be NFC-normalized. Paths are case-sensitive. The memory's `id` is preserved across renames. Omit to leave the path unchanged.", + "type": "string", + "minLength": 2, + "maxLength": 1024, + "nullable": true + }, + "precondition": { + "description": "Optional optimistic-concurrency precondition. When supplied, the update applies only if the memory's current state matches; on mismatch the request returns `memory_precondition_failed_error` (HTTP 409). When omitted, the update is unconditional.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsPrecondition" + } + ] + } + } + }, + "BetaManagedAgentsUpdateMemoryStoreRequestBody": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "New human-readable name for the store. 1–255 characters; no control characters. Renaming changes the slug used for the store's `mount_path` in sessions created after the update.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true + }, + "description": { + "description": "New description for the store, up to 1024 characters. Pass an empty string to clear it.", + "type": "string", + "maxLength": 1024, + "nullable": true + }, + "metadata": { + "description": "Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars.", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + } + }, + "BetaManagedAgentsUpdateMemoryStoreResponse": { + "description": "Response from updating a `memory_store`. Returns the store with the changes applied.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "memory_store": "#/components/schemas/BetaManagedAgentsMemoryStore" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryStore" + } + ] + }, + "BetaManagedAgentsUpdateSessionParams": { + "description": "Request parameters for updating a `session`. Omit a field to preserve its current value.", + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "Human-readable session title.", + "type": "string", + "minLength": 1, + "maxLength": 500, + "nullable": true, + "examples": [ + "Order #1234 inquiry" + ] + }, + "metadata": { + "description": "Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve.", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "vault_ids": { + "description": "Vault IDs (`vlt_*`) to attach to the session. Not yet supported; requests setting this field are rejected. Reserved for future use.", + "type": "array", + "items": { + "type": "string" + } + }, + "agent": { + "description": "Agent configuration update. Only `tools` and `mcp_servers` are updatable mid-session. Only valid for sessions created from an agent or deployment reference. The session must not be running.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsSessionAgentUpdate" + } + ] + } + }, + "example": { + "title": "Order #1234 inquiry" + } + }, + "BetaManagedAgentsUpdateSessionResource": { + "description": "The updated session resource.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "github_repository": "#/components/schemas/BetaManagedAgentsGitHubRepositoryResource", + "file": "#/components/schemas/BetaManagedAgentsFileResource", + "memory_store": "#/components/schemas/BetaManagedAgentsMemoryStoreResource" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsGitHubRepositoryResource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsFileResource" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryStoreResource" + } + ] + }, + "BetaManagedAgentsUpdateSessionResourceParams": { + "description": "Request parameters for updating a session resource.", + "type": "object", + "additionalProperties": false, + "required": [ + "authorization_token" + ], + "properties": { + "authorization_token": { + "description": "New authorization token for the resource. Currently only `github_repository` resources support token rotation.", + "type": "string", + "minLength": 1, + "maxLength": 4096, + "examples": [ + "ghp_exampletoken" + ] + } + }, + "example": { + "authorization_token": "ghp_exampletoken" + } + }, + "BetaManagedAgentsUpdateVaultRequestBody": { + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Updated human-readable name for the vault. 1-255 characters.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true, + "examples": [ + "Example vault" + ] + }, + "metadata": { + "description": "Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omitted keys are preserved.", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true, + "examples": [ + { + "environment": "production" + } + ] + } + }, + "example": { + "display_name": "Example vault", + "metadata": { + "environment": "production" + } + } + }, + "BetaManagedAgentsUserActor": { + "description": "Attribution for a write made by a human user through the Anthropic Console.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "user_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user_actor" + ] + }, + "user_id": { + "description": "ID of the user who performed the write (a `user_...` value).", + "type": "string", + "minLength": 1 + } + } + }, + "BetaManagedAgentsUserContentBlock": { + "description": "Content block in a user message. Can be `text`, `image`, or `document`.", + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "text": "#/components/schemas/BetaManagedAgentsTextBlock", + "image": "#/components/schemas/BetaManagedAgentsImageBlock", + "document": "#/components/schemas/BetaManagedAgentsDocumentBlock" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsTextBlock" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsImageBlock" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsDocumentBlock" + } + ] + }, + "BetaManagedAgentsUserCustomToolResultEvent": { + "description": "Event sent by the client providing the result of a custom tool execution.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "custom_tool_use_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.custom_tool_result" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "custom_tool_use_id": { + "description": "The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.", + "type": "string" + }, + "content": { + "description": "The result content returned by the tool.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsToolResultContentBlock" + } + }, + "is_error": { + "description": "Whether the tool execution resulted in an error.", + "type": "boolean", + "nullable": true + }, + "processed_at": { + "description": "Timestamp when this result was processed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true + }, + "session_thread_id": { + "description": "Routes this result to a subagent thread. Copy from the `agent.custom_tool_use` event's `session_thread_id`.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsUserCustomToolResultEventParams": { + "description": "Parameters for providing the result of a custom tool execution.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "custom_tool_use_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.custom_tool_result" + ] + }, + "custom_tool_use_id": { + "description": "The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.", + "type": "string", + "minLength": 1, + "maxLength": 128 + }, + "content": { + "description": "The result content returned by the tool.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsToolResultContentBlock" + } + }, + "is_error": { + "description": "Whether the tool execution resulted in an error.", + "type": "boolean", + "nullable": true + } + } + }, + "BetaManagedAgentsUserDefineOutcomeEvent": { + "description": "Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "processed_at", + "outcome_id", + "description", + "max_iterations", + "rubric" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.define_outcome" + ], + "examples": [ + "user.define_outcome" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string", + "examples": [ + "sevt_011CZkZSTx3lFgt7odUWmkyq" + ] + }, + "processed_at": { + "description": "Timestamp when the outcome was accepted.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:02:14Z" + ] + }, + "outcome_id": { + "description": "Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.", + "type": "string", + "examples": [ + "outc_011CZkZRSw2kEfs6ncTVljxP" + ] + }, + "description": { + "description": "What the agent should produce. Copied from the input event.", + "type": "string", + "examples": [ + "Produce a 2-page summary as summary.md" + ] + }, + "max_iterations": { + "description": "Evaluate-then-revise cycles before giving up. Default 3, max 20.", + "type": "integer", + "format": "int32", + "nullable": true, + "examples": [ + 3 + ] + }, + "rubric": { + "description": "How to grade the outcome. File rubrics are currently resolved to their text content; clients should handle both variants.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRubric" + } + ], + "examples": [ + { + "type": "text", + "content": "Must cover all five sections; cite sources inline." + } + ] + } + }, + "example": { + "type": "user.define_outcome", + "id": "sevt_011CZkZSTx3lFgt7odUWmkyq", + "processed_at": "2026-03-15T10:02:14Z", + "outcome_id": "outc_011CZkZRSw2kEfs6ncTVljxP", + "description": "Produce a 2-page summary as summary.md", + "max_iterations": 3, + "rubric": { + "type": "text", + "content": "Must cover all five sections; cite sources inline." + } + } + }, + "BetaManagedAgentsUserDefineOutcomeEventParams": { + "description": "Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "description", + "rubric" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.define_outcome" + ], + "examples": [ + "user.define_outcome" + ] + }, + "description": { + "description": "What the agent should produce. This is the task specification.", + "type": "string", + "examples": [ + "Produce a 2-page summary as summary.md" + ] + }, + "rubric": { + "description": "How to grade the outcome. Text or file reference.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsRubricParams" + } + ], + "examples": [ + { + "type": "text", + "content": "Must cover all five sections; cite sources inline." + } + ] + }, + "max_iterations": { + "description": "Eval→revision cycles before giving up. Default 3, max 20.", + "type": "integer", + "format": "int32", + "nullable": true, + "examples": [ + 3 + ] + } + }, + "example": { + "type": "user.define_outcome", + "description": "Produce a 2-page summary as summary.md", + "rubric": { + "type": "text", + "content": "Must cover all five sections; cite sources inline." + }, + "max_iterations": 3 + } + }, + "BetaManagedAgentsUserInterruptEvent": { + "description": "An interrupt event that pauses agent execution and returns control to the user.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.interrupt" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "processed_at": { + "description": "Timestamp when the interrupt was processed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true + }, + "session_thread_id": { + "description": "If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsUserInterruptEventParams": { + "description": "Parameters for sending an interrupt to pause the agent.", + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.interrupt" + ] + }, + "session_thread_id": { + "description": "If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsUserMessageEvent": { + "description": "A user message event in the session conversation.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "content" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.message" + ], + "examples": [ + "user.message" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string", + "examples": [ + "sevt_011CZkZGOp0iBcp4kaQSihUmy" + ] + }, + "content": { + "description": "Array of content blocks comprising the user message.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsUserContentBlock" + }, + "examples": [ + [ + { + "type": "text", + "text": "Where is my order #1234?" + } + ] + ] + }, + "processed_at": { + "description": "Timestamp when the agent finished processing this message.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true, + "examples": [ + "2026-03-15T10:00:00Z" + ] + } + }, + "example": { + "type": "user.message", + "id": "sevt_011CZkZGOp0iBcp4kaQSihUmy", + "content": [ + { + "type": "text", + "text": "Where is my order #1234?" + } + ], + "processed_at": "2026-03-15T10:00:00Z" + } + }, + "BetaManagedAgentsUserMessageEventParams": { + "description": "Parameters for sending a user message to the session.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "content" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.message" + ], + "examples": [ + "user.message" + ] + }, + "content": { + "description": "Array of content blocks for the user message.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsUserContentBlock" + }, + "examples": [ + [ + { + "type": "text", + "text": "Where is my order #1234?" + } + ] + ] + } + }, + "example": { + "type": "user.message", + "content": [ + { + "type": "text", + "text": "Where is my order #1234?" + } + ] + } + }, + "BetaManagedAgentsUserToolConfirmationEvent": { + "description": "A tool confirmation event that approves or denies a pending tool execution.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "tool_use_id", + "result" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.tool_confirmation" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "tool_use_id": { + "description": "The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.", + "type": "string" + }, + "result": { + "description": "The confirmation result: 'allow' or 'deny'.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolConfirmationResult" + } + ] + }, + "deny_message": { + "description": "Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.", + "type": "string", + "maxLength": 10000, + "nullable": true + }, + "processed_at": { + "description": "Timestamp when the confirmation was processed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true + }, + "session_thread_id": { + "description": "When set, the confirmation routes to this subagent's thread rather than the primary. Echo this from the `session_thread_id` on the `agent.tool_use` or `agent.mcp_tool_use` event that prompted the approval.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsUserToolConfirmationEventParams": { + "description": "Parameters for confirming or denying a tool execution request.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "tool_use_id", + "result" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.tool_confirmation" + ] + }, + "tool_use_id": { + "description": "The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.", + "type": "string", + "minLength": 1, + "maxLength": 128 + }, + "result": { + "description": "The confirmation result: 'allow' or 'deny'.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaManagedAgentsUserToolConfirmationResult" + } + ] + }, + "deny_message": { + "description": "Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.", + "type": "string", + "maxLength": 10000, + "nullable": true + } + } + }, + "BetaManagedAgentsUserToolConfirmationResult": { + "type": "string", + "description": "UserToolConfirmationResult enum", + "enum": [ + "allow", + "deny" + ] + }, + "BetaManagedAgentsUserToolResultEvent": { + "description": "Event sent by the client providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "tool_use_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.tool_result" + ] + }, + "id": { + "description": "Unique identifier for this event.", + "type": "string" + }, + "tool_use_id": { + "description": "The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.", + "type": "string" + }, + "content": { + "description": "The result content returned by the tool.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsToolResultContentBlock" + } + }, + "is_error": { + "description": "Whether the tool execution resulted in an error.", + "type": "boolean", + "nullable": true + }, + "processed_at": { + "description": "Timestamp when this result was processed.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true + }, + "session_thread_id": { + "description": "Routes this result to a subagent thread. Copy from the `agent.tool_use` event's `session_thread_id`.", + "type": "string", + "nullable": true + } + } + }, + "BetaManagedAgentsUserToolResultEventParams": { + "description": "Parameters for providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "tool_use_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "user.tool_result" + ] + }, + "tool_use_id": { + "description": "The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.", + "type": "string", + "minLength": 1, + "maxLength": 128 + }, + "content": { + "description": "The result content returned by the tool.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BetaManagedAgentsToolResultContentBlock" + } + }, + "is_error": { + "description": "Whether the tool execution resulted in an error.", + "type": "boolean", + "nullable": true + } + } + }, + "BetaManagedAgentsVault": { + "description": "A vault that stores credentials for use by agents during sessions.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "display_name", + "metadata", + "created_at", + "updated_at", + "archived_at" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "vault" + ], + "examples": [ + "vault" + ] + }, + "id": { + "description": "Unique identifier for the vault.", + "type": "string", + "examples": [ + "vlt_011CZkZDLs7fYzm1hXNPeRjv" + ] + }, + "display_name": { + "description": "Human-readable name for the vault.", + "type": "string", + "examples": [ + "Example vault" + ] + }, + "metadata": { + "description": "Arbitrary key-value metadata attached to the vault.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "examples": [ + { + "environment": "production" + } + ] + }, + "created_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "updated_at": { + "$ref": "#/components/schemas/BetaTimestamp", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "archived_at": { + "description": "When the vault was archived. Null if not archived.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "nullable": true, + "examples": [ + null + ] + } + }, + "example": { + "type": "vault", + "id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", + "display_name": "Example vault", + "metadata": { + "environment": "production" + }, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null + } + }, + "BetaMemoryTool_20250818": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "memory", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "memory_20250818", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "MemoryTool_20250818", + "type": "object" + }, + "BetaMessage": { + "examples": [ + { + "content": [ + { + "citations": null, + "text": "Hi! My name is Claude.", + "type": "text" + } + ], + "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", + "model": "claude-opus-4-6", + "role": "assistant", + "stop_details": null, + "stop_reason": "end_turn", + "stop_sequence": null, + "type": "message", + "usage": { + "input_tokens": 2095, + "output_tokens": 503 + } + } + ], + "properties": { + "id": { + "description": "Unique object identifier.\n\nThe format and length of IDs may change over time.", + "examples": [ + "msg_013Zva2CMHLNnXjNJJKqJ2EF" + ], + "title": "Id", + "type": "string" + }, + "type": { + "const": "message", + "default": "message", + "description": "Object type.\n\nFor Messages, this is always `\"message\"`.", + "title": "Type", + "type": "string" + }, + "role": { + "const": "assistant", + "default": "assistant", + "description": "Conversational role of the generated message.\n\nThis will always be `\"assistant\"`.", + "title": "Role", + "type": "string" + }, + "content": { + "description": "Content generated by the model.\n\nThis is an array of content blocks, each of which has a `type` that determines its shape.\n\nExample:\n\n```json\n[{\"type\": \"text\", \"text\": \"Hi, I'm Claude.\"}]\n```\n\nIf the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.\n\nFor example, if the input `messages` were:\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"}\n]\n```\n\nThen the response `content` might be:\n\n```json\n[{\"type\": \"text\", \"text\": \"B)\"}]\n```", + "examples": [ + [ + { + "citations": null, + "text": "Hi! My name is Claude.", + "type": "text" + } + ] + ], + "items": { + "$ref": "#/components/schemas/BetaContentBlock" + }, + "title": "Content", + "type": "array" + }, + "model": { + "$ref": "#/components/schemas/Model" + }, + "stop_reason": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaStopReason" + }, + { + "type": "null" + } + ], + "description": "The reason that we stopped.\n\nThis may be one the following values:\n* `\"end_turn\"`: the model reached a natural stopping point\n* `\"max_tokens\"`: we exceeded the requested `max_tokens` or the model's maximum\n* `\"stop_sequence\"`: one of your provided custom `stop_sequences` was generated\n* `\"tool_use\"`: the model invoked one or more tools\n* `\"pause_turn\"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.\n* `\"refusal\"`: when streaming classifiers intervene to handle potential policy violations\n\nIn non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.", + "title": "Stop Reason" + }, + "stop_sequence": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Which custom stop sequence was generated, if any.\n\nThis value will be a non-null string if one of your custom stop sequences was generated.", + "title": "Stop Sequence" + }, + "stop_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRefusalStopDetails" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Structured information about why model output stopped.\n\nThis is `null` when the `stop_reason` has no additional detail to report." + }, + "usage": { + "$ref": "#/components/schemas/BetaUsage", + "description": "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response from Claude.\n\nTotal input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.", + "examples": [ + { + "input_tokens": 2095, + "output_tokens": 503 + } + ] + }, + "diagnostics": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaDiagnostics" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Request-level diagnostics. Present only when `diagnostics` was supplied on the request; `null` when no prompt-cache divergence was detected." + }, + "context_management": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaResponseContextManagement" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Context management response.\n\nInformation about context management strategies applied during the request." + }, + "container": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaContainer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Information about the container used in this request.\n\nThis will be non-null if a container tool (e.g. code execution) was used." + } + }, + "required": [ + "id", + "type", + "role", + "content", + "model", + "stop_reason", + "stop_sequence", + "stop_details", + "usage", + "diagnostics", + "context_management", + "container" + ], + "title": "Message", + "type": "object", + "x-stainless-python-custom-imports": [ + "from .beta_content_block import BetaContentBlock as BetaContentBlock" + ] + }, + "BetaMessageBatch": { + "properties": { + "archived_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Archived At", + "description": "RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.", + "examples": [ + "2024-08-20T18:37:24.100435Z" + ] + }, + "cancel_initiated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Cancel Initiated At", + "description": "RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.", + "examples": [ + "2024-08-20T18:37:24.100435Z" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At", + "description": "RFC 3339 datetime string representing the time at which the Message Batch was created.", + "examples": [ + "2024-08-20T18:37:24.100435Z" + ] + }, + "ended_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Ended At", + "description": "RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.\n\nProcessing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.", + "examples": [ + "2024-08-20T18:37:24.100435Z" + ] + }, + "expires_at": { + "type": "string", + "format": "date-time", + "title": "Expires At", + "description": "RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.", + "examples": [ + "2024-08-20T18:37:24.100435Z" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique object identifier.\n\nThe format and length of IDs may change over time.", + "examples": [ + "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF" + ] + }, + "processing_status": { + "type": "string", + "enum": [ + "in_progress", + "canceling", + "ended" + ], + "title": "Processing Status", + "description": "Processing status of the Message Batch.", + "examples": [ + "in_progress" + ] + }, + "request_counts": { + "$ref": "#/components/schemas/BetaRequestCounts", + "description": "Tallies requests within the Message Batch, categorized by their status.\n\nRequests start as `processing` and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch." + }, + "results_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Results Url", + "description": "URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.\n\nResults in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.", + "examples": [ + "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results" + ] + }, + "type": { + "type": "string", + "const": "message_batch", + "title": "Type", + "description": "Object type.\n\nFor Message Batches, this is always `\"message_batch\"`.", + "default": "message_batch" + } + }, + "type": "object", + "required": [ + "archived_at", + "cancel_initiated_at", + "created_at", + "ended_at", + "expires_at", + "id", + "processing_status", + "request_counts", + "results_url", + "type" + ], + "title": "MessageBatch" + }, + "BetaMessageBatchIndividualRequestParams": { + "additionalProperties": false, + "properties": { + "custom_id": { + "description": "Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.\n\nMust be unique for each request within the Message Batch.", + "examples": [ + "my-custom-id-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Custom Id", + "type": "string" + }, + "params": { + "$ref": "#/components/schemas/BetaCreateMessageParams", + "description": "Messages API creation parameters for the individual request.\n\nSee the [Messages API reference](https://docs.claude.com/en/api/messages) for full documentation on available parameters." + } + }, + "required": [ + "custom_id", + "params" + ], + "title": "MessageBatchIndividualRequestParams", + "type": "object" + }, + "BetaMessageBatchIndividualResponse": { + "description": "This is a single line in the response `.jsonl` file and does not represent the response as a whole.", + "properties": { + "custom_id": { + "description": "Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.\n\nMust be unique for each request within the Message Batch.", + "examples": [ + "my-custom-id-1" + ], + "title": "Custom Id", + "type": "string" + }, + "result": { + "description": "Processing result for this request.\n\nContains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration.", + "discriminator": { + "mapping": { + "canceled": "#/components/schemas/BetaCanceledResult", + "errored": "#/components/schemas/BetaErroredResult", + "expired": "#/components/schemas/BetaExpiredResult", + "succeeded": "#/components/schemas/BetaSucceededResult" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaSucceededResult" + }, + { + "$ref": "#/components/schemas/BetaErroredResult" + }, + { + "$ref": "#/components/schemas/BetaCanceledResult" + }, + { + "$ref": "#/components/schemas/BetaExpiredResult" + } + ], + "title": "Result" + } + }, + "required": [ + "custom_id", + "result" + ], + "title": "MessageBatchIndividualResponse", + "type": "object" + }, + "BetaMessageDelta": { + "properties": { + "container": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaContainer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Information about the container used in this request.\n\nThis will be non-null if a container tool (e.g. code execution) was used." + }, + "stop_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRefusalStopDetails" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Structured information about why model output stopped.\n\nThis is `null` when the `stop_reason` has no additional detail to report." + }, + "stop_reason": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaStopReason" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Stop Reason" + }, + "stop_sequence": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Stop Sequence" + } + }, + "required": [ + "container", + "stop_details", + "stop_reason", + "stop_sequence" + ], + "title": "MessageDelta", + "type": "object" + }, + "BetaMessageDeltaEvent": { + "properties": { + "context_management": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaResponseContextManagement" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Information about context management strategies applied during the request" + }, + "delta": { + "$ref": "#/components/schemas/BetaMessageDelta" + }, + "type": { + "const": "message_delta", + "default": "message_delta", + "title": "Type", + "type": "string" + }, + "usage": { + "$ref": "#/components/schemas/BetaMessageDeltaUsage", + "description": "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response from Claude.\n\nTotal input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.", + "examples": [ + { + "output_tokens": 503 + } + ] + } + }, + "required": [ + "context_management", + "delta", + "type", + "usage" + ], + "title": "MessageDeltaEvent", + "type": "object" + }, + "BetaMessageDeltaUsage": { + "properties": { + "cache_creation_input_tokens": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The cumulative number of input tokens used to create the cache entry.", + "examples": [ + 2051 + ], + "title": "Cache Creation Input Tokens" + }, + "cache_read_input_tokens": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The cumulative number of input tokens read from the cache.", + "examples": [ + 2051 + ], + "title": "Cache Read Input Tokens" + }, + "input_tokens": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The cumulative number of input tokens which were used.", + "examples": [ + 2095 + ], + "title": "Input Tokens" + }, + "iterations": { + "$ref": "#/components/schemas/BetaIterationsUsage" + }, + "output_tokens": { + "description": "The cumulative number of output tokens which were used.", + "examples": [ + 503 + ], + "title": "Output Tokens", + "type": "integer" + }, + "server_tool_use": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaServerToolUsage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of server tool requests." + } + }, + "required": [ + "cache_creation_input_tokens", + "cache_read_input_tokens", + "input_tokens", + "iterations", + "output_tokens", + "server_tool_use" + ], + "title": "MessageDeltaUsage", + "type": "object" + }, + "BetaMessageIterationUsage": { + "description": "Token usage for a sampling iteration.", + "properties": { + "cache_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaCacheCreation" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Breakdown of cached tokens by TTL" + }, + "cache_creation_input_tokens": { + "default": 0, + "description": "The number of input tokens used to create the cache entry.", + "minimum": 0, + "title": "Cache Creation Input Tokens", + "type": "integer" + }, + "cache_read_input_tokens": { + "default": 0, + "description": "The number of input tokens read from the cache.", + "minimum": 0, + "title": "Cache Read Input Tokens", + "type": "integer" + }, + "input_tokens": { + "description": "The number of input tokens which were used.", + "minimum": 0, + "title": "Input Tokens", + "type": "integer" + }, + "output_tokens": { + "description": "The number of output tokens which were used.", + "minimum": 0, + "title": "Output Tokens", + "type": "integer" + }, + "type": { + "const": "message", + "default": "message", + "description": "Usage for a sampling iteration", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cache_creation", + "cache_creation_input_tokens", + "cache_read_input_tokens", + "input_tokens", + "output_tokens", + "type" + ], + "title": "MessageIterationUsage", + "type": "object" + }, + "BetaMessageStartEvent": { + "properties": { + "message": { + "$ref": "#/components/schemas/BetaMessage" + }, + "type": { + "const": "message_start", + "default": "message_start", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "MessageStartEvent", + "type": "object" + }, + "BetaMessageStopEvent": { + "properties": { + "type": { + "const": "message_stop", + "default": "message_stop", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "MessageStopEvent", + "type": "object" + }, + "BetaMessageStreamEvent": { + "discriminator": { + "mapping": { + "content_block_delta": "#/components/schemas/BetaContentBlockDeltaEvent", + "content_block_start": "#/components/schemas/BetaContentBlockStartEvent", + "content_block_stop": "#/components/schemas/BetaContentBlockStopEvent", + "message_delta": "#/components/schemas/BetaMessageDeltaEvent", + "message_start": "#/components/schemas/BetaMessageStartEvent", + "message_stop": "#/components/schemas/BetaMessageStopEvent" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaMessageStartEvent" + }, + { + "$ref": "#/components/schemas/BetaMessageDeltaEvent" + }, + { + "$ref": "#/components/schemas/BetaMessageStopEvent" + }, + { + "$ref": "#/components/schemas/BetaContentBlockStartEvent" + }, + { + "$ref": "#/components/schemas/BetaContentBlockDeltaEvent" + }, + { + "$ref": "#/components/schemas/BetaContentBlockStopEvent" + } + ], + "title": "MessageStreamEvent" + }, + "BetaMetadata": { + "additionalProperties": false, + "properties": { + "user_id": { + "anyOf": [ + { + "maxLength": 512, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "An external identifier for the user who is associated with the request.\n\nThis should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.", + "examples": [ + "13803d75-b4b5-4c3e-b2a2-6f21399b021b" + ], + "title": "User Id" + } + }, + "title": "Metadata", + "type": "object" + }, + "BetaModelCapabilities": { + "properties": { + "batch": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model supports the Batch API." + }, + "citations": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model supports citation generation." + }, + "code_execution": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model supports code execution tools." + }, + "context_management": { + "$ref": "#/components/schemas/BetaContextManagementCapability", + "description": "Context management support and available strategies." + }, + "effort": { + "$ref": "#/components/schemas/BetaEffortCapability", + "description": "Effort (reasoning_effort) support and available levels." + }, + "image_input": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model accepts image content blocks." + }, + "pdf_input": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model accepts PDF content blocks." + }, + "structured_outputs": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model supports structured output / JSON mode / strict tool schemas." + }, + "thinking": { + "$ref": "#/components/schemas/BetaThinkingCapability", + "description": "Thinking capability and supported type configurations." + } + }, + "type": "object", + "required": [ + "batch", + "citations", + "code_execution", + "context_management", + "effort", + "image_input", + "pdf_input", + "structured_outputs", + "thinking" + ], + "title": "ModelCapabilities", + "description": "Model capability information." + }, + "BetaModelInfo": { + "properties": { + "capabilities": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaModelCapabilities" + }, + { + "type": "null" + } + ], + "description": "Object mapping capability names to their support details. Keys are always present for all known capabilities." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At", + "description": "RFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown.", + "examples": [ + "2026-02-04T00:00:00Z" + ] + }, + "display_name": { + "type": "string", + "title": "Display Name", + "description": "A human-readable name for the model.", + "examples": [ + "Claude Opus 4.6" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique model identifier.", + "examples": [ + "claude-opus-4-6" + ] + }, + "max_input_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Input Tokens", + "description": "Maximum input context window size in tokens for this model." + }, + "max_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Tokens", + "description": "Maximum value for the `max_tokens` parameter when using this model." + }, + "type": { + "type": "string", + "const": "model", + "title": "Type", + "description": "Object type.\n\nFor Models, this is always `\"model\"`.", + "default": "model" + } + }, + "type": "object", + "required": [ + "capabilities", + "created_at", + "display_name", + "id", + "max_input_tokens", + "max_tokens", + "type" + ], + "title": "ModelInfo" + }, + "BetaNotFoundError": { + "properties": { + "message": { + "default": "Not found", + "title": "Message", + "type": "string" + }, + "type": { + "const": "not_found_error", + "default": "not_found_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "NotFoundError", + "type": "object" + }, + "BetaOutputConfig": { + "additionalProperties": false, + "properties": { + "effort": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaEffortLevel" + }, + { + "type": "null" + } + ], + "description": "How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer.\n\nValid values are `low`, `medium`, `high`, `xhigh`, or `max`." + }, + "format": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaJsonOutputFormat" + }, + { + "type": "null" + } + ], + "description": "A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)" + }, + "task_budget": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaTokenTaskBudget" + }, + { + "type": "null" + } + ], + "description": "Configuration for token budget tracking across contexts." + } + }, + "title": "OutputConfig", + "type": "object" + }, + "BetaOverloadedError": { + "properties": { + "message": { + "default": "Overloaded", + "title": "Message", + "type": "string" + }, + "type": { + "const": "overloaded_error", + "default": "overloaded_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "OverloadedError", + "type": "object" + }, + "BetaPackages": { + "properties": { + "apt": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Apt", + "description": "Ubuntu/Debian packages to install" + }, + "cargo": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Cargo", + "description": "Rust packages to install" + }, + "gem": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Gem", + "description": "Ruby packages to install" + }, + "go": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Go", + "description": "Go packages to install" + }, + "npm": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Npm", + "description": "Node.js packages to install" + }, + "pip": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Pip", + "description": "Python packages to install" + }, + "type": { + "type": "string", + "const": "packages", + "title": "Type", + "description": "Package configuration type", + "default": "packages" + } + }, + "type": "object", + "required": [ + "apt", + "cargo", + "gem", + "go", + "npm", + "pip" + ], + "title": "Packages", + "description": "Packages (and their versions) available in this environment." + }, + "BetaPackagesParams": { + "properties": { + "apt": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Apt", + "description": "Ubuntu/Debian packages to install" + }, + "cargo": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Cargo", + "description": "Rust packages to install" + }, + "gem": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Gem", + "description": "Ruby packages to install" + }, + "go": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Go", + "description": "Go packages to install" + }, + "npm": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Npm", + "description": "Node.js packages to install" + }, + "pip": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Pip", + "description": "Python packages to install" + }, + "type": { + "type": "string", + "const": "packages", + "title": "Type", + "description": "Package configuration type", + "default": "packages" + } + }, + "additionalProperties": false, + "type": "object", + "title": "PackagesParams", + "description": "Specify packages (and optionally their versions) available in this environment.\n\nWhen versioning, use the version semantics relevant for the package manager, e.g. for `pip` use `package==1.0.0`. You are responsible for validating the package and version exist. Unversioned installs the latest." + }, + "BetaPermissionError": { + "properties": { + "message": { + "default": "Permission denied", + "title": "Message", + "type": "string" + }, + "type": { + "const": "permission_error", + "default": "permission_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "PermissionError", + "type": "object" + }, + "BetaPlainTextSource": { + "additionalProperties": false, + "properties": { + "data": { + "title": "Data", + "type": "string" + }, + "media_type": { + "const": "text/plain", + "title": "Media Type", + "type": "string" + }, + "type": { + "const": "text", + "title": "Type", + "type": "string" + } + }, + "required": [ + "data", + "media_type", + "type" + ], + "title": "PlainTextSource", + "type": "object" + }, + "BetaPublicEnvironmentCreateRequest": { + "properties": { + "config": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCloudConfigParams" + }, + { + "$ref": "#/components/schemas/BetaSelfHostedConfigParams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "cloud": "#/components/schemas/BetaCloudConfigParams", + "self_hosted": "#/components/schemas/BetaSelfHostedConfigParams" + } + } + }, + { + "type": "null" + } + ], + "title": "Config", + "description": "Environment configuration", + "examples": [ + { + "type": "cloud", + "networking": { + "type": "limited", + "allowed_hosts": [ + "api.example.com" + ], + "allow_package_managers": true + }, + "packages": { + "pip": [ + "pandas", + "numpy" + ] + } + } + ] + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 1024 + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Optional description of the environment", + "examples": [ + "Python environment with data-analysis packages." + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Metadata", + "description": "User-provided metadata key-value pairs" + }, + "name": { + "type": "string", + "maxLength": 256, + "minLength": 1, + "title": "Name", + "description": "Human-readable name for the environment", + "examples": [ + "python-data-analysis" + ] + }, + "scope": { + "anyOf": [ + { + "type": "string", + "enum": [ + "organization", + "account" + ] + }, + { + "type": "null" + } + ], + "title": "Scope", + "description": "The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. Only applicable for self-hosted environments. If not specified, defaults based on organization type." + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "name" + ], + "title": "PublicEnvironmentCreateRequest", + "description": "Public API request to create a new environment (without org/account fields).", + "example": { + "name": "python-data-analysis", + "description": "Python environment with data-analysis packages.", + "config": { + "type": "cloud", + "networking": { + "type": "limited", + "allowed_hosts": [ + "api.example.com" + ], + "allow_package_managers": true + }, + "packages": { + "pip": [ + "pandas", + "numpy" + ] + } + } + } + }, + "BetaPublicEnvironmentUpdateRequest": { + "properties": { + "config": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCloudConfigParams" + }, + { + "$ref": "#/components/schemas/BetaSelfHostedConfigParams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "cloud": "#/components/schemas/BetaCloudConfigParams", + "self_hosted": "#/components/schemas/BetaSelfHostedConfigParams" + } + } + }, + { + "type": "null" + } + ], + "title": "Config", + "description": "Updated environment configuration" + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 1024 + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Updated description of the environment", + "examples": [ + "Python environment with data-analysis packages." + ] + }, + "metadata": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object", + "title": "Metadata", + "description": "User-provided metadata key-value pairs. Set a value to null or empty string to delete the key." + }, + "name": { + "anyOf": [ + { + "type": "string", + "maxLength": 256, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "Updated name for the environment" + }, + "scope": { + "anyOf": [ + { + "type": "string", + "enum": [ + "organization", + "account" + ] + }, + { + "type": "null" + } + ], + "title": "Scope", + "description": "The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only." + } + }, + "additionalProperties": false, + "type": "object", + "title": "PublicEnvironmentUpdateRequest", + "description": "Public API request to update an environment (without org/account fields).", + "example": { + "description": "Python environment with data-analysis packages." + } + }, + "BetaRateLimitError": { + "properties": { + "message": { + "default": "Rate limited", + "title": "Message", + "type": "string" + }, + "type": { + "const": "rate_limit_error", + "default": "rate_limit_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "RateLimitError", + "type": "object" + }, + "BetaRefusalStopDetails": { + "description": "Structured information about a refusal.", + "properties": { + "category": { + "anyOf": [ + { + "enum": [ + "cyber", + "bio" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The policy category that triggered the refusal.\n\n`null` when the refusal doesn't map to a named category.", + "title": "Category" + }, + "explanation": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Human-readable explanation of the refusal.\n\nThis text is not guaranteed to be stable. `null` when no explanation is available for the category.", + "title": "Explanation" + }, + "type": { + "const": "refusal", + "default": "refusal", + "title": "Type", + "type": "string" + } + }, + "required": [ + "category", + "explanation", + "type" + ], + "title": "RefusalStopDetails", + "type": "object" + }, + "BetaRequestAdvisorRedactedResultBlock": { + "additionalProperties": false, + "properties": { + "encrypted_content": { + "description": "Opaque blob produced by a prior response; must be round-tripped verbatim.", + "title": "Encrypted Content", + "type": "string" + }, + "type": { + "const": "advisor_redacted_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "encrypted_content", + "type" + ], + "title": "RequestAdvisorRedactedResultBlock", + "type": "object" + }, + "BetaRequestAdvisorResultBlock": { + "additionalProperties": false, + "properties": { + "text": { + "title": "Text", + "type": "string" + }, + "type": { + "const": "advisor_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "text", + "type" + ], + "title": "RequestAdvisorResultBlock", + "type": "object" + }, + "BetaRequestAdvisorToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestAdvisorToolResultError" + }, + { + "$ref": "#/components/schemas/BetaRequestAdvisorResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestAdvisorRedactedResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "advisor_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestAdvisorToolResultBlock", + "type": "object" + }, + "BetaRequestAdvisorToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaAdvisorToolResultErrorCode" + }, + "type": { + "const": "advisor_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestAdvisorToolResultError", + "type": "object" + }, + "BetaRequestBashCodeExecutionOutputBlock": { + "additionalProperties": false, + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "bash_code_execution_output", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "RequestBashCodeExecutionOutputBlock", + "type": "object" + }, + "BetaRequestBashCodeExecutionResultBlock": { + "additionalProperties": false, + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/BetaRequestBashCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "stdout": { + "title": "Stdout", + "type": "string" + }, + "type": { + "const": "bash_code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "return_code", + "stderr", + "stdout", + "type" + ], + "title": "RequestBashCodeExecutionResultBlock", + "type": "object" + }, + "BetaRequestBashCodeExecutionToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestBashCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/BetaRequestBashCodeExecutionResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "bash_code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestBashCodeExecutionToolResultBlock", + "type": "object" + }, + "BetaRequestBashCodeExecutionToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaBashCodeExecutionToolResultErrorCode" + }, + "type": { + "const": "bash_code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestBashCodeExecutionToolResultError", + "type": "object" + }, + "BetaRequestCharLocationCitation": { + "additionalProperties": false, + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_char_index": { + "title": "End Char Index", + "type": "integer" + }, + "start_char_index": { + "minimum": 0, + "title": "Start Char Index", + "type": "integer" + }, + "type": { + "const": "char_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_char_index", + "start_char_index", + "type" + ], + "title": "RequestCharLocationCitation", + "type": "object" + }, + "BetaRequestCitationsConfig": { + "additionalProperties": false, + "properties": { + "enabled": { + "title": "Enabled", + "type": "boolean" + } + }, + "title": "RequestCitationsConfig", + "type": "object" + }, + "BetaRequestCodeExecutionOutputBlock": { + "additionalProperties": false, + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "code_execution_output", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "RequestCodeExecutionOutputBlock", + "type": "object" + }, + "BetaRequestCodeExecutionResultBlock": { + "additionalProperties": false, + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/BetaRequestCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "stdout": { + "title": "Stdout", + "type": "string" + }, + "type": { + "const": "code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "return_code", + "stderr", + "stdout", + "type" + ], + "title": "Result Block", + "type": "object" + }, + "BetaRequestCodeExecutionToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestCodeExecutionToolResultError", + "x-stainless-naming": { + "go": { + "variant_constructor": "BetaNewCodeExecutionToolRequestError" + } + } + }, + { + "$ref": "#/components/schemas/BetaRequestCodeExecutionResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestEncryptedCodeExecutionResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestCodeExecutionToolResultBlock", + "type": "object" + }, + "BetaRequestCodeExecutionToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaCodeExecutionToolResultErrorCode" + }, + "type": { + "const": "code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "Error", + "type": "object" + }, + "BetaRequestCompactionBlock": { + "additionalProperties": false, + "description": "A compaction block containing summary of previous context.\n\nUsers should round-trip these blocks from responses to subsequent requests\nto maintain context across compaction boundaries.\n\nWhen content is None, the block represents a failed compaction. The server\ntreats these as no-ops. Empty string content is not allowed.", + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Summary of previously compacted content, or null if compaction failed", + "title": "Content" + }, + "encrypted_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Opaque metadata from prior compaction, to be round-tripped verbatim", + "title": "Encrypted Content" + }, + "type": { + "const": "compaction", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "RequestCompactionBlock", + "type": "object" + }, + "BetaRequestContainerUploadBlock": { + "additionalProperties": false, + "description": "A content block that represents a file to be uploaded to the container\nFiles uploaded via this block will be available in the container's input directory.", + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "container_upload", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "RequestContainerUploadBlock", + "type": "object" + }, + "BetaRequestContentBlockLocationCitation": { + "additionalProperties": false, + "properties": { + "cited_text": { + "description": "The full text of the cited block range, concatenated.\n\nAlways equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.", + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_block_index": { + "description": "Exclusive 0-based end index of the cited block range in the source's `content` array.\n\nAlways greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.", + "title": "End Block Index", + "type": "integer" + }, + "start_block_index": { + "description": "0-based index of the first cited block in the source's `content` array.", + "minimum": 0, + "title": "Start Block Index", + "type": "integer" + }, + "type": { + "const": "content_block_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_block_index", + "start_block_index", + "type" + ], + "title": "RequestContentBlockLocationCitation", + "type": "object" + }, + "BetaRequestCounts": { + "properties": { + "canceled": { + "type": "integer", + "title": "Canceled", + "description": "Number of requests in the Message Batch that have been canceled.\n\nThis is zero until processing of the entire Message Batch has ended.", + "default": 0, + "examples": [ + 10 + ] + }, + "errored": { + "type": "integer", + "title": "Errored", + "description": "Number of requests in the Message Batch that encountered an error.\n\nThis is zero until processing of the entire Message Batch has ended.", + "default": 0, + "examples": [ + 30 + ] + }, + "expired": { + "type": "integer", + "title": "Expired", + "description": "Number of requests in the Message Batch that have expired.\n\nThis is zero until processing of the entire Message Batch has ended.", + "default": 0, + "examples": [ + 10 + ] + }, + "processing": { + "type": "integer", + "title": "Processing", + "description": "Number of requests in the Message Batch that are processing.", + "default": 0, + "examples": [ + 100 + ] + }, + "succeeded": { + "type": "integer", + "title": "Succeeded", + "description": "Number of requests in the Message Batch that have completed successfully.\n\nThis is zero until processing of the entire Message Batch has ended.", + "default": 0, + "examples": [ + 50 + ] + } + }, + "type": "object", + "required": [ + "canceled", + "errored", + "expired", + "processing", + "succeeded" + ], + "title": "RequestCounts" + }, + "BetaRequestDocumentBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestCitationsConfig" + }, + { + "type": "null" + } + ] + }, + "context": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Context" + }, + "source": { + "discriminator": { + "mapping": { + "base64": "#/components/schemas/BetaBase64PDFSource", + "content": "#/components/schemas/BetaContentBlockSource", + "file": "#/components/schemas/BetaFileDocumentSource", + "text": "#/components/schemas/BetaPlainTextSource", + "url": "#/components/schemas/BetaURLPDFSource" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaBase64PDFSource" + }, + { + "$ref": "#/components/schemas/BetaPlainTextSource" + }, + { + "$ref": "#/components/schemas/BetaContentBlockSource" + }, + { + "$ref": "#/components/schemas/BetaURLPDFSource" + }, + { + "$ref": "#/components/schemas/BetaFileDocumentSource" + } + ], + "title": "Source" + }, + "title": { + "anyOf": [ + { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "const": "document", + "title": "Type", + "type": "string" + } + }, + "required": [ + "source", + "type" + ], + "title": "RequestDocumentBlock", + "type": "object" + }, + "BetaRequestEncryptedCodeExecutionResultBlock": { + "additionalProperties": false, + "description": "Code execution result with encrypted stdout for PFC + web_search results.", + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/BetaRequestCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "encrypted_stdout": { + "title": "Encrypted Stdout", + "type": "string" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "type": { + "const": "encrypted_code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "encrypted_stdout", + "return_code", + "stderr", + "type" + ], + "title": "RequestEncryptedCodeExecutionResultBlock", + "type": "object" + }, + "BetaRequestImageBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "source": { + "discriminator": { + "mapping": { + "base64": "#/components/schemas/BetaBase64ImageSource", + "file": "#/components/schemas/BetaFileImageSource", + "url": "#/components/schemas/BetaURLImageSource" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaBase64ImageSource" + }, + { + "$ref": "#/components/schemas/BetaURLImageSource" + }, + { + "$ref": "#/components/schemas/BetaFileImageSource" + } + ], + "title": "Source" + }, + "type": { + "const": "image", + "title": "Type", + "type": "string" + } + }, + "required": [ + "source", + "type" + ], + "title": "RequestImageBlock", + "type": "object" + }, + "BetaRequestMCPServerToolConfiguration": { + "additionalProperties": false, + "properties": { + "allowed_tools": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Tools" + }, + "enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enabled" + } + }, + "title": "RequestMCPServerToolConfiguration", + "type": "object" + }, + "BetaRequestMCPServerURLDefinition": { + "additionalProperties": false, + "properties": { + "authorization_token": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization Token" + }, + "name": { + "title": "Name", + "type": "string" + }, + "tool_configuration": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestMCPServerToolConfiguration" + }, + { + "type": "null" + } + ] + }, + "type": { + "const": "url", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "name", + "type", + "url" + ], + "title": "RequestMCPServerURLDefinition", + "type": "object" + }, + "BetaRequestMCPToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/BetaRequestTextBlock", + "title": "beta_mcp_tool_result_block_param_content_item" + }, + "type": "array", + "title": "beta_mcp_tool_result_block_param_content" + } + ], + "title": "Content" + }, + "is_error": { + "title": "Is Error", + "type": "boolean" + }, + "tool_use_id": { + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "mcp_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_use_id", + "type" + ], + "title": "RequestMCPToolResultBlock", + "type": "object" + }, + "BetaRequestMCPToolUseBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "id": { + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Id", + "type": "string" + }, + "input": { + "additionalProperties": true, + "title": "Input", + "type": "object" + }, + "name": { + "title": "Name", + "type": "string" + }, + "server_name": { + "description": "The name of the MCP server", + "title": "Server Name", + "type": "string" + }, + "type": { + "const": "mcp_tool_use", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "input", + "name", + "server_name", + "type" + ], + "title": "RequestMCPToolUseBlock", + "type": "object" + }, + "BetaRequestPageLocationCitation": { + "additionalProperties": false, + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_page_number": { + "title": "End Page Number", + "type": "integer" + }, + "start_page_number": { + "minimum": 1, + "title": "Start Page Number", + "type": "integer" + }, + "type": { + "const": "page_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_page_number", + "start_page_number", + "type" + ], + "title": "RequestPageLocationCitation", + "type": "object" + }, + "BetaRequestRedactedThinkingBlock": { + "additionalProperties": false, + "properties": { + "data": { + "title": "Data", + "type": "string" + }, + "type": { + "const": "redacted_thinking", + "title": "Type", + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "title": "RequestRedactedThinkingBlock", + "type": "object" + }, + "BetaRequestSearchResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "$ref": "#/components/schemas/BetaRequestCitationsConfig" + }, + "content": { + "items": { + "$ref": "#/components/schemas/BetaRequestTextBlock" + }, + "title": "Content", + "type": "array" + }, + "source": { + "title": "Source", + "type": "string" + }, + "title": { + "title": "Title", + "type": "string" + }, + "type": { + "const": "search_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "source", + "title", + "type" + ], + "title": "RequestSearchResultBlock", + "type": "object" + }, + "BetaRequestSearchResultLocationCitation": { + "additionalProperties": false, + "properties": { + "cited_text": { + "description": "The full text of the cited block range, concatenated.\n\nAlways equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.", + "title": "Cited Text", + "type": "string" + }, + "end_block_index": { + "description": "Exclusive 0-based end index of the cited block range in the source's `content` array.\n\nAlways greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.", + "title": "End Block Index", + "type": "integer" + }, + "search_result_index": { + "description": "0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.\n\nCounted separately from `document_index`; server-side web search results are not included in this count.", + "minimum": 0, + "title": "Search Result Index", + "type": "integer" + }, + "source": { + "title": "Source", + "type": "string" + }, + "start_block_index": { + "description": "0-based index of the first cited block in the source's `content` array.", + "minimum": 0, + "title": "Start Block Index", + "type": "integer" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "const": "search_result_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "end_block_index", + "search_result_index", + "source", + "start_block_index", + "title", + "type" + ], + "title": "RequestSearchResultLocationCitation", + "type": "object" + }, + "BetaRequestServerToolUseBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/BetaServerToolCaller", + "code_execution_20260120": "#/components/schemas/BetaServerToolCaller_20260120", + "direct": "#/components/schemas/BetaDirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaDirectCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Id", + "type": "string" + }, + "input": { + "additionalProperties": true, + "title": "Input", + "type": "object" + }, + "name": { + "enum": [ + "advisor", + "web_search", + "web_fetch", + "code_execution", + "bash_code_execution", + "text_editor_code_execution", + "tool_search_tool_regex", + "tool_search_tool_bm25" + ], + "title": "Name", + "type": "string" + }, + "type": { + "const": "server_tool_use", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "input", + "name", + "type" + ], + "title": "RequestServerToolUseBlock", + "type": "object" + }, + "BetaRequestTextBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [ + { + "items": { + "discriminator": { + "mapping": { + "char_location": "#/components/schemas/BetaRequestCharLocationCitation", + "content_block_location": "#/components/schemas/BetaRequestContentBlockLocationCitation", + "page_location": "#/components/schemas/BetaRequestPageLocationCitation", + "search_result_location": "#/components/schemas/BetaRequestSearchResultLocationCitation", + "web_search_result_location": "#/components/schemas/BetaRequestWebSearchResultLocationCitation" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaRequestCharLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaRequestPageLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaRequestContentBlockLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaRequestWebSearchResultLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaRequestSearchResultLocationCitation" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Citations" + }, + "text": { + "minLength": 1, + "title": "Text", + "type": "string" + }, + "type": { + "const": "text", + "title": "Type", + "type": "string" + } + }, + "required": [ + "text", + "type" + ], + "title": "RequestTextBlock", + "type": "object" + }, + "BetaRequestTextEditorCodeExecutionCreateResultBlock": { + "additionalProperties": false, + "properties": { + "is_file_update": { + "title": "Is File Update", + "type": "boolean" + }, + "type": { + "const": "text_editor_code_execution_create_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "is_file_update", + "type" + ], + "title": "RequestTextEditorCodeExecutionCreateResultBlock", + "type": "object" + }, + "BetaRequestTextEditorCodeExecutionStrReplaceResultBlock": { + "additionalProperties": false, + "properties": { + "lines": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Lines" + }, + "new_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "New Lines" + }, + "new_start": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "New Start" + }, + "old_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Old Lines" + }, + "old_start": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Old Start" + }, + "type": { + "const": "text_editor_code_execution_str_replace_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "RequestTextEditorCodeExecutionStrReplaceResultBlock", + "type": "object" + }, + "BetaRequestTextEditorCodeExecutionToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestTextEditorCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/BetaRequestTextEditorCodeExecutionViewResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestTextEditorCodeExecutionCreateResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestTextEditorCodeExecutionStrReplaceResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "text_editor_code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestTextEditorCodeExecutionToolResultBlock", + "type": "object" + }, + "BetaRequestTextEditorCodeExecutionToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaTextEditorCodeExecutionToolResultErrorCode" + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Message" + }, + "type": { + "const": "text_editor_code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestTextEditorCodeExecutionToolResultError", + "type": "object" + }, + "BetaRequestTextEditorCodeExecutionViewResultBlock": { + "additionalProperties": false, + "properties": { + "content": { + "title": "Content", + "type": "string" + }, + "file_type": { + "enum": [ + "text", + "image", + "pdf" + ], + "title": "File Type", + "type": "string" + }, + "num_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Num Lines" + }, + "start_line": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Start Line" + }, + "total_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Total Lines" + }, + "type": { + "const": "text_editor_code_execution_view_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "file_type", + "type" + ], + "title": "RequestTextEditorCodeExecutionViewResultBlock", + "type": "object" + }, + "BetaRequestThinkingBlock": { + "additionalProperties": false, + "properties": { + "signature": { + "title": "Signature", + "type": "string" + }, + "thinking": { + "title": "Thinking", + "type": "string" + }, + "type": { + "const": "thinking", + "title": "Type", + "type": "string" + } + }, + "required": [ + "signature", + "thinking", + "type" + ], + "title": "RequestThinkingBlock", + "type": "object" + }, + "BetaRequestToolReferenceBlock": { + "additionalProperties": false, + "description": "Tool reference block that can be included in tool_result content.", + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "tool_name": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]{1,256}$", + "title": "Tool Name", + "type": "string" + }, + "type": { + "const": "tool_reference", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_name", + "type" + ], + "title": "RequestToolReferenceBlock", + "type": "object" + }, + "BetaRequestToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "type": "string", + "x-stainless-skip": [ + "go", + "cli" + ] + }, + { + "items": { + "discriminator": { + "mapping": { + "document": "#/components/schemas/BetaRequestDocumentBlock", + "image": "#/components/schemas/BetaRequestImageBlock", + "search_result": "#/components/schemas/BetaRequestSearchResultBlock", + "text": "#/components/schemas/BetaRequestTextBlock", + "tool_reference": "#/components/schemas/BetaRequestToolReferenceBlock" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaRequestTextBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestImageBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestSearchResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestDocumentBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestToolReferenceBlock" + } + ], + "title": "Block" + }, + "type": "array", + "x-stainless-naming": { + "python": { + "type_name": "Content" + }, + "ruby": { + "type_name": "Content" + }, + "php": { + "type_name": "Content" + } + } + } + ], + "title": "Content" + }, + "is_error": { + "title": "Is Error", + "type": "boolean" + }, + "tool_use_id": { + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_use_id", + "type" + ], + "title": "RequestToolResultBlock", + "type": "object" + }, + "BetaRequestToolSearchToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestToolSearchToolResultError" + }, + { + "$ref": "#/components/schemas/BetaRequestToolSearchToolSearchResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "tool_search_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestToolSearchToolResultBlock", + "type": "object" + }, + "BetaRequestToolSearchToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaToolSearchToolResultErrorCode" + }, + "type": { + "const": "tool_search_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestToolSearchToolResultError", + "type": "object" + }, + "BetaRequestToolSearchToolSearchResultBlock": { + "additionalProperties": false, + "properties": { + "tool_references": { + "items": { + "$ref": "#/components/schemas/BetaRequestToolReferenceBlock" + }, + "title": "Tool References", + "type": "array" + }, + "type": { + "const": "tool_search_tool_search_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_references", + "type" + ], + "title": "RequestToolSearchToolSearchResultBlock", + "type": "object" + }, + "BetaRequestToolUseBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/BetaServerToolCaller", + "code_execution_20260120": "#/components/schemas/BetaServerToolCaller_20260120", + "direct": "#/components/schemas/BetaDirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaDirectCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "id": { + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Id", + "type": "string" + }, + "input": { + "additionalProperties": true, + "title": "Input", + "type": "object" + }, + "name": { + "maxLength": 200, + "minLength": 1, + "title": "Name", + "type": "string" + }, + "type": { + "const": "tool_use", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "input", + "name", + "type" + ], + "title": "RequestToolUseBlock", + "type": "object" + }, + "BetaRequestWebFetchResultBlock": { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/components/schemas/BetaRequestDocumentBlock" + }, + "retrieved_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "ISO 8601 timestamp when the content was retrieved", + "title": "Retrieved At" + }, + "type": { + "const": "web_fetch_result", + "title": "Type", + "type": "string" + }, + "url": { + "description": "Fetched content URL", + "title": "Url", + "type": "string" + } + }, + "required": [ + "content", + "type", + "url" + ], + "title": "RequestWebFetchResultBlock", + "type": "object" + }, + "BetaRequestWebFetchToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/BetaServerToolCaller", + "code_execution_20260120": "#/components/schemas/BetaServerToolCaller_20260120", + "direct": "#/components/schemas/BetaDirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaDirectCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestWebFetchToolResultError" + }, + { + "$ref": "#/components/schemas/BetaRequestWebFetchResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "web_fetch_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestWebFetchToolResultBlock", + "type": "object" + }, + "BetaRequestWebFetchToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaWebFetchToolResultErrorCode" + }, + "type": { + "const": "web_fetch_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestWebFetchToolResultError", + "type": "object" + }, + "BetaRequestWebSearchResultBlock": { + "additionalProperties": false, + "properties": { + "encrypted_content": { + "title": "Encrypted Content", + "type": "string" + }, + "page_age": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Page Age" + }, + "title": { + "title": "Title", + "type": "string" + }, + "type": { + "const": "web_search_result", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "encrypted_content", + "title", + "type", + "url" + ], + "title": "RequestWebSearchResultBlock", + "type": "object" + }, + "BetaRequestWebSearchResultLocationCitation": { + "additionalProperties": false, + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "encrypted_index": { + "title": "Encrypted Index", + "type": "string" + }, + "title": { + "anyOf": [ + { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "const": "web_search_result_location", + "title": "Type", + "type": "string" + }, + "url": { + "maxLength": 2048, + "minLength": 1, + "title": "Url", + "type": "string" + } + }, + "required": [ + "cited_text", + "encrypted_index", + "title", + "type", + "url" + ], + "title": "RequestWebSearchResultLocationCitation", + "type": "object" + }, + "BetaRequestWebSearchToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/BetaServerToolCaller", + "code_execution_20260120": "#/components/schemas/BetaServerToolCaller_20260120", + "direct": "#/components/schemas/BetaDirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaDirectCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "content": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/BetaRequestWebSearchResultBlock" + }, + "type": "array", + "title": "Result Block" + }, + { + "$ref": "#/components/schemas/BetaRequestWebSearchToolResultError", + "x-stainless-naming": { + "go": { + "variant_constructor": "BetaNewWebSearchToolRequestError" + } + } + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "web_search_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestWebSearchToolResultBlock", + "type": "object" + }, + "BetaRequestWebSearchToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaWebSearchToolResultErrorCode" + }, + "type": { + "const": "web_search_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "Error", + "type": "object" + }, + "BetaResponseAdvisorRedactedResultBlock": { + "properties": { + "encrypted_content": { + "description": "Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify.", + "title": "Encrypted Content", + "type": "string" + }, + "type": { + "const": "advisor_redacted_result", + "default": "advisor_redacted_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "encrypted_content", + "type" + ], + "title": "ResponseAdvisorRedactedResultBlock", + "type": "object" + }, + "BetaResponseAdvisorResultBlock": { + "properties": { + "text": { + "title": "Text", + "type": "string" + }, + "type": { + "const": "advisor_result", + "default": "advisor_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "text", + "type" + ], + "title": "ResponseAdvisorResultBlock", + "type": "object" + }, + "BetaResponseAdvisorToolResultBlock": { + "properties": { + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaResponseAdvisorToolResultError" + }, + { + "$ref": "#/components/schemas/BetaResponseAdvisorResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseAdvisorRedactedResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "advisor_tool_result", + "default": "advisor_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseAdvisorToolResultBlock", + "type": "object" + }, + "BetaResponseAdvisorToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaAdvisorToolResultErrorCode" + }, + "type": { + "const": "advisor_tool_result_error", + "default": "advisor_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "ResponseAdvisorToolResultError", + "type": "object" + }, + "BetaResponseBashCodeExecutionOutputBlock": { + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "bash_code_execution_output", + "default": "bash_code_execution_output", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "ResponseBashCodeExecutionOutputBlock", + "type": "object" + }, + "BetaResponseBashCodeExecutionResultBlock": { + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/BetaResponseBashCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "stdout": { + "title": "Stdout", + "type": "string" + }, + "type": { + "const": "bash_code_execution_result", + "default": "bash_code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "return_code", + "stderr", + "stdout", + "type" + ], + "title": "ResponseBashCodeExecutionResultBlock", + "type": "object" + }, + "BetaResponseBashCodeExecutionToolResultBlock": { + "properties": { + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaResponseBashCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/BetaResponseBashCodeExecutionResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "bash_code_execution_tool_result", + "default": "bash_code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseBashCodeExecutionToolResultBlock", + "type": "object" + }, + "BetaResponseBashCodeExecutionToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaBashCodeExecutionToolResultErrorCode" + }, + "type": { + "const": "bash_code_execution_tool_result_error", + "default": "bash_code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "ResponseBashCodeExecutionToolResultError", + "type": "object" + }, + "BetaResponseCharLocationCitation": { + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_char_index": { + "title": "End Char Index", + "type": "integer" + }, + "file_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "File Id" + }, + "start_char_index": { + "minimum": 0, + "title": "Start Char Index", + "type": "integer" + }, + "type": { + "const": "char_location", + "default": "char_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_char_index", + "file_id", + "start_char_index", + "type" + ], + "title": "ResponseCharLocationCitation", + "type": "object" + }, + "BetaResponseCitationsConfig": { + "properties": { + "enabled": { + "default": false, + "title": "Enabled", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "ResponseCitationsConfig", + "type": "object" + }, + "BetaResponseClearThinking20251015Edit": { + "properties": { + "cleared_input_tokens": { + "description": "Number of input tokens cleared by this edit.", + "minimum": 0, + "title": "Cleared Input Tokens", + "type": "integer" + }, + "cleared_thinking_turns": { + "description": "Number of thinking turns that were cleared.", + "minimum": 0, + "title": "Cleared Thinking Turns", + "type": "integer" + }, + "type": { + "const": "clear_thinking_20251015", + "default": "clear_thinking_20251015", + "description": "The type of context management edit applied.", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cleared_input_tokens", + "cleared_thinking_turns", + "type" + ], + "title": "ResponseClearThinking20251015Edit", + "type": "object" + }, + "BetaResponseClearToolUses20250919Edit": { + "properties": { + "cleared_input_tokens": { + "description": "Number of input tokens cleared by this edit.", + "minimum": 0, + "title": "Cleared Input Tokens", + "type": "integer" + }, + "cleared_tool_uses": { + "description": "Number of tool uses that were cleared.", + "minimum": 0, + "title": "Cleared Tool Uses", + "type": "integer" + }, + "type": { + "const": "clear_tool_uses_20250919", + "default": "clear_tool_uses_20250919", + "description": "The type of context management edit applied.", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cleared_input_tokens", + "cleared_tool_uses", + "type" + ], + "title": "ResponseClearToolUses20250919Edit", + "type": "object" + }, + "BetaResponseCodeExecutionOutputBlock": { + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "code_execution_output", + "default": "code_execution_output", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "ResponseCodeExecutionOutputBlock", + "type": "object" + }, + "BetaResponseCodeExecutionResultBlock": { + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/BetaResponseCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "stdout": { + "title": "Stdout", + "type": "string" + }, + "type": { + "const": "code_execution_result", + "default": "code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "return_code", + "stderr", + "stdout", + "type" + ], + "title": "ResponseCodeExecutionResultBlock", + "type": "object" + }, + "BetaResponseCodeExecutionToolResultBlock": { + "properties": { + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaResponseCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/BetaResponseCodeExecutionResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseEncryptedCodeExecutionResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "code_execution_tool_result", + "default": "code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseCodeExecutionToolResultBlock", + "type": "object" + }, + "BetaResponseCodeExecutionToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaCodeExecutionToolResultErrorCode" + }, + "type": { + "const": "code_execution_tool_result_error", + "default": "code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "ResponseCodeExecutionToolResultError", + "type": "object" + }, + "BetaResponseCompactionBlock": { + "description": "A compaction block returned when autocompact is triggered.\n\nWhen content is None, it indicates the compaction failed to produce a valid\nsummary (e.g., malformed output from the model). Clients may round-trip\ncompaction blocks with null content; the server treats them as no-ops.", + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Summary of compacted content, or null if compaction failed", + "title": "Content" + }, + "encrypted_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Opaque metadata from prior compaction, to be round-tripped verbatim", + "title": "Encrypted Content" + }, + "type": { + "const": "compaction", + "default": "compaction", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "encrypted_content", + "type" + ], + "title": "ResponseCompactionBlock", + "type": "object" + }, + "BetaResponseContainerUploadBlock": { + "description": "Response model for a file uploaded to the container.", + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "container_upload", + "default": "container_upload", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "ResponseContainerUploadBlock", + "type": "object" + }, + "BetaResponseContentBlockLocationCitation": { + "properties": { + "cited_text": { + "description": "The full text of the cited block range, concatenated.\n\nAlways equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.", + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_block_index": { + "description": "Exclusive 0-based end index of the cited block range in the source's `content` array.\n\nAlways greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.", + "title": "End Block Index", + "type": "integer" + }, + "file_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "File Id" + }, + "start_block_index": { + "description": "0-based index of the first cited block in the source's `content` array.", + "minimum": 0, + "title": "Start Block Index", + "type": "integer" + }, + "type": { + "const": "content_block_location", + "default": "content_block_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_block_index", + "file_id", + "start_block_index", + "type" + ], + "title": "ResponseContentBlockLocationCitation", + "type": "object" + }, + "BetaResponseContextManagement": { + "properties": { + "applied_edits": { + "description": "List of context management edits that were applied.", + "items": { + "discriminator": { + "mapping": { + "clear_thinking_20251015": "#/components/schemas/BetaResponseClearThinking20251015Edit", + "clear_tool_uses_20250919": "#/components/schemas/BetaResponseClearToolUses20250919Edit" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaResponseClearToolUses20250919Edit" + }, + { + "$ref": "#/components/schemas/BetaResponseClearThinking20251015Edit" + } + ] + }, + "title": "Applied Edits", + "type": "array" + } + }, + "required": [ + "applied_edits" + ], + "title": "ResponseContextManagement", + "type": "object" + }, + "BetaResponseDocumentBlock": { + "properties": { + "citations": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaResponseCitationsConfig" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Citation configuration for the document" + }, + "source": { + "discriminator": { + "mapping": { + "base64": "#/components/schemas/BetaBase64PDFSource", + "text": "#/components/schemas/BetaPlainTextSource" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaBase64PDFSource" + }, + { + "$ref": "#/components/schemas/BetaPlainTextSource" + } + ], + "title": "Source" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The title of the document", + "title": "Title" + }, + "type": { + "const": "document", + "default": "document", + "title": "Type", + "type": "string" + } + }, + "required": [ + "citations", + "source", + "title", + "type" + ], + "title": "ResponseDocumentBlock", + "type": "object" + }, + "BetaResponseEncryptedCodeExecutionResultBlock": { + "description": "Code execution result with encrypted stdout for PFC + web_search results.", + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/BetaResponseCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "encrypted_stdout": { + "title": "Encrypted Stdout", + "type": "string" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "type": { + "const": "encrypted_code_execution_result", + "default": "encrypted_code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "encrypted_stdout", + "return_code", + "stderr", + "type" + ], + "title": "ResponseEncryptedCodeExecutionResultBlock", + "type": "object" + }, + "BetaResponseMCPToolResultBlock": { + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/BetaResponseTextBlock", + "title": "beta_mcp_tool_result_block_content_item" + }, + "type": "array", + "title": "beta_mcp_tool_result_block_content" + } + ], + "title": "Content" + }, + "is_error": { + "default": false, + "title": "Is Error", + "type": "boolean" + }, + "tool_use_id": { + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "mcp_tool_result", + "default": "mcp_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "is_error", + "tool_use_id", + "type" + ], + "title": "ResponseMCPToolResultBlock", + "type": "object" + }, + "BetaResponseMCPToolUseBlock": { + "properties": { + "id": { + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Id", + "type": "string" + }, + "input": { + "additionalProperties": true, + "title": "Input", + "type": "object" + }, + "name": { + "description": "The name of the MCP tool", + "title": "Name", + "type": "string" + }, + "server_name": { + "description": "The name of the MCP server", + "title": "Server Name", + "type": "string" + }, + "type": { + "const": "mcp_tool_use", + "default": "mcp_tool_use", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "input", + "name", + "server_name", + "type" + ], + "title": "ResponseMCPToolUseBlock", + "type": "object" + }, + "BetaResponsePageLocationCitation": { + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_page_number": { + "title": "End Page Number", + "type": "integer" + }, + "file_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "File Id" + }, + "start_page_number": { + "minimum": 1, + "title": "Start Page Number", + "type": "integer" + }, + "type": { + "const": "page_location", + "default": "page_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_page_number", + "file_id", + "start_page_number", + "type" + ], + "title": "ResponsePageLocationCitation", + "type": "object" + }, + "BetaResponseRedactedThinkingBlock": { + "properties": { + "data": { + "title": "Data", + "type": "string" + }, + "type": { + "const": "redacted_thinking", + "default": "redacted_thinking", + "title": "Type", + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "title": "ResponseRedactedThinkingBlock", + "type": "object" + }, + "BetaResponseSearchResultLocationCitation": { + "properties": { + "cited_text": { + "description": "The full text of the cited block range, concatenated.\n\nAlways equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.", + "title": "Cited Text", + "type": "string" + }, + "end_block_index": { + "description": "Exclusive 0-based end index of the cited block range in the source's `content` array.\n\nAlways greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.", + "title": "End Block Index", + "type": "integer" + }, + "search_result_index": { + "description": "0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.\n\nCounted separately from `document_index`; server-side web search results are not included in this count.", + "minimum": 0, + "title": "Search Result Index", + "type": "integer" + }, + "source": { + "title": "Source", + "type": "string" + }, + "start_block_index": { + "description": "0-based index of the first cited block in the source's `content` array.", + "minimum": 0, + "title": "Start Block Index", + "type": "integer" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "const": "search_result_location", + "default": "search_result_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "end_block_index", + "search_result_index", + "source", + "start_block_index", + "title", + "type" + ], + "title": "ResponseSearchResultLocationCitation", + "type": "object" + }, + "BetaResponseServerToolUseBlock": { + "properties": { + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/BetaServerToolCaller", + "code_execution_20260120": "#/components/schemas/BetaServerToolCaller_20260120", + "direct": "#/components/schemas/BetaDirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaDirectCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Id", + "type": "string" + }, + "input": { + "additionalProperties": true, + "title": "Input", + "type": "object" + }, + "name": { + "enum": [ + "advisor", + "web_search", + "web_fetch", + "code_execution", + "bash_code_execution", + "text_editor_code_execution", + "tool_search_tool_regex", + "tool_search_tool_bm25" + ], + "title": "Name", + "type": "string" + }, + "type": { + "const": "server_tool_use", + "default": "server_tool_use", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "input", + "name", + "type" + ], + "title": "ResponseServerToolUseBlock", + "type": "object" + }, + "BetaResponseTextBlock": { + "properties": { + "citations": { + "anyOf": [ + { + "items": { + "discriminator": { + "mapping": { + "char_location": "#/components/schemas/BetaResponseCharLocationCitation", + "content_block_location": "#/components/schemas/BetaResponseContentBlockLocationCitation", + "page_location": "#/components/schemas/BetaResponsePageLocationCitation", + "search_result_location": "#/components/schemas/BetaResponseSearchResultLocationCitation", + "web_search_result_location": "#/components/schemas/BetaResponseWebSearchResultLocationCitation" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaResponseCharLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaResponsePageLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaResponseContentBlockLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaResponseWebSearchResultLocationCitation" + }, + { + "$ref": "#/components/schemas/BetaResponseSearchResultLocationCitation" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Citations supporting the text block.\n\nThe type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.", + "title": "Citations" + }, + "text": { + "maxLength": 5000000, + "minLength": 0, + "title": "Text", + "type": "string" + }, + "type": { + "const": "text", + "default": "text", + "title": "Type", + "type": "string" + } + }, + "required": [ + "citations", + "text", + "type" + ], + "title": "ResponseTextBlock", + "type": "object" + }, + "BetaResponseTextEditorCodeExecutionCreateResultBlock": { + "properties": { + "is_file_update": { + "title": "Is File Update", + "type": "boolean" + }, + "type": { + "const": "text_editor_code_execution_create_result", + "default": "text_editor_code_execution_create_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "is_file_update", + "type" + ], + "title": "ResponseTextEditorCodeExecutionCreateResultBlock", + "type": "object" + }, + "BetaResponseTextEditorCodeExecutionStrReplaceResultBlock": { + "properties": { + "lines": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Lines" + }, + "new_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "New Lines" + }, + "new_start": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "New Start" + }, + "old_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Old Lines" + }, + "old_start": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Old Start" + }, + "type": { + "const": "text_editor_code_execution_str_replace_result", + "default": "text_editor_code_execution_str_replace_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "lines", + "new_lines", + "new_start", + "old_lines", + "old_start", + "type" + ], + "title": "ResponseTextEditorCodeExecutionStrReplaceResultBlock", + "type": "object" + }, + "BetaResponseTextEditorCodeExecutionToolResultBlock": { + "properties": { + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaResponseTextEditorCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/BetaResponseTextEditorCodeExecutionViewResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseTextEditorCodeExecutionCreateResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseTextEditorCodeExecutionStrReplaceResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "text_editor_code_execution_tool_result", + "default": "text_editor_code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseTextEditorCodeExecutionToolResultBlock", + "type": "object" + }, + "BetaResponseTextEditorCodeExecutionToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaTextEditorCodeExecutionToolResultErrorCode" + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Error Message" + }, + "type": { + "const": "text_editor_code_execution_tool_result_error", + "default": "text_editor_code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "error_message", + "type" + ], + "title": "ResponseTextEditorCodeExecutionToolResultError", + "type": "object" + }, + "BetaResponseTextEditorCodeExecutionViewResultBlock": { + "properties": { + "content": { + "title": "Content", + "type": "string" + }, + "file_type": { + "enum": [ + "text", + "image", + "pdf" + ], + "title": "File Type", + "type": "string" + }, + "num_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Num Lines" + }, + "start_line": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Start Line" + }, + "total_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Total Lines" + }, + "type": { + "const": "text_editor_code_execution_view_result", + "default": "text_editor_code_execution_view_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "file_type", + "num_lines", + "start_line", + "total_lines", + "type" + ], + "title": "ResponseTextEditorCodeExecutionViewResultBlock", + "type": "object" + }, + "BetaResponseThinkingBlock": { + "properties": { + "signature": { + "title": "Signature", + "type": "string" + }, + "thinking": { + "title": "Thinking", + "type": "string" + }, + "type": { + "const": "thinking", + "default": "thinking", + "title": "Type", + "type": "string" + } + }, + "required": [ + "signature", + "thinking", + "type" + ], + "title": "ResponseThinkingBlock", + "type": "object" + }, + "BetaResponseToolReferenceBlock": { + "properties": { + "tool_name": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]{1,256}$", + "title": "Tool Name", + "type": "string" + }, + "type": { + "const": "tool_reference", + "default": "tool_reference", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_name", + "type" + ], + "title": "ResponseToolReferenceBlock", + "type": "object" + }, + "BetaResponseToolSearchToolResultBlock": { + "properties": { + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaResponseToolSearchToolResultError" + }, + { + "$ref": "#/components/schemas/BetaResponseToolSearchToolSearchResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "tool_search_tool_result", + "default": "tool_search_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseToolSearchToolResultBlock", + "type": "object" + }, + "BetaResponseToolSearchToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaToolSearchToolResultErrorCode" + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Error Message" + }, + "type": { + "const": "tool_search_tool_result_error", + "default": "tool_search_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "error_message", + "type" + ], + "title": "ResponseToolSearchToolResultError", + "type": "object" + }, + "BetaResponseToolSearchToolSearchResultBlock": { + "properties": { + "tool_references": { + "items": { + "$ref": "#/components/schemas/BetaResponseToolReferenceBlock" + }, + "title": "Tool References", + "type": "array" + }, + "type": { + "const": "tool_search_tool_search_result", + "default": "tool_search_tool_search_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_references", + "type" + ], + "title": "ResponseToolSearchToolSearchResultBlock", + "type": "object" + }, + "BetaResponseToolUseBlock": { + "properties": { + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/BetaServerToolCaller", + "code_execution_20260120": "#/components/schemas/BetaServerToolCaller_20260120", + "direct": "#/components/schemas/BetaDirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaDirectCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "id": { + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Id", + "type": "string" + }, + "input": { + "additionalProperties": true, + "title": "Input", + "type": "object" + }, + "name": { + "minLength": 1, + "title": "Name", + "type": "string" + }, + "type": { + "const": "tool_use", + "default": "tool_use", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "input", + "name", + "type" + ], + "title": "ResponseToolUseBlock", + "type": "object" + }, + "BetaResponseWebFetchResultBlock": { + "properties": { + "content": { + "$ref": "#/components/schemas/BetaResponseDocumentBlock" + }, + "retrieved_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ISO 8601 timestamp when the content was retrieved", + "title": "Retrieved At" + }, + "type": { + "const": "web_fetch_result", + "default": "web_fetch_result", + "title": "Type", + "type": "string" + }, + "url": { + "description": "Fetched content URL", + "title": "Url", + "type": "string" + } + }, + "required": [ + "content", + "retrieved_at", + "type", + "url" + ], + "title": "ResponseWebFetchResultBlock", + "type": "object" + }, + "BetaResponseWebFetchToolResultBlock": { + "properties": { + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/BetaServerToolCaller", + "code_execution_20260120": "#/components/schemas/BetaServerToolCaller_20260120", + "direct": "#/components/schemas/BetaDirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaDirectCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaResponseWebFetchToolResultError" + }, + { + "$ref": "#/components/schemas/BetaResponseWebFetchResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "web_fetch_tool_result", + "default": "web_fetch_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseWebFetchToolResultBlock", + "type": "object" + }, + "BetaResponseWebFetchToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaWebFetchToolResultErrorCode" + }, + "type": { + "const": "web_fetch_tool_result_error", + "default": "web_fetch_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "ResponseWebFetchToolResultError", + "type": "object" + }, + "BetaResponseWebSearchResultBlock": { + "properties": { + "encrypted_content": { + "title": "Encrypted Content", + "type": "string" + }, + "page_age": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Page Age" + }, + "title": { + "title": "Title", + "type": "string" + }, + "type": { + "const": "web_search_result", + "default": "web_search_result", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "encrypted_content", + "page_age", + "title", + "type", + "url" + ], + "title": "ResponseWebSearchResultBlock", + "type": "object" + }, + "BetaResponseWebSearchResultLocationCitation": { + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "encrypted_index": { + "title": "Encrypted Index", + "type": "string" + }, + "title": { + "anyOf": [ + { + "maxLength": 512, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "const": "web_search_result_location", + "default": "web_search_result_location", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "cited_text", + "encrypted_index", + "title", + "type", + "url" + ], + "title": "ResponseWebSearchResultLocationCitation", + "type": "object" + }, + "BetaResponseWebSearchToolResultBlock": { + "properties": { + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/BetaServerToolCaller", + "code_execution_20260120": "#/components/schemas/BetaServerToolCaller_20260120", + "direct": "#/components/schemas/BetaDirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaDirectCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller" + }, + { + "$ref": "#/components/schemas/BetaServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaResponseWebSearchToolResultError" + }, + { + "items": { + "$ref": "#/components/schemas/BetaResponseWebSearchResultBlock" + }, + "type": "array" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "web_search_tool_result", + "default": "web_search_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseWebSearchToolResultBlock", + "type": "object" + }, + "BetaResponseWebSearchToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/BetaWebSearchToolResultErrorCode" + }, + "type": { + "const": "web_search_tool_result_error", + "default": "web_search_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "ResponseWebSearchToolResultError", + "type": "object" + }, + "BetaSelfHostedConfig": { + "properties": { + "type": { + "type": "string", + "const": "self_hosted", + "title": "Type", + "description": "Environment type" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "type" + ], + "title": "SelfHostedConfig", + "description": "Configuration for self-hosted environments." + }, + "BetaSelfHostedConfigParams": { + "properties": { + "type": { + "type": "string", + "const": "self_hosted", + "title": "Type", + "description": "Environment type" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "type" + ], + "title": "SelfHostedConfigParams", + "description": "Request params for `self_hosted` environment configuration." + }, + "BetaSelfHostedWork": { + "properties": { + "acknowledged_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Acknowledged At", + "description": "RFC 3339 timestamp when the work item was acknowledged and assigned to a self-hosted sandbox" + }, + "created_at": { + "type": "string", + "title": "Created At", + "description": "RFC 3339 timestamp when work was created" + }, + "data": { + "$ref": "#/components/schemas/BetaSessionWorkData", + "description": "The actual work to be performed" + }, + "environment_id": { + "type": "string", + "title": "Environment Id", + "description": "Environment identifier this work belongs to (e.g., `env_...`)" + }, + "id": { + "type": "string", + "title": "Id", + "description": "Work identifier (e.g., 'work_...')" + }, + "latest_heartbeat_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Latest Heartbeat At", + "description": "RFC 3339 timestamp of the most recent heartbeat" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Metadata", + "description": "User-provided metadata key-value pairs associated with this work item" + }, + "started_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Started At", + "description": "RFC 3339 timestamp when work execution started" + }, + "state": { + "type": "string", + "enum": [ + "queued", + "starting", + "active", + "stopping", + "stopped" + ], + "title": "State", + "description": "Current state of the work item" + }, + "stop_requested_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stop Requested At", + "description": "RFC 3339 timestamp when stop was requested" + }, + "stopped_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stopped At", + "description": "RFC 3339 timestamp when work execution stopped" + }, + "type": { + "type": "string", + "const": "work", + "title": "Type", + "description": "The type of object (always 'work')", + "default": "work" + } + }, + "type": "object", + "required": [ + "acknowledged_at", + "created_at", + "data", + "environment_id", + "id", + "latest_heartbeat_at", + "metadata", + "started_at", + "state", + "stop_requested_at", + "stopped_at", + "type" + ], + "title": "SelfHostedWork", + "description": "Work resource representing a unit of work in a self-hosted environment.\n\nWork items are queued when sessions are created or when long-dormant sessions\nreceive new messages. The environment worker polls for work to execute in a\nself-hosted sandbox." + }, + "BetaSelfHostedWorkHeartbeatResponse": { + "properties": { + "last_heartbeat": { + "type": "string", + "title": "Last Heartbeat", + "description": "RFC 3339 timestamp of the actual heartbeat from DB" + }, + "lease_extended": { + "type": "boolean", + "title": "Lease Extended", + "description": "Whether the heartbeat succeeded in extending the lease" + }, + "state": { + "type": "string", + "enum": [ + "queued", + "starting", + "active", + "stopping", + "stopped" + ], + "title": "State", + "description": "Current state of the work item (active/stopping/stopped)" + }, + "ttl_seconds": { + "type": "integer", + "title": "Ttl Seconds", + "description": "Effective TTL applied to the lease" + }, + "type": { + "type": "string", + "const": "work_heartbeat", + "title": "Type", + "description": "The type of response", + "default": "work_heartbeat" + } + }, + "type": "object", + "required": [ + "last_heartbeat", + "lease_extended", + "state", + "ttl_seconds", + "type" + ], + "title": "SelfHostedWorkHeartbeatResponse", + "description": "Response after recording a heartbeat for a work item." + }, + "BetaSelfHostedWorkListResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/BetaSelfHostedWork" + }, + "type": "array", + "title": "Data", + "description": "List of work items", + "x-stainless-pagination-property": { + "purpose": "items" + } + }, + "next_page": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page", + "description": "Opaque cursor for fetching the next page of results", + "x-stainless-pagination-property": { + "purpose": "next_cursor_field" + } + } + }, + "type": "object", + "required": [ + "data", + "next_page" + ], + "title": "SelfHostedWorkListResponse", + "description": "Response when listing work items with cursor-based pagination." + }, + "BetaSelfHostedWorkQueueStats": { + "properties": { + "depth": { + "type": "integer", + "title": "Depth", + "description": "Number of work items waiting to be picked up (lag from consumer group)" + }, + "oldest_queued_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Oldest Queued At", + "description": "RFC 3339 timestamp of oldest item in the work stream (includes both queued and pending items), null if stream empty" + }, + "pending": { + "type": "integer", + "title": "Pending", + "description": "Number of work items being processed (polled but not acknowledged)", + "default": 0 + }, + "type": { + "type": "string", + "const": "work_queue_stats", + "title": "Type", + "description": "The type of object", + "default": "work_queue_stats" + }, + "workers_polling": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Workers Polling", + "description": "Number of workers that have polled for work in the last 30 seconds. Requires worker_id to be sent with poll requests." + } + }, + "type": "object", + "required": [ + "depth", + "oldest_queued_at", + "pending", + "type", + "workers_polling" + ], + "title": "SelfHostedWorkQueueStats", + "description": "Statistics about the work queue for an environment.\n\nUses Redis Stream consumer group metrics for O(1) queries." + }, + "BetaSelfHostedWorkStopRequest": { + "properties": { + "force": { + "type": "boolean", + "title": "Force", + "description": "If true, immediately stop work without graceful shutdown", + "default": false + } + }, + "type": "object", + "title": "SelfHostedWorkStopRequest", + "description": "Request to stop a work item." + }, + "BetaSelfHostedWorkUpdateRequest": { + "properties": { + "metadata": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object", + "title": "Metadata", + "description": "Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve existing metadata." + } + }, + "type": "object", + "required": [ + "metadata" + ], + "title": "SelfHostedWorkUpdateRequest", + "description": "Request to update work item metadata." + }, + "BetaServerToolCaller": { + "additionalProperties": false, + "description": "Tool invocation generated by a server-side tool.", + "properties": { + "tool_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Id", + "type": "string" + }, + "type": { + "const": "code_execution_20250825", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_id", + "type" + ], + "title": "ServerToolCaller", + "type": "object" + }, + "BetaServerToolCaller_20260120": { + "additionalProperties": false, + "properties": { + "tool_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Id", + "type": "string" + }, + "type": { + "const": "code_execution_20260120", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_id", + "type" + ], + "title": "ServerToolCaller_20260120", + "type": "object" + }, + "BetaServerToolUsage": { + "properties": { + "web_fetch_requests": { + "default": 0, + "description": "The number of web fetch tool requests.", + "examples": [ + 2 + ], + "minimum": 0, + "title": "Web Fetch Requests", + "type": "integer" + }, + "web_search_requests": { + "default": 0, + "description": "The number of web search tool requests.", + "examples": [ + 0 + ], + "minimum": 0, + "title": "Web Search Requests", + "type": "integer" + } + }, + "required": [ + "web_fetch_requests", + "web_search_requests" + ], + "title": "ServerToolUsage", + "type": "object" + }, + "BetaSessionWorkData": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Session identifier (e.g., 'session_...')" + }, + "type": { + "type": "string", + "const": "session", + "title": "Type", + "description": "Type of work data" + } + }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "SessionWorkData", + "description": "Work data for session work items.\n\nThis resource type is used when work represents a session that needs to be executed\nin a self-hosted environment." + }, + "BetaSignatureContentBlockDelta": { + "properties": { + "signature": { + "title": "Signature", + "type": "string" + }, + "type": { + "const": "signature_delta", + "default": "signature_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "signature", + "type" + ], + "title": "SignatureContentBlockDelta", + "type": "object" + }, + "BetaSkill": { + "description": "A skill that was loaded in a container (response model).", + "properties": { + "skill_id": { + "description": "Skill ID", + "examples": [ + "pdf" + ], + "maxLength": 64, + "minLength": 1, + "title": "Skill Id", + "type": "string" + }, + "type": { + "description": "Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)", + "enum": [ + "anthropic", + "custom" + ], + "examples": [ + "anthropic" + ], + "title": "Type", + "type": "string" + }, + "version": { + "description": "Skill version or 'latest' for most recent version", + "examples": [ + "latest" + ], + "maxLength": 64, + "minLength": 1, + "title": "Version", + "type": "string" + } + }, + "required": [ + "skill_id", + "type", + "version" + ], + "title": "Skill", + "type": "object" + }, + "BetaSkillParams": { + "additionalProperties": false, + "description": "Specification for a skill to be loaded in a container (request model).", + "properties": { + "skill_id": { + "description": "Skill ID", + "examples": [ + "pdf" + ], + "maxLength": 64, + "minLength": 1, + "title": "Skill Id", + "type": "string" + }, + "type": { + "description": "Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)", + "enum": [ + "anthropic", + "custom" + ], + "examples": [ + "anthropic" + ], + "title": "Type", + "type": "string" + }, + "version": { + "description": "Skill version or 'latest' for most recent version", + "examples": [ + "latest" + ], + "maxLength": 64, + "minLength": 1, + "title": "Version", + "type": "string" + } + }, + "required": [ + "skill_id", + "type" + ], + "title": "SkillParams", + "type": "object" + }, + "BetaSkillVersion": { + "properties": { + "created_at": { + "type": "string", + "title": "Created At", + "description": "ISO 8601 timestamp of when the skill version was created.", + "examples": [ + "2024-10-30T23:58:27.427722Z" + ] + }, + "description": { + "type": "string", + "title": "Description", + "description": "Description of the skill version.\n\nThis is extracted from the SKILL.md file in the skill upload.", + "examples": [ + "A custom skill for doing something useful" + ] + }, + "directory": { + "type": "string", + "title": "Directory", + "description": "Directory name of the skill version.\n\nThis is the top-level directory name that was extracted from the uploaded files.", + "examples": [ + "my-skill" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique identifier for the skill version.\n\nThe format and length of IDs may change over time.", + "examples": [ + "skillver_01JAbcdefghijklmnopqrstuvw" + ] + }, + "name": { + "type": "string", + "title": "Name", + "description": "Human-readable name of the skill version.\n\nThis is extracted from the SKILL.md file in the skill upload.", + "examples": [ + "my-skill" + ] + }, + "skill_id": { + "type": "string", + "title": "Skill Id", + "description": "Identifier for the skill that this version belongs to.", + "examples": [ + "skill_01JAbcdefghijklmnopqrstuvw" + ] + }, + "type": { + "type": "string", + "title": "Type", + "description": "Object type.\n\nFor Skill Versions, this is always `\"skill_version\"`.", + "default": "skill_version" + }, + "version": { + "type": "string", + "title": "Version", + "description": "Version identifier for the skill.\n\nEach version is identified by a Unix epoch timestamp (e.g., \"1759178010641129\").", + "examples": [ + "1759178010641129" + ] + } + }, + "type": "object", + "required": [ + "created_at", + "description", + "directory", + "id", + "name", + "skill_id", + "type", + "version" + ], + "title": "SkillVersion" + }, + "BetaSpeed": { + "enum": [ + "standard", + "fast" + ], + "title": "Speed", + "type": "string" + }, + "BetaSucceededResult": { + "properties": { + "message": { + "$ref": "#/components/schemas/BetaMessage" + }, + "type": { + "const": "succeeded", + "default": "succeeded", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "SucceededResult", + "type": "object" + }, + "BetaTextContentBlockDelta": { + "properties": { + "text": { + "title": "Text", + "type": "string" + }, + "type": { + "const": "text_delta", + "default": "text_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "text", + "type" + ], + "title": "TextContentBlockDelta", + "type": "object" + }, + "BetaTextEditorCodeExecutionToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "unavailable", + "too_many_requests", + "execution_time_exceeded", + "file_not_found" + ], + "title": "TextEditorCodeExecutionToolResultErrorCode", + "type": "string" + }, + "BetaTextEditor_20241022": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "str_replace_editor", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "text_editor_20241022", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "TextEditor_20241022", + "type": "object" + }, + "BetaTextEditor_20250124": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "str_replace_editor", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "text_editor_20250124", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "TextEditor_20250124", + "type": "object" + }, + "BetaTextEditor_20250429": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "str_replace_based_edit_tool", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "text_editor_20250429", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "TextEditor_20250429", + "type": "object" + }, + "BetaTextEditor_20250728": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "max_characters": { + "anyOf": [ + { + "minimum": 1, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.", + "title": "Max Characters" + }, + "name": { + "const": "str_replace_based_edit_tool", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "text_editor_20250728", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "TextEditor_20250728", + "type": "object" + }, + "BetaThinkingCapability": { + "properties": { + "supported": { + "type": "boolean", + "title": "Supported", + "description": "Whether this capability is supported by the model." + }, + "types": { + "$ref": "#/components/schemas/BetaThinkingTypes" + } + }, + "type": "object", + "required": [ + "supported", + "types" + ], + "title": "ThinkingCapability", + "description": "Thinking capability details." + }, + "BetaThinkingConfigAdaptive": { + "additionalProperties": false, + "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaThinkingDisplayMode" + }, + { + "type": "null" + } + ], + "description": "Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`." + }, + "type": { + "const": "adaptive", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ThinkingConfigAdaptive", + "type": "object" + }, + "BetaThinkingConfigDisabled": { + "additionalProperties": false, + "properties": { + "type": { + "const": "disabled", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ThinkingConfigDisabled", + "type": "object", + "x-stainless-go-constant-constructor": true + }, + "BetaThinkingConfigEnabled": { + "additionalProperties": false, + "properties": { + "budget_tokens": { + "description": "Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.\n\nMust be ≥1024 and less than `max_tokens`.\n\nSee [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.", + "minimum": 1024, + "title": "Budget Tokens", + "type": "integer" + }, + "display": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaThinkingDisplayMode" + }, + { + "type": "null" + } + ], + "description": "Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`." + }, + "type": { + "const": "enabled", + "title": "Type", + "type": "string" + } + }, + "required": [ + "budget_tokens", + "type" + ], + "title": "ThinkingConfigEnabled", + "type": "object" + }, + "BetaThinkingContentBlockDelta": { + "properties": { + "estimated_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Per-frame increment of a coarse, running estimate of the tokens this thinking block has produced so far. Present whenever the `thinking-token-count-2026-05-13` beta is set; `null` unless `thinking.display` resolves to `\"omitted\"` and a count is due this frame. Sum the increments across `thinking_delta` frames on this block for a progress indicator. Each increment is a non-negative multiple of a fixed quantum and the cadence is rate-limited, so this is a deliberately lossy display hint, not a billable count; `usage.output_tokens` remains authoritative.", + "title": "Estimated Tokens" + }, + "thinking": { + "title": "Thinking", + "type": "string" + }, + "type": { + "const": "thinking_delta", + "default": "thinking_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "estimated_tokens", + "thinking", + "type" + ], + "title": "ThinkingContentBlockDelta", + "type": "object" + }, + "BetaThinkingDisplayMode": { + "enum": [ + "summarized", + "omitted" + ], + "title": "ThinkingDisplayMode", + "type": "string" + }, + "BetaThinkingTurns": { + "additionalProperties": false, + "properties": { + "type": { + "const": "thinking_turns", + "title": "Type", + "type": "string" + }, + "value": { + "minimum": 1, + "title": "Value", + "type": "integer" + } + }, + "required": [ + "type", + "value" + ], + "title": "ThinkingTurns", + "type": "object" + }, + "BetaThinkingTypes": { + "properties": { + "adaptive": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model supports thinking with type 'adaptive' (auto)." + }, + "enabled": { + "$ref": "#/components/schemas/BetaCapabilitySupport", + "description": "Whether the model supports thinking with type 'enabled'." + } + }, + "type": "object", + "required": [ + "adaptive", + "enabled" + ], + "title": "ThinkingTypes", + "description": "Supported thinking type configurations." + }, + "BetaTimestamp": { + "description": "A timestamp in RFC 3339 format", + "type": "string", + "format": "date-time" + }, + "BetaTokenTaskBudget": { + "additionalProperties": false, + "description": "User-configurable total token budget across contexts.", + "properties": { + "remaining": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided.", + "minimum": 0, + "title": "Remaining" + }, + "total": { + "description": "Total token budget across all contexts in the session.", + "minimum": 1024, + "title": "Total", + "type": "integer" + }, + "type": { + "const": "tokens", + "description": "The budget type. Currently only 'tokens' is supported.", + "title": "Type", + "type": "string" + } + }, + "required": [ + "total", + "type" + ], + "title": "TokenTaskBudget", + "type": "object" + }, + "BetaTool": { + "additionalProperties": false, + "properties": { + "type": { + "anyOf": [ + { + "type": "null" + }, + { + "const": "custom", + "type": "string" + } + ], + "title": "Type" + }, + "description": { + "description": "Description of what this tool does.\n\nTool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.", + "examples": [ + "Get the current weather in a given location" + ], + "title": "Description", + "type": "string" + }, + "name": { + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "maxLength": 128, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]{1,128}$", + "title": "Name", + "type": "string" + }, + "input_schema": { + "$ref": "#/components/schemas/BetaInputSchema", + "description": "[JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.\n\nThis defines the shape of the `input` that your tool accepts and that the model will produce.", + "examples": [ + { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string" + }, + "unit": { + "description": "Unit for the output - one of (celsius, fahrenheit)", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + ] + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "eager_input_streaming": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.", + "title": "Eager Input Streaming" + }, + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/BetaJsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + } + }, + "required": [ + "name", + "input_schema" + ], + "title": "Tool", + "type": "object" + }, + "BetaToolChoiceAny": { + "additionalProperties": false, + "description": "The model will use any available tools.", + "properties": { + "disable_parallel_tool_use": { + "description": "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use.", + "title": "Disable Parallel Tool Use", + "type": "boolean" + }, + "type": { + "const": "any", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ToolChoiceAny", + "type": "object" + }, + "BetaToolChoiceAuto": { + "additionalProperties": false, + "description": "The model will automatically decide whether to use tools.", + "properties": { + "disable_parallel_tool_use": { + "description": "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output at most one tool use.", + "title": "Disable Parallel Tool Use", + "type": "boolean" + }, + "type": { + "const": "auto", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ToolChoiceAuto", + "type": "object" + }, + "BetaToolChoiceNone": { + "additionalProperties": false, + "description": "The model will not be allowed to use tools.", + "properties": { + "type": { + "const": "none", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ToolChoiceNone", + "type": "object", + "x-stainless-go-constant-constructor": true + }, + "BetaToolChoiceTool": { + "additionalProperties": false, + "description": "The model will use the specified tool with `tool_choice.name`.", + "properties": { + "disable_parallel_tool_use": { + "description": "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use.", + "title": "Disable Parallel Tool Use", + "type": "boolean" + }, + "name": { + "description": "The name of the tool to use.", + "title": "Name", + "type": "string" + }, + "type": { + "const": "tool", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "ToolChoiceTool", + "type": "object" + }, + "BetaToolSearchToolBM25_20251119": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "name": { + "const": "tool_search_tool_bm25", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "enum": [ + "tool_search_tool_bm25_20251119", + "tool_search_tool_bm25" + ], + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "ToolSearchToolBM25_20251119", + "type": "object" + }, + "BetaToolSearchToolRegex_20251119": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "name": { + "const": "tool_search_tool_regex", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "enum": [ + "tool_search_tool_regex_20251119", + "tool_search_tool_regex" + ], + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "ToolSearchToolRegex_20251119", + "type": "object" + }, + "BetaToolSearchToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "unavailable", + "too_many_requests", + "execution_time_exceeded" + ], + "title": "ToolSearchToolResultErrorCode", + "type": "string" + }, + "BetaToolUsesKeep": { + "additionalProperties": false, + "properties": { + "type": { + "const": "tool_uses", + "title": "Type", + "type": "string" + }, + "value": { + "minimum": 0, + "title": "Value", + "type": "integer" + } + }, + "required": [ + "type", + "value" + ], + "title": "ToolUsesKeep", + "type": "object" + }, + "BetaToolUsesTrigger": { + "additionalProperties": false, + "properties": { + "type": { + "const": "tool_uses", + "title": "Type", + "type": "string" + }, + "value": { + "minimum": 1, + "title": "Value", + "type": "integer" + } + }, + "required": [ + "type", + "value" + ], + "title": "ToolUsesTrigger", + "type": "object" + }, + "BetaURLImageSource": { + "additionalProperties": false, + "properties": { + "type": { + "const": "url", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "title": "URLImageSource", + "type": "object" + }, + "BetaURLPDFSource": { + "additionalProperties": false, + "properties": { + "type": { + "const": "url", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "title": "URLPDFSource", + "type": "object" + }, + "BetaUnrestrictedNetwork": { + "properties": { + "type": { + "type": "string", + "const": "unrestricted", + "title": "Type", + "description": "Network policy type" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "type" + ], + "title": "UnrestrictedNetwork", + "description": "Unrestricted network access." + }, + "BetaUpdateUserProfileRequestBody": { + "type": "object", + "additionalProperties": false, + "properties": { + "external_id": { + "description": "If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true, + "examples": [ + "user_12345" + ] + }, + "metadata": { + "description": "Key-value pairs to merge into the stored metadata. Keys provided overwrite existing values. To remove a key, set its value to an empty string. Keys not provided are left unchanged. Maximum 16 keys, with keys up to 64 characters and values up to 512 characters.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "If present, replaces the stored name. Omit to leave unchanged. Maximum 255 characters.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true + }, + "relationship": { + "description": "If present, replaces the stored relationship. Omit to leave unchanged.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaUserProfileRelationship" + } + ], + "nullable": true + } + }, + "example": { + "external_id": "user_12345" + } + }, + "BetaUsage": { + "properties": { + "cache_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaCacheCreation" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Breakdown of cached tokens by TTL" + }, + "cache_creation_input_tokens": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of input tokens used to create the cache entry.", + "examples": [ + 2051 + ], + "title": "Cache Creation Input Tokens" + }, + "cache_read_input_tokens": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of input tokens read from the cache.", + "examples": [ + 2051 + ], + "title": "Cache Read Input Tokens" + }, + "inference_geo": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The geographic region where inference was performed for this request.", + "title": "Inference Geo" + }, + "input_tokens": { + "description": "The number of input tokens which were used.", + "examples": [ + 2095 + ], + "minimum": 0, + "title": "Input Tokens", + "type": "integer" + }, + "iterations": { + "$ref": "#/components/schemas/BetaIterationsUsage" + }, + "output_tokens": { + "description": "The number of output tokens which were used.", + "examples": [ + 503 + ], + "minimum": 0, + "title": "Output Tokens", + "type": "integer" + }, + "server_tool_use": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaServerToolUsage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of server tool requests." + }, + "service_tier": { + "anyOf": [ + { + "enum": [ + "standard", + "priority", + "batch" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If the request used the priority, standard, or batch tier.", + "title": "Service Tier" + }, + "speed": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaSpeed" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The inference speed mode used for this request." + } + }, + "required": [ + "cache_creation", + "cache_creation_input_tokens", + "cache_read_input_tokens", + "inference_geo", + "input_tokens", + "iterations", + "output_tokens", + "server_tool_use", + "service_tier", + "speed" + ], + "title": "Usage", + "type": "object" + }, + "BetaUserLocation": { + "additionalProperties": false, + "properties": { + "city": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The city of the user.", + "examples": [ + "New York", + "Tokyo", + "Los Angeles" + ], + "title": "City" + }, + "country": { + "anyOf": [ + { + "maxLength": 2, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.", + "examples": [ + "US", + "JP", + "GB" + ], + "title": "Country" + }, + "region": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The region of the user.", + "examples": [ + "California", + "Ontario", + "Wales" + ], + "title": "Region" + }, + "timezone": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The [IANA timezone](https://nodatime.org/TimeZones) of the user.", + "examples": [ + "America/New_York", + "Asia/Tokyo", + "Europe/London" + ], + "title": "Timezone" + }, + "type": { + "const": "approximate", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "UserLocation", + "type": "object" + }, + "BetaUserProfile": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "type", + "relationship", + "trust_grants", + "created_at", + "metadata", + "updated_at" + ], + "properties": { + "id": { + "description": "Unique identifier for this user profile, prefixed `uprof_`.", + "type": "string", + "examples": [ + "uprof_011CZkZCu8hGbp5mYRQgUmz9" + ] + }, + "type": { + "description": "Object type. Always `user_profile`.", + "type": "string", + "enum": [ + "user_profile" + ], + "examples": [ + "user_profile" + ] + }, + "external_id": { + "description": "Platform's own identifier for this user. Not enforced unique.", + "type": "string", + "nullable": true, + "examples": [ + "user_12345" + ] + }, + "name": { + "description": "Display name of the entity this profile represents. For `resold` this is the resold-to company's name.", + "type": "string", + "nullable": true, + "examples": [ + "Example User" + ] + }, + "relationship": { + "description": "How the entity relates to the platform. `external` (default), `resold`, or `internal`.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaUserProfileRelationship" + } + ], + "examples": [ + "external" + ] + }, + "trust_grants": { + "description": "Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/BetaUserProfileTrustGrant" + }, + "examples": [ + { + "cyber": { + "status": "active" + } + } + ] + }, + "created_at": { + "description": "When this user profile was created, in RFC 3339 format.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "metadata": { + "description": "Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "examples": [ + {} + ] + }, + "updated_at": { + "description": "When this user profile was last modified, in RFC 3339 format. Trust-grant status changes also bump this timestamp.", + "allOf": [ + { + "$ref": "#/components/schemas/BetaTimestamp" + } + ], + "examples": [ + "2026-03-15T10:00:00Z" + ] + } + }, + "example": { + "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", + "type": "user_profile", + "external_id": "user_12345", + "name": "Example User", + "relationship": "external", + "trust_grants": { + "cyber": { + "status": "active" + } + }, + "metadata": {}, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z" + } + }, + "BetaUserProfileListOrder": { + "type": "string", + "description": "ListOrder enum", + "enum": [ + "asc", + "desc" + ] + }, + "BetaUserProfileRelationship": { + "type": "string", + "description": "How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage.", + "enum": [ + "external", + "resold", + "internal" + ] + }, + "BetaUserProfileTrustGrant": { + "type": "object", + "additionalProperties": false, + "required": [ + "status" + ], + "properties": { + "status": { + "description": "Status of the trust grant.", + "type": "string", + "enum": [ + "active", + "pending", + "rejected" + ], + "examples": [ + "active" + ] + } + }, + "example": { + "status": "active" + } + }, + "BetaWebFetchToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "url_too_long", + "url_not_allowed", + "url_not_accessible", + "unsupported_content_type", + "too_many_requests", + "max_uses_exceeded", + "unavailable" + ], + "title": "WebFetchToolResultErrorCode", + "type": "string" + }, + "BetaWebFetchTool_20250910": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to allow fetching from", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to block fetching from", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestCitationsConfig" + }, + { + "type": "null" + } + ], + "description": "Citations configuration for fetched documents. Citations are disabled by default." + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_content_tokens": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.", + "title": "Max Content Tokens" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_fetch", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "web_fetch_20250910", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "WebFetchTool_20250910", + "type": "object" + }, + "BetaWebFetchTool_20260209": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to allow fetching from", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to block fetching from", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestCitationsConfig" + }, + { + "type": "null" + } + ], + "description": "Citations configuration for fetched documents. Citations are disabled by default." + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_content_tokens": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.", + "title": "Max Content Tokens" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_fetch", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "web_fetch_20260209", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "WebFetchTool_20260209", + "type": "object" + }, + "BetaWebFetchTool_20260309": { + "additionalProperties": false, + "description": "Web fetch tool with use_cache parameter for bypassing cached content.", + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to allow fetching from", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to block fetching from", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaRequestCitationsConfig" + }, + { + "type": "null" + } + ], + "description": "Citations configuration for fetched documents. Citations are disabled by default." + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_content_tokens": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.", + "title": "Max Content Tokens" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_fetch", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "web_fetch_20260309", + "title": "Type", + "type": "string" + }, + "use_cache": { + "description": "Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.", + "title": "Use Cache", + "type": "boolean" + } + }, + "required": [ + "name", + "type" + ], + "title": "WebFetchTool_20260309", + "type": "object" + }, + "BetaWebSearchToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "unavailable", + "max_uses_exceeded", + "too_many_requests", + "query_too_long", + "request_too_large" + ], + "title": "WebSearchToolResultErrorCode", + "type": "string" + }, + "BetaWebSearchTool_20250305": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_search", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "web_search_20250305", + "title": "Type", + "type": "string" + }, + "user_location": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaUserLocation" + }, + { + "type": "null" + } + ], + "description": "Parameters for the user's location. Used to provide more relevant search results." + } + }, + "required": [ + "name", + "type" + ], + "title": "WebSearchTool_20250305", + "type": "object" + }, + "BetaWebSearchTool_20260209": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/BetaAllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaCacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_search", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "web_search_20260209", + "title": "Type", + "type": "string" + }, + "user_location": { + "anyOf": [ + { + "$ref": "#/components/schemas/BetaUserLocation" + }, + { + "type": "null" + } + ], + "description": "Parameters for the user's location. Used to provide more relevant search results." + } + }, + "required": [ + "name", + "type" + ], + "title": "WebSearchTool_20260209", + "type": "object" + }, + "BetaWebhookEvent": { + "type": "object", + "title": "BetaWebhookEvent", + "required": [ + "type", + "id", + "created_at", + "data" + ], + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Object type. Always `event` for webhook payloads.", + "examples": [ + "event" + ] + }, + "id": { + "type": "string", + "description": "Unique event identifier for idempotency.", + "examples": [ + "wevt_011CZkZYZd9rLmz3ujAcsqEw" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "RFC 3339 timestamp when the event occurred.", + "examples": [ + "2026-03-15T10:00:00Z" + ] + }, + "data": { + "$ref": "#/components/schemas/BetaWebhookEventData", + "examples": [ + { + "type": "session.status_idled", + "id": "sesn_011CZkZAtmR3yMPDzynEDxu7", + "organization_id": "org_011CZkZZAe0sMna4vkBdtrfx", + "workspace_id": "wrkspc_011CZkZaBF1tNoB5wlCeusgy" + } + ] + } + }, + "example": { + "type": "event", + "id": "wevt_011CZkZYZd9rLmz3ujAcsqEw", + "created_at": "2026-03-15T10:00:00Z", + "data": { + "type": "session.status_idled", + "id": "sesn_011CZkZAtmR3yMPDzynEDxu7", + "organization_id": "org_011CZkZZAe0sMna4vkBdtrfx", + "workspace_id": "wrkspc_011CZkZaBF1tNoB5wlCeusgy" + } + } + }, + "BetaWebhookEventData": { + "title": "BetaWebhookEventData", + "oneOf": [ + { + "$ref": "#/components/schemas/BetaWebhookSessionCreatedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionPendingEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionRunningEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionIdledEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionRequiresActionEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionArchivedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionDeletedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionStatusRescheduledEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionStatusRunStartedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionStatusIdledEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionStatusTerminatedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionThreadCreatedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionThreadIdledEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionThreadTerminatedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookSessionOutcomeEvaluationEndedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookVaultCreatedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookVaultArchivedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookVaultDeletedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookVaultCredentialCreatedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookVaultCredentialArchivedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookVaultCredentialDeletedEventData" + }, + { + "$ref": "#/components/schemas/BetaWebhookVaultCredentialRefreshFailedEventData" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "session.created": "#/components/schemas/BetaWebhookSessionCreatedEventData", + "session.pending": "#/components/schemas/BetaWebhookSessionPendingEventData", + "session.running": "#/components/schemas/BetaWebhookSessionRunningEventData", + "session.idled": "#/components/schemas/BetaWebhookSessionIdledEventData", + "session.requires_action": "#/components/schemas/BetaWebhookSessionRequiresActionEventData", + "session.archived": "#/components/schemas/BetaWebhookSessionArchivedEventData", + "session.deleted": "#/components/schemas/BetaWebhookSessionDeletedEventData", + "session.status_rescheduled": "#/components/schemas/BetaWebhookSessionStatusRescheduledEventData", + "session.status_run_started": "#/components/schemas/BetaWebhookSessionStatusRunStartedEventData", + "session.status_idled": "#/components/schemas/BetaWebhookSessionStatusIdledEventData", + "session.status_terminated": "#/components/schemas/BetaWebhookSessionStatusTerminatedEventData", + "session.thread_created": "#/components/schemas/BetaWebhookSessionThreadCreatedEventData", + "session.thread_idled": "#/components/schemas/BetaWebhookSessionThreadIdledEventData", + "session.thread_terminated": "#/components/schemas/BetaWebhookSessionThreadTerminatedEventData", + "session.outcome_evaluation_ended": "#/components/schemas/BetaWebhookSessionOutcomeEvaluationEndedEventData", + "vault.created": "#/components/schemas/BetaWebhookVaultCreatedEventData", + "vault.archived": "#/components/schemas/BetaWebhookVaultArchivedEventData", + "vault.deleted": "#/components/schemas/BetaWebhookVaultDeletedEventData", + "vault_credential.created": "#/components/schemas/BetaWebhookVaultCredentialCreatedEventData", + "vault_credential.archived": "#/components/schemas/BetaWebhookVaultCredentialArchivedEventData", + "vault_credential.deleted": "#/components/schemas/BetaWebhookVaultCredentialDeletedEventData", + "vault_credential.refresh_failed": "#/components/schemas/BetaWebhookVaultCredentialRefreshFailedEventData" + } + } + }, + "BetaWebhookSessionArchivedEventData": { + "type": "object", + "title": "BetaWebhookSessionArchivedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.archived" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionCreatedEventData": { + "type": "object", + "title": "BetaWebhookSessionCreatedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.created" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionDeletedEventData": { + "type": "object", + "title": "BetaWebhookSessionDeletedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.deleted" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionIdledEventData": { + "type": "object", + "title": "BetaWebhookSessionIdledEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.idled" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionOutcomeEvaluationEndedEventData": { + "type": "object", + "title": "BetaWebhookSessionOutcomeEvaluationEndedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.outcome_evaluation_ended", + "examples": [ + "session.outcome_evaluation_ended" + ] + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event.", + "examples": [ + "sesn_011CZkZAtmR3yMPDzynEDxu7" + ] + }, + "organization_id": { + "type": "string", + "examples": [ + "org_011CZkZZAe0sMna4vkBdtrfx" + ] + }, + "workspace_id": { + "type": "string", + "examples": [ + "wrkspc_011CZkZaBF1tNoB5wlCeusgy" + ] + } + }, + "example": { + "type": "session.outcome_evaluation_ended", + "id": "sesn_011CZkZAtmR3yMPDzynEDxu7", + "organization_id": "org_011CZkZZAe0sMna4vkBdtrfx", + "workspace_id": "wrkspc_011CZkZaBF1tNoB5wlCeusgy" + } + }, + "BetaWebhookSessionPendingEventData": { + "type": "object", + "title": "BetaWebhookSessionPendingEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.pending" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionRequiresActionEventData": { + "type": "object", + "title": "BetaWebhookSessionRequiresActionEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.requires_action" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionRunningEventData": { + "type": "object", + "title": "BetaWebhookSessionRunningEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.running" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionStatusIdledEventData": { + "type": "object", + "title": "BetaWebhookSessionStatusIdledEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.status_idled", + "examples": [ + "session.status_idled" + ] + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event.", + "examples": [ + "sesn_011CZkZAtmR3yMPDzynEDxu7" + ] + }, + "organization_id": { + "type": "string", + "examples": [ + "org_011CZkZZAe0sMna4vkBdtrfx" + ] + }, + "workspace_id": { + "type": "string", + "examples": [ + "wrkspc_011CZkZaBF1tNoB5wlCeusgy" + ] + } + }, + "example": { + "type": "session.status_idled", + "id": "sesn_011CZkZAtmR3yMPDzynEDxu7", + "organization_id": "org_011CZkZZAe0sMna4vkBdtrfx", + "workspace_id": "wrkspc_011CZkZaBF1tNoB5wlCeusgy" + } + }, + "BetaWebhookSessionStatusRescheduledEventData": { + "type": "object", + "title": "BetaWebhookSessionStatusRescheduledEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.status_rescheduled" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionStatusRunStartedEventData": { + "type": "object", + "title": "BetaWebhookSessionStatusRunStartedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.status_run_started" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionStatusTerminatedEventData": { + "type": "object", + "title": "BetaWebhookSessionStatusTerminatedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.status_terminated" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionThreadCreatedEventData": { + "type": "object", + "title": "BetaWebhookSessionThreadCreatedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.thread_created" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionThreadIdledEventData": { + "type": "object", + "title": "BetaWebhookSessionThreadIdledEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.thread_idled" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookSessionThreadTerminatedEventData": { + "type": "object", + "title": "BetaWebhookSessionThreadTerminatedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "session.thread_terminated" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookVaultArchivedEventData": { + "type": "object", + "title": "BetaWebhookVaultArchivedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "vault.archived" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookVaultCreatedEventData": { + "type": "object", + "title": "BetaWebhookVaultCreatedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "vault.created" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "BetaWebhookVaultCredentialArchivedEventData": { + "type": "object", + "title": "BetaWebhookVaultCredentialArchivedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id", + "vault_id" + ], + "properties": { + "type": { + "type": "string", + "const": "vault_credential.archived" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + }, + "vault_id": { + "type": "string", + "description": "ID of the vault that owns this credential." + } + } + }, + "BetaWebhookVaultCredentialCreatedEventData": { + "type": "object", + "title": "BetaWebhookVaultCredentialCreatedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id", + "vault_id" + ], + "properties": { + "type": { + "type": "string", + "const": "vault_credential.created" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + }, + "vault_id": { + "type": "string", + "description": "ID of the vault that owns this credential." + } + } + }, + "BetaWebhookVaultCredentialDeletedEventData": { + "type": "object", + "title": "BetaWebhookVaultCredentialDeletedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id", + "vault_id" + ], + "properties": { + "type": { + "type": "string", + "const": "vault_credential.deleted" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + }, + "vault_id": { + "type": "string", + "description": "ID of the vault that owns this credential." + } + } + }, + "BetaWebhookVaultCredentialRefreshFailedEventData": { + "type": "object", + "title": "BetaWebhookVaultCredentialRefreshFailedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id", + "vault_id" + ], + "properties": { + "type": { + "type": "string", + "const": "vault_credential.refresh_failed" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + }, + "vault_id": { + "type": "string", + "description": "ID of the vault that owns this credential." + } + } + }, + "BetaWebhookVaultDeletedEventData": { + "type": "object", + "title": "BetaWebhookVaultDeletedEventData", + "required": [ + "type", + "id", + "organization_id", + "workspace_id" + ], + "properties": { + "type": { + "type": "string", + "const": "vault.deleted" + }, + "id": { + "type": "string", + "description": "ID of the resource that triggered the event." + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "Betaapi__schemas__skills__Skill": { + "properties": { + "created_at": { + "type": "string", + "title": "Created At", + "description": "ISO 8601 timestamp of when the skill was created.", + "examples": [ + "2024-10-30T23:58:27.427722Z" + ] + }, + "display_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Title", + "description": "Display title for the skill.\n\nThis is a human-readable label that is not included in the prompt sent to the model.", + "examples": [ + "My Custom Skill" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique identifier for the skill.\n\nThe format and length of IDs may change over time.", + "examples": [ + "skill_01JAbcdefghijklmnopqrstuvw" + ] + }, + "latest_version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Latest Version", + "description": "The latest version identifier for the skill.\n\nThis represents the most recent version of the skill that has been created.", + "examples": [ + "1759178010641129" + ] + }, + "source": { + "type": "string", + "title": "Source", + "description": "Source of the skill.\n\nThis may be one of the following values:\n* `\"custom\"`: the skill was created by a user\n* `\"anthropic\"`: the skill was created by Anthropic", + "examples": [ + "custom" + ] + }, + "type": { + "type": "string", + "title": "Type", + "description": "Object type.\n\nFor Skills, this is always `\"skill\"`.", + "default": "skill" + }, + "updated_at": { + "type": "string", + "title": "Updated At", + "description": "ISO 8601 timestamp of when the skill was last updated.", + "examples": [ + "2024-10-30T23:58:27.427722Z" + ] + } + }, + "type": "object", + "required": [ + "created_at", + "display_title", + "id", + "latest_version", + "source", + "type", + "updated_at" + ], + "title": "Skill" + }, + "BillingError": { + "properties": { + "message": { + "default": "Billing error", + "title": "Message", + "type": "string" + }, + "type": { + "const": "billing_error", + "default": "billing_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "BillingError", + "type": "object" + }, + "CacheControlEphemeral": { + "additionalProperties": false, + "properties": { + "ttl": { + "description": "The time-to-live for the cache control breakpoint.\n\nThis may be one the following values:\n- `5m`: 5 minutes\n- `1h`: 1 hour\n\nDefaults to `5m`.", + "enum": [ + "5m", + "1h" + ], + "title": "Ttl", + "type": "string", + "x-stainless-renameMap": { + "ttl_5m": "5m", + "ttl_1h": "1h" + } + }, + "type": { + "const": "ephemeral", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "CacheControlEphemeral", + "type": "object", + "x-stainless-go-constant-constructor": true + }, + "CacheCreation": { + "properties": { + "ephemeral_1h_input_tokens": { + "default": 0, + "description": "The number of input tokens used to create the 1 hour cache entry.", + "minimum": 0, + "title": "Ephemeral 1H Input Tokens", + "type": "integer" + }, + "ephemeral_5m_input_tokens": { + "default": 0, + "description": "The number of input tokens used to create the 5 minute cache entry.", + "minimum": 0, + "title": "Ephemeral 5M Input Tokens", + "type": "integer" + } + }, + "required": [ + "ephemeral_1h_input_tokens", + "ephemeral_5m_input_tokens" + ], + "title": "CacheCreation", + "type": "object" + }, + "CanceledResult": { + "properties": { + "type": { + "const": "canceled", + "default": "canceled", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "CanceledResult", + "type": "object" + }, + "CapabilitySupport": { + "properties": { + "supported": { + "type": "boolean", + "title": "Supported", + "description": "Whether this capability is supported by the model." + } + }, + "type": "object", + "required": [ + "supported" + ], + "title": "CapabilitySupport", + "description": "Indicates whether a capability is supported." + }, + "CitationsDelta": { + "properties": { + "citation": { + "discriminator": { + "mapping": { + "char_location": "#/components/schemas/ResponseCharLocationCitation", + "content_block_location": "#/components/schemas/ResponseContentBlockLocationCitation", + "page_location": "#/components/schemas/ResponsePageLocationCitation", + "search_result_location": "#/components/schemas/ResponseSearchResultLocationCitation", + "web_search_result_location": "#/components/schemas/ResponseWebSearchResultLocationCitation" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ResponseCharLocationCitation" + }, + { + "$ref": "#/components/schemas/ResponsePageLocationCitation" + }, + { + "$ref": "#/components/schemas/ResponseContentBlockLocationCitation" + }, + { + "$ref": "#/components/schemas/ResponseWebSearchResultLocationCitation" + }, + { + "$ref": "#/components/schemas/ResponseSearchResultLocationCitation" + } + ], + "title": "Citation" + }, + "type": { + "const": "citations_delta", + "default": "citations_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "citation", + "type" + ], + "title": "CitationsDelta", + "type": "object" + }, + "CodeExecutionToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "unavailable", + "too_many_requests", + "execution_time_exceeded" + ], + "title": "CodeExecutionToolResultErrorCode", + "type": "string" + }, + "CodeExecutionTool_20250522": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "name": { + "const": "code_execution", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "code_execution_20250522", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "CodeExecutionTool_20250522", + "type": "object" + }, + "CodeExecutionTool_20250825": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "name": { + "const": "code_execution", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "code_execution_20250825", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "CodeExecutionTool_20250825", + "type": "object" + }, + "CodeExecutionTool_20260120": { + "additionalProperties": false, + "description": "Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).", + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "name": { + "const": "code_execution", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "code_execution_20260120", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "CodeExecutionTool_20260120", + "type": "object" + }, + "CompletionRequest": { + "additionalProperties": false, + "examples": [ + { + "max_tokens_to_sample": 256, + "model": "claude-2.1", + "prompt": "\n\nHuman: Hello, world!\n\nAssistant:" + } + ], + "properties": { + "model": { + "$ref": "#/components/schemas/Model" + }, + "prompt": { + "description": "The prompt that you want Claude to complete.\n\nFor proper response generation you will need to format your prompt using alternating `\\n\\nHuman:` and `\\n\\nAssistant:` conversational turns. For example:\n\n```\n\"\\n\\nHuman: {userQuestion}\\n\\nAssistant:\"\n```\n\nSee [prompt validation](https://docs.claude.com/en/api/prompt-validation) and our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting) for more details.", + "examples": [ + "\n\nHuman: Hello, world!\n\nAssistant:" + ], + "minLength": 1, + "title": "Prompt", + "type": "string" + }, + "max_tokens_to_sample": { + "description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.", + "examples": [ + 256 + ], + "minimum": 1, + "title": "Max Tokens To Sample", + "type": "integer" + }, + "stop_sequences": { + "description": "Sequences that will cause the model to stop generating.\n\nOur models stop on `\"\\n\\nHuman:\"`, and may include additional built-in stop sequences in the future. By providing the stop_sequences parameter, you may include additional strings that will cause the model to stop generating.", + "items": { + "type": "string" + }, + "title": "Stop Sequences", + "type": "array" + }, + "temperature": { + "deprecated": true, + "description": "Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic.", + "examples": [ + 1 + ], + "maximum": 1, + "minimum": 0, + "title": "Temperature", + "type": "number", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not support setting temperature. A value of 1.0 of will be accepted for backwards compatibility, all other values will be rejected with a 400 error." + }, + "top_p": { + "deprecated": true, + "description": "Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`.\n\nRecommended for advanced use cases only.", + "examples": [ + 0.7 + ], + "maximum": 1, + "minimum": 0, + "title": "Top P", + "type": "number", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not support setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all other values will be rejected with a 400 error." + }, + "top_k": { + "deprecated": true, + "description": "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only.", + "examples": [ + 5 + ], + "minimum": 0, + "title": "Top K", + "type": "integer", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value will be rejected with a 400 error." + }, + "metadata": { + "$ref": "#/components/schemas/Metadata", + "description": "An object describing metadata about the request." + }, + "stream": { + "description": "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.claude.com/en/api/streaming) for details.", + "title": "Stream", + "type": "boolean" + } + }, + "required": [ + "max_tokens_to_sample", + "model", + "prompt" + ], + "title": "CompletionRequest", + "type": "object" + }, + "CompletionResponse": { + "properties": { + "completion": { + "type": "string", + "title": "Completion", + "description": "The resulting completion up to and excluding the stop sequences.", + "examples": [ + " Hello! My name is Claude." + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique object identifier.\n\nThe format and length of IDs may change over time." + }, + "model": { + "$ref": "#/components/schemas/Model" + }, + "stop_reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stop Reason", + "description": "The reason that we stopped.\n\nThis may be one the following values:\n* `\"stop_sequence\"`: we reached a stop sequence — either provided by you via the `stop_sequences` parameter, or a stop sequence built into the model\n* `\"max_tokens\"`: we exceeded `max_tokens_to_sample` or the model's maximum", + "examples": [ + "stop_sequence" + ] + }, + "type": { + "type": "string", + "const": "completion", + "title": "Type", + "description": "Object type.\n\nFor Text Completions, this is always `\"completion\"`.", + "default": "completion" + } + }, + "type": "object", + "required": [ + "completion", + "id", + "model", + "stop_reason", + "type" + ], + "title": "CompletionResponse", + "example": { + "completion": " Hello! My name is Claude.", + "id": "compl_018CKm6gsux7P8yMcwZbeCPw", + "model": "claude-2.1", + "stop_reason": "stop_sequence", + "type": "completion" + } + }, + "Container": { + "description": "Information about the container used in the request (for the code execution tool)", + "properties": { + "expires_at": { + "description": "The time at which the container will expire.", + "format": "date-time", + "title": "Expires At", + "type": "string" + }, + "id": { + "description": "Identifier for the container used in this request", + "title": "Id", + "type": "string" + } + }, + "required": [ + "expires_at", + "id" + ], + "title": "Container", + "type": "object" + }, + "ContentBlockDeltaEvent": { + "properties": { + "delta": { + "discriminator": { + "mapping": { + "citations_delta": "#/components/schemas/CitationsDelta", + "input_json_delta": "#/components/schemas/InputJsonContentBlockDelta", + "signature_delta": "#/components/schemas/SignatureContentBlockDelta", + "text_delta": "#/components/schemas/TextContentBlockDelta", + "thinking_delta": "#/components/schemas/ThinkingContentBlockDelta" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/TextContentBlockDelta" + }, + { + "$ref": "#/components/schemas/InputJsonContentBlockDelta" + }, + { + "$ref": "#/components/schemas/CitationsDelta" + }, + { + "$ref": "#/components/schemas/ThinkingContentBlockDelta" + }, + { + "$ref": "#/components/schemas/SignatureContentBlockDelta" + } + ], + "title": "Delta" + }, + "index": { + "title": "Index", + "type": "integer" + }, + "type": { + "const": "content_block_delta", + "default": "content_block_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "delta", + "index", + "type" + ], + "title": "ContentBlockDeltaEvent", + "type": "object", + "x-stainless-naming": { + "go": { + "model_name": "ContentBlockDeltaEvent" + } + } + }, + "ContentBlockSource": { + "additionalProperties": false, + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "discriminator": { + "mapping": { + "image": "#/components/schemas/RequestImageBlock", + "text": "#/components/schemas/RequestTextBlock" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/RequestTextBlock" + }, + { + "$ref": "#/components/schemas/RequestImageBlock" + } + ], + "x-stainless-naming": { + "go": { + "type_name": "ContentBlockSourceContentItem" + } + }, + "title": "content_block_source_content_item" + }, + "type": "array", + "title": "content_block_source_content" + } + ], + "title": "Content" + }, + "type": { + "const": "content", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "type" + ], + "title": "ContentBlockSource", + "type": "object" + }, + "ContentBlockStartEvent": { + "properties": { + "content_block": { + "discriminator": { + "mapping": { + "bash_code_execution_tool_result": "#/components/schemas/ResponseBashCodeExecutionToolResultBlock", + "code_execution_tool_result": "#/components/schemas/ResponseCodeExecutionToolResultBlock", + "container_upload": "#/components/schemas/ResponseContainerUploadBlock", + "redacted_thinking": "#/components/schemas/ResponseRedactedThinkingBlock", + "server_tool_use": "#/components/schemas/ResponseServerToolUseBlock", + "text": "#/components/schemas/ResponseTextBlock", + "text_editor_code_execution_tool_result": "#/components/schemas/ResponseTextEditorCodeExecutionToolResultBlock", + "thinking": "#/components/schemas/ResponseThinkingBlock", + "tool_search_tool_result": "#/components/schemas/ResponseToolSearchToolResultBlock", + "tool_use": "#/components/schemas/ResponseToolUseBlock", + "web_fetch_tool_result": "#/components/schemas/ResponseWebFetchToolResultBlock", + "web_search_tool_result": "#/components/schemas/ResponseWebSearchToolResultBlock" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ResponseTextBlock" + }, + { + "$ref": "#/components/schemas/ResponseThinkingBlock" + }, + { + "$ref": "#/components/schemas/ResponseRedactedThinkingBlock" + }, + { + "$ref": "#/components/schemas/ResponseToolUseBlock" + }, + { + "$ref": "#/components/schemas/ResponseServerToolUseBlock" + }, + { + "$ref": "#/components/schemas/ResponseWebSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseWebFetchToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseBashCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseTextEditorCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseToolSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseContainerUploadBlock" + } + ], + "title": "Content Block" + }, + "index": { + "title": "Index", + "type": "integer" + }, + "type": { + "const": "content_block_start", + "default": "content_block_start", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content_block", + "index", + "type" + ], + "title": "ContentBlockStartEvent", + "type": "object", + "x-stainless-naming": { + "go": { + "model_name": "ContentBlockStartEvent" + } + } + }, + "ContentBlockStopEvent": { + "properties": { + "index": { + "title": "Index", + "type": "integer" + }, + "type": { + "const": "content_block_stop", + "default": "content_block_stop", + "title": "Type", + "type": "string" + } + }, + "required": [ + "index", + "type" + ], + "title": "ContentBlockStopEvent", + "type": "object", + "x-stainless-naming": { + "go": { + "model_name": "ContentBlockStopEvent" + } + } + }, + "ContextManagementCapability": { + "properties": { + "clear_thinking_20251015": { + "anyOf": [ + { + "$ref": "#/components/schemas/CapabilitySupport" + }, + { + "type": "null" + } + ], + "description": "Whether the clear_thinking_20251015 strategy is supported." + }, + "clear_tool_uses_20250919": { + "anyOf": [ + { + "$ref": "#/components/schemas/CapabilitySupport" + }, + { + "type": "null" + } + ], + "description": "Whether the clear_tool_uses_20250919 strategy is supported." + }, + "compact_20260112": { + "anyOf": [ + { + "$ref": "#/components/schemas/CapabilitySupport" + }, + { + "type": "null" + } + ], + "description": "Whether the compact_20260112 strategy is supported." + }, + "supported": { + "type": "boolean", + "title": "Supported", + "description": "Whether this capability is supported by the model." + } + }, + "type": "object", + "required": [ + "clear_thinking_20251015", + "clear_tool_uses_20250919", + "compact_20260112", + "supported" + ], + "title": "ContextManagementCapability", + "description": "Context management capability details." + }, + "CountMessageTokensParams": { + "additionalProperties": false, + "examples": [ + { + "messages": [ + { + "content": "Hello, world", + "role": "user" + } + ], + "model": "claude-opus-4-6" + } + ], + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.", + "title": "Cache Control" + }, + "messages": { + "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.", + "items": { + "$ref": "#/components/schemas/InputMessage" + }, + "title": "Messages", + "type": "array" + }, + "model": { + "$ref": "#/components/schemas/Model" + }, + "output_config": { + "$ref": "#/components/schemas/OutputConfig", + "description": "Configuration options for the model's output, such as the output format." + }, + "system": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/RequestTextBlock" + }, + "type": "array" + } + ], + "description": "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).", + "examples": [ + [ + { + "text": "Today's date is 2024-06-01.", + "type": "text" + } + ], + "Today's date is 2023-01-01." + ], + "title": "System" + }, + "thinking": { + "$ref": "#/components/schemas/ThinkingConfigParam" + }, + "tool_choice": { + "$ref": "#/components/schemas/ToolChoice" + }, + "tools": { + "description": "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview\\#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.", + "examples": [ + { + "description": "Get the current weather in a given location", + "input_schema": { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string" + }, + "unit": { + "description": "Unit for the output - one of (celsius, fahrenheit)", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather" + } + ], + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Tool" + }, + { + "$ref": "#/components/schemas/BashTool_20250124" + }, + { + "$ref": "#/components/schemas/CodeExecutionTool_20250522" + }, + { + "$ref": "#/components/schemas/CodeExecutionTool_20250825" + }, + { + "$ref": "#/components/schemas/CodeExecutionTool_20260120" + }, + { + "$ref": "#/components/schemas/MemoryTool_20250818" + }, + { + "$ref": "#/components/schemas/TextEditor_20250124" + }, + { + "$ref": "#/components/schemas/TextEditor_20250429" + }, + { + "$ref": "#/components/schemas/TextEditor_20250728" + }, + { + "$ref": "#/components/schemas/WebSearchTool_20250305" + }, + { + "$ref": "#/components/schemas/WebFetchTool_20250910" + }, + { + "$ref": "#/components/schemas/WebSearchTool_20260209" + }, + { + "$ref": "#/components/schemas/WebFetchTool_20260209" + }, + { + "$ref": "#/components/schemas/WebFetchTool_20260309" + }, + { + "$ref": "#/components/schemas/ToolSearchToolBM25_20251119" + }, + { + "$ref": "#/components/schemas/ToolSearchToolRegex_20251119" + } + ] + }, + "title": "Tools", + "type": "array" + } + }, + "required": [ + "messages", + "model" + ], + "title": "CountMessageTokensParams", + "type": "object" + }, + "CountMessageTokensResponse": { + "properties": { + "input_tokens": { + "type": "integer", + "title": "Input Tokens", + "description": "The total number of tokens across the provided list of messages, system prompt, and tools.", + "examples": [ + 2095 + ] + } + }, + "type": "object", + "required": [ + "input_tokens" + ], + "title": "CountMessageTokensResponse", + "examples": [ + { + "input_tokens": 2095 + } + ] + }, + "CreateMessageBatchParams": { + "additionalProperties": false, + "properties": { + "requests": { + "description": "List of requests for prompt completion. Each is an individual request to create a Message.", + "items": { + "$ref": "#/components/schemas/MessageBatchIndividualRequestParams" + }, + "maxItems": 100000, + "minItems": 1, + "title": "Requests", + "type": "array" + } + }, + "required": [ + "requests" + ], + "title": "CreateMessageBatchParams", + "type": "object" + }, + "CreateMessageParams": { + "additionalProperties": false, + "example": { + "max_tokens": 1024, + "messages": [ + { + "content": "Hello, world", + "role": "user" + } + ], + "model": "claude-opus-4-6" + }, + "properties": { + "model": { + "$ref": "#/components/schemas/Model" + }, + "messages": { + "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.", + "items": { + "$ref": "#/components/schemas/InputMessage" + }, + "title": "Messages", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.", + "title": "Cache Control" + }, + "container": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Container identifier for reuse across requests.", + "title": "Container" + }, + "inference_geo": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used.", + "title": "Inference Geo" + }, + "max_tokens": { + "description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nSet to `0` to populate the [prompt cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.\n\nDifferent models have different maximum values for this parameter. See [models](https://docs.claude.com/en/docs/models-overview) for details.", + "examples": [ + 1024 + ], + "minimum": 0, + "title": "Max Tokens", + "type": "integer" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata", + "description": "An object describing metadata about the request." + }, + "output_config": { + "$ref": "#/components/schemas/OutputConfig", + "description": "Configuration options for the model's output, such as the output format." + }, + "service_tier": { + "description": "Determines whether to use priority capacity (if available) or standard capacity for this request.\n\nAnthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.", + "enum": [ + "auto", + "standard_only" + ], + "title": "Service Tier", + "type": "string" + }, + "stop_sequences": { + "description": "Custom text sequences that will cause the model to stop generating.\n\nOur models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `\"end_turn\"`.\n\nIf you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"` and the response `stop_sequence` value will contain the matched stop sequence.", + "items": { + "type": "string" + }, + "title": "Stop Sequences", + "type": "array" + }, + "stream": { + "description": "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.claude.com/en/api/messages-streaming) for details.", + "title": "Stream", + "type": "boolean" + }, + "system": { + "anyOf": [ + { + "type": "string", + "x-stainless-skip": [ + "go" + ] + }, + { + "items": { + "$ref": "#/components/schemas/RequestTextBlock" + }, + "type": "array" + } + ], + "description": "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).", + "examples": [ + [ + { + "text": "Today's date is 2024-06-01.", + "type": "text" + } + ], + "Today's date is 2023-01-01." + ], + "title": "System" + }, + "temperature": { + "deprecated": true, + "description": "Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic.", + "examples": [ + 1 + ], + "maximum": 1, + "minimum": 0, + "title": "Temperature", + "type": "number", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not support setting temperature. A value of 1.0 of will be accepted for backwards compatibility, all other values will be rejected with a 400 error." + }, + "thinking": { + "$ref": "#/components/schemas/ThinkingConfigParam" + }, + "tool_choice": { + "$ref": "#/components/schemas/ToolChoice" + }, + "tools": { + "description": "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview\\#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.", + "examples": [ + { + "description": "Get the current weather in a given location", + "input_schema": { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string" + }, + "unit": { + "description": "Unit for the output - one of (celsius, fahrenheit)", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather" + } + ], + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Tool" + }, + { + "$ref": "#/components/schemas/BashTool_20250124" + }, + { + "$ref": "#/components/schemas/CodeExecutionTool_20250522" + }, + { + "$ref": "#/components/schemas/CodeExecutionTool_20250825" + }, + { + "$ref": "#/components/schemas/CodeExecutionTool_20260120" + }, + { + "$ref": "#/components/schemas/MemoryTool_20250818" + }, + { + "$ref": "#/components/schemas/TextEditor_20250124" + }, + { + "$ref": "#/components/schemas/TextEditor_20250429" + }, + { + "$ref": "#/components/schemas/TextEditor_20250728" + }, + { + "$ref": "#/components/schemas/WebSearchTool_20250305" + }, + { + "$ref": "#/components/schemas/WebFetchTool_20250910" + }, + { + "$ref": "#/components/schemas/WebSearchTool_20260209" + }, + { + "$ref": "#/components/schemas/WebFetchTool_20260209" + }, + { + "$ref": "#/components/schemas/WebFetchTool_20260309" + }, + { + "$ref": "#/components/schemas/ToolSearchToolBM25_20251119" + }, + { + "$ref": "#/components/schemas/ToolSearchToolRegex_20251119" + } + ] + }, + "title": "Tools", + "type": "array" + }, + "top_k": { + "deprecated": true, + "description": "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only.", + "examples": [ + 5 + ], + "minimum": 0, + "title": "Top K", + "type": "integer", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value will be rejected with a 400 error." + }, + "top_p": { + "deprecated": true, + "description": "Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`.\n\nRecommended for advanced use cases only.", + "examples": [ + 0.7 + ], + "maximum": 1, + "minimum": 0, + "title": "Top P", + "type": "number", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not support setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all other values will be rejected with a 400 error." + } + }, + "required": [ + "model", + "messages", + "max_tokens" + ], + "title": "CreateMessageParams", + "type": "object" + }, + "DeleteMessageBatchResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "ID of the Message Batch.", + "examples": [ + "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF" + ] + }, + "type": { + "type": "string", + "const": "message_batch_deleted", + "title": "Type", + "description": "Deleted object type.\n\nFor Message Batches, this is always `\"message_batch_deleted\"`.", + "default": "message_batch_deleted" + } + }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "DeleteMessageBatchResponse" + }, + "DirectCaller": { + "additionalProperties": false, + "description": "Tool invocation directly from the model.", + "properties": { + "type": { + "const": "direct", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "DirectCaller", + "type": "object" + }, + "EffortCapability": { + "properties": { + "high": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model supports high effort level." + }, + "low": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model supports low effort level." + }, + "max": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model supports max effort level." + }, + "medium": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model supports medium effort level." + }, + "supported": { + "type": "boolean", + "title": "Supported", + "description": "Whether this capability is supported by the model." + }, + "xhigh": { + "anyOf": [ + { + "$ref": "#/components/schemas/CapabilitySupport" + }, + { + "type": "null" + } + ], + "description": "Whether the model supports xhigh effort level." + } + }, + "type": "object", + "required": [ + "high", + "low", + "max", + "medium", + "supported", + "xhigh" + ], + "title": "EffortCapability", + "description": "Effort (reasoning_effort) capability details." + }, + "EffortLevel": { + "description": "All possible effort levels.", + "enum": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "title": "EffortLevel", + "type": "string" + }, + "ErrorResponse": { + "properties": { + "error": { + "discriminator": { + "mapping": { + "api_error": "#/components/schemas/APIError", + "authentication_error": "#/components/schemas/AuthenticationError", + "billing_error": "#/components/schemas/BillingError", + "invalid_request_error": "#/components/schemas/InvalidRequestError", + "not_found_error": "#/components/schemas/NotFoundError", + "overloaded_error": "#/components/schemas/OverloadedError", + "permission_error": "#/components/schemas/PermissionError", + "rate_limit_error": "#/components/schemas/RateLimitError", + "timeout_error": "#/components/schemas/GatewayTimeoutError" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/InvalidRequestError" + }, + { + "$ref": "#/components/schemas/AuthenticationError" + }, + { + "$ref": "#/components/schemas/BillingError" + }, + { + "$ref": "#/components/schemas/PermissionError" + }, + { + "$ref": "#/components/schemas/NotFoundError" + }, + { + "$ref": "#/components/schemas/RateLimitError" + }, + { + "$ref": "#/components/schemas/GatewayTimeoutError" + }, + { + "$ref": "#/components/schemas/APIError" + }, + { + "$ref": "#/components/schemas/OverloadedError" + } + ], + "title": "Error" + }, + "request_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Request Id" + }, + "type": { + "const": "error", + "default": "error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error", + "request_id", + "type" + ], + "title": "ErrorResponse", + "type": "object" + }, + "ErrorType": { + "enum": [ + "invalid_request_error", + "authentication_error", + "permission_error", + "not_found_error", + "rate_limit_error", + "timeout_error", + "overloaded_error", + "api_error", + "billing_error" + ], + "title": "ErrorType", + "type": "string" + }, + "ErroredResult": { + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "type": { + "const": "errored", + "default": "errored", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error", + "type" + ], + "title": "ErroredResult", + "type": "object" + }, + "ExpiredResult": { + "properties": { + "type": { + "const": "expired", + "default": "expired", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ExpiredResult", + "type": "object" + }, + "GatewayTimeoutError": { + "properties": { + "message": { + "default": "Request timeout", + "title": "Message", + "type": "string" + }, + "type": { + "const": "timeout_error", + "default": "timeout_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "GatewayTimeoutError", + "type": "object" + }, + "InputJsonContentBlockDelta": { + "properties": { + "partial_json": { + "title": "Partial Json", + "type": "string" + }, + "type": { + "const": "input_json_delta", + "default": "input_json_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "partial_json", + "type" + ], + "title": "InputJsonContentBlockDelta", + "type": "object" + }, + "InputMessage": { + "additionalProperties": false, + "properties": { + "content": { + "anyOf": [ + { + "type": "string", + "x-stainless-skip": [ + "go", + "cli" + ] + }, + { + "items": { + "$ref": "#/components/schemas/InputContentBlock" + }, + "type": "array", + "example": [ + { + "type": "text", + "text": "What is a quaternion?" + } + ] + } + ], + "title": "Content" + }, + "role": { + "enum": [ + "user", + "assistant" + ], + "title": "Role", + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "title": "InputMessage", + "type": "object", + "discriminator": { + "propertyName": "role" + } + }, + "InputSchema": { + "additionalProperties": true, + "properties": { + "properties": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Properties" + }, + "required": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Required" + }, + "type": { + "const": "object", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "InputSchema", + "type": "object" + }, + "InvalidRequestError": { + "properties": { + "message": { + "default": "Invalid request", + "title": "Message", + "type": "string" + }, + "type": { + "const": "invalid_request_error", + "default": "invalid_request_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "InvalidRequestError", + "type": "object" + }, + "JsonOutputFormat": { + "additionalProperties": false, + "properties": { + "schema": { + "additionalProperties": true, + "description": "The JSON schema of the format", + "title": "Schema", + "type": "object" + }, + "type": { + "const": "json_schema", + "title": "Type", + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "title": "JsonOutputFormat", + "type": "object" + }, + "JsonValue": {}, + "ListResponse_MessageBatch_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/MessageBatch" + }, + "type": "array", + "title": "Data" + }, + "first_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Id", + "description": "First ID in the `data` list. Can be used as the `before_id` for the previous page." + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Indicates if there are more results in the requested page direction." + }, + "last_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Id", + "description": "Last ID in the `data` list. Can be used as the `after_id` for the next page." + } + }, + "type": "object", + "required": [ + "data", + "first_id", + "has_more", + "last_id" + ], + "title": "ListResponse[MessageBatch]" + }, + "ListResponse_ModelInfo_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/ModelInfo" + }, + "type": "array", + "title": "Data" + }, + "first_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Id", + "description": "First ID in the `data` list. Can be used as the `before_id` for the previous page." + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Indicates if there are more results in the requested page direction." + }, + "last_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Id", + "description": "Last ID in the `data` list. Can be used as the `after_id` for the next page." + } + }, + "type": "object", + "required": [ + "data", + "first_id", + "has_more", + "last_id" + ], + "title": "ListResponse[ModelInfo]" + }, + "MemoryTool_20250818": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "memory", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "memory_20250818", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "MemoryTool_20250818", + "type": "object" + }, + "Message": { + "examples": [ + { + "content": [ + { + "citations": null, + "text": "Hi! My name is Claude.", + "type": "text" + } + ], + "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", + "model": "claude-opus-4-6", + "role": "assistant", + "stop_details": null, + "stop_reason": "end_turn", + "stop_sequence": null, + "type": "message", + "usage": { + "input_tokens": 2095, + "output_tokens": 503 + } + } + ], + "properties": { + "id": { + "description": "Unique object identifier.\n\nThe format and length of IDs may change over time.", + "examples": [ + "msg_013Zva2CMHLNnXjNJJKqJ2EF" + ], + "title": "Id", + "type": "string" + }, + "type": { + "const": "message", + "default": "message", + "description": "Object type.\n\nFor Messages, this is always `\"message\"`.", + "title": "Type", + "type": "string" + }, + "role": { + "const": "assistant", + "default": "assistant", + "description": "Conversational role of the generated message.\n\nThis will always be `\"assistant\"`.", + "title": "Role", + "type": "string" + }, + "content": { + "description": "Content generated by the model.\n\nThis is an array of content blocks, each of which has a `type` that determines its shape.\n\nExample:\n\n```json\n[{\"type\": \"text\", \"text\": \"Hi, I'm Claude.\"}]\n```\n\nIf the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.\n\nFor example, if the input `messages` were:\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"}\n]\n```\n\nThen the response `content` might be:\n\n```json\n[{\"type\": \"text\", \"text\": \"B)\"}]\n```", + "examples": [ + [ + { + "citations": null, + "text": "Hi! My name is Claude.", + "type": "text" + } + ] + ], + "items": { + "$ref": "#/components/schemas/ContentBlock" + }, + "title": "Content", + "type": "array" + }, + "model": { + "$ref": "#/components/schemas/Model" + }, + "stop_reason": { + "anyOf": [ + { + "$ref": "#/components/schemas/StopReason" + }, + { + "type": "null" + } + ], + "description": "The reason that we stopped.\n\nThis may be one the following values:\n* `\"end_turn\"`: the model reached a natural stopping point\n* `\"max_tokens\"`: we exceeded the requested `max_tokens` or the model's maximum\n* `\"stop_sequence\"`: one of your provided custom `stop_sequences` was generated\n* `\"tool_use\"`: the model invoked one or more tools\n* `\"pause_turn\"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.\n* `\"refusal\"`: when streaming classifiers intervene to handle potential policy violations\n\nIn non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.", + "title": "Stop Reason" + }, + "stop_sequence": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Which custom stop sequence was generated, if any.\n\nThis value will be a non-null string if one of your custom stop sequences was generated.", + "title": "Stop Sequence" + }, + "stop_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/RefusalStopDetails" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Structured information about why model output stopped.\n\nThis is `null` when the `stop_reason` has no additional detail to report." + }, + "usage": { + "$ref": "#/components/schemas/Usage", + "description": "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response from Claude.\n\nTotal input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.", + "examples": [ + { + "input_tokens": 2095, + "output_tokens": 503 + } + ] + }, + "container": { + "anyOf": [ + { + "$ref": "#/components/schemas/Container" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Information about the container used in this request.\n\nThis will be non-null if a container tool (e.g. code execution) was used." + } + }, + "required": [ + "id", + "type", + "role", + "content", + "model", + "stop_reason", + "stop_sequence", + "stop_details", + "usage", + "container" + ], + "title": "Message", + "type": "object", + "x-stainless-python-custom-imports": [ + "from .content_block import ContentBlock as ContentBlock" + ] + }, + "MessageBatch": { + "properties": { + "archived_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Archived At", + "description": "RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.", + "examples": [ + "2024-08-20T18:37:24.100435Z" + ] + }, + "cancel_initiated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Cancel Initiated At", + "description": "RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.", + "examples": [ + "2024-08-20T18:37:24.100435Z" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At", + "description": "RFC 3339 datetime string representing the time at which the Message Batch was created.", + "examples": [ + "2024-08-20T18:37:24.100435Z" + ] + }, + "ended_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Ended At", + "description": "RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.\n\nProcessing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.", + "examples": [ + "2024-08-20T18:37:24.100435Z" + ] + }, + "expires_at": { + "type": "string", + "format": "date-time", + "title": "Expires At", + "description": "RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.", + "examples": [ + "2024-08-20T18:37:24.100435Z" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique object identifier.\n\nThe format and length of IDs may change over time.", + "examples": [ + "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF" + ] + }, + "processing_status": { + "type": "string", + "enum": [ + "in_progress", + "canceling", + "ended" + ], + "title": "Processing Status", + "description": "Processing status of the Message Batch.", + "examples": [ + "in_progress" + ] + }, + "request_counts": { + "$ref": "#/components/schemas/RequestCounts", + "description": "Tallies requests within the Message Batch, categorized by their status.\n\nRequests start as `processing` and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch." + }, + "results_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Results Url", + "description": "URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.\n\nResults in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.", + "examples": [ + "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results" + ] + }, + "type": { + "type": "string", + "const": "message_batch", + "title": "Type", + "description": "Object type.\n\nFor Message Batches, this is always `\"message_batch\"`.", + "default": "message_batch" + } + }, + "type": "object", + "required": [ + "archived_at", + "cancel_initiated_at", + "created_at", + "ended_at", + "expires_at", + "id", + "processing_status", + "request_counts", + "results_url", + "type" + ], + "title": "MessageBatch" + }, + "MessageBatchIndividualRequestParams": { + "additionalProperties": false, + "properties": { + "custom_id": { + "description": "Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.\n\nMust be unique for each request within the Message Batch.", + "examples": [ + "my-custom-id-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Custom Id", + "type": "string" + }, + "params": { + "$ref": "#/components/schemas/CreateMessageParams", + "description": "Messages API creation parameters for the individual request.\n\nSee the [Messages API reference](https://docs.claude.com/en/api/messages) for full documentation on available parameters." + } + }, + "required": [ + "custom_id", + "params" + ], + "title": "MessageBatchIndividualRequestParams", + "type": "object" + }, + "MessageBatchIndividualResponse": { + "description": "This is a single line in the response `.jsonl` file and does not represent the response as a whole.", + "properties": { + "custom_id": { + "description": "Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.\n\nMust be unique for each request within the Message Batch.", + "examples": [ + "my-custom-id-1" + ], + "title": "Custom Id", + "type": "string" + }, + "result": { + "description": "Processing result for this request.\n\nContains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration.", + "discriminator": { + "mapping": { + "canceled": "#/components/schemas/CanceledResult", + "errored": "#/components/schemas/ErroredResult", + "expired": "#/components/schemas/ExpiredResult", + "succeeded": "#/components/schemas/SucceededResult" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/SucceededResult" + }, + { + "$ref": "#/components/schemas/ErroredResult" + }, + { + "$ref": "#/components/schemas/CanceledResult" + }, + { + "$ref": "#/components/schemas/ExpiredResult" + } + ], + "title": "Result" + } + }, + "required": [ + "custom_id", + "result" + ], + "title": "MessageBatchIndividualResponse", + "type": "object" + }, + "MessageDelta": { + "properties": { + "container": { + "anyOf": [ + { + "$ref": "#/components/schemas/Container" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Information about the container used in this request.\n\nThis will be non-null if a container tool (e.g. code execution) was used." + }, + "stop_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/RefusalStopDetails" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Structured information about why model output stopped.\n\nThis is `null` when the `stop_reason` has no additional detail to report." + }, + "stop_reason": { + "anyOf": [ + { + "$ref": "#/components/schemas/StopReason" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Stop Reason" + }, + "stop_sequence": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Stop Sequence" + } + }, + "required": [ + "container", + "stop_details", + "stop_reason", + "stop_sequence" + ], + "title": "MessageDelta", + "type": "object" + }, + "MessageDeltaEvent": { + "properties": { + "delta": { + "$ref": "#/components/schemas/MessageDelta" + }, + "type": { + "const": "message_delta", + "default": "message_delta", + "title": "Type", + "type": "string" + }, + "usage": { + "$ref": "#/components/schemas/MessageDeltaUsage", + "description": "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response from Claude.\n\nTotal input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.", + "examples": [ + { + "output_tokens": 503 + } + ] + } + }, + "required": [ + "delta", + "type", + "usage" + ], + "title": "MessageDeltaEvent", + "type": "object", + "x-stainless-naming": { + "go": { + "model_name": "MessageDeltaEvent" + } + } + }, + "MessageDeltaUsage": { + "properties": { + "cache_creation_input_tokens": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The cumulative number of input tokens used to create the cache entry.", + "examples": [ + 2051 + ], + "title": "Cache Creation Input Tokens" + }, + "cache_read_input_tokens": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The cumulative number of input tokens read from the cache.", + "examples": [ + 2051 + ], + "title": "Cache Read Input Tokens" + }, + "input_tokens": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The cumulative number of input tokens which were used.", + "examples": [ + 2095 + ], + "title": "Input Tokens" + }, + "output_tokens": { + "description": "The cumulative number of output tokens which were used.", + "examples": [ + 503 + ], + "title": "Output Tokens", + "type": "integer" + }, + "server_tool_use": { + "anyOf": [ + { + "$ref": "#/components/schemas/ServerToolUsage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of server tool requests." + } + }, + "required": [ + "cache_creation_input_tokens", + "cache_read_input_tokens", + "input_tokens", + "output_tokens", + "server_tool_use" + ], + "title": "MessageDeltaUsage", + "type": "object" + }, + "MessageStartEvent": { + "properties": { + "message": { + "$ref": "#/components/schemas/Message" + }, + "type": { + "const": "message_start", + "default": "message_start", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "MessageStartEvent", + "type": "object", + "x-stainless-naming": { + "go": { + "model_name": "MessageStartEvent" + } + } + }, + "MessageStopEvent": { + "properties": { + "type": { + "const": "message_stop", + "default": "message_stop", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "MessageStopEvent", + "type": "object", + "x-stainless-naming": { + "go": { + "model_name": "MessageStopEvent" + } + } + }, + "MessageStreamEvent": { + "discriminator": { + "mapping": { + "content_block_delta": "#/components/schemas/ContentBlockDeltaEvent", + "content_block_start": "#/components/schemas/ContentBlockStartEvent", + "content_block_stop": "#/components/schemas/ContentBlockStopEvent", + "message_delta": "#/components/schemas/MessageDeltaEvent", + "message_start": "#/components/schemas/MessageStartEvent", + "message_stop": "#/components/schemas/MessageStopEvent" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/MessageStartEvent" + }, + { + "$ref": "#/components/schemas/MessageDeltaEvent" + }, + { + "$ref": "#/components/schemas/MessageStopEvent" + }, + { + "$ref": "#/components/schemas/ContentBlockStartEvent" + }, + { + "$ref": "#/components/schemas/ContentBlockDeltaEvent" + }, + { + "$ref": "#/components/schemas/ContentBlockStopEvent" + } + ], + "title": "MessageStreamEvent", + "x-stainless-naming": { + "go": { + "model_name": "MessageStreamEvent" + } + } + }, + "Metadata": { + "additionalProperties": false, + "properties": { + "user_id": { + "anyOf": [ + { + "maxLength": 512, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "An external identifier for the user who is associated with the request.\n\nThis should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.", + "examples": [ + "13803d75-b4b5-4c3e-b2a2-6f21399b021b" + ], + "title": "User Id" + } + }, + "title": "Metadata", + "type": "object" + }, + "ModelCapabilities": { + "properties": { + "batch": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model supports the Batch API." + }, + "citations": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model supports citation generation." + }, + "code_execution": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model supports code execution tools." + }, + "context_management": { + "$ref": "#/components/schemas/ContextManagementCapability", + "description": "Context management support and available strategies." + }, + "effort": { + "$ref": "#/components/schemas/EffortCapability", + "description": "Effort (reasoning_effort) support and available levels." + }, + "image_input": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model accepts image content blocks." + }, + "pdf_input": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model accepts PDF content blocks." + }, + "structured_outputs": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model supports structured output / JSON mode / strict tool schemas." + }, + "thinking": { + "$ref": "#/components/schemas/ThinkingCapability", + "description": "Thinking capability and supported type configurations." + } + }, + "type": "object", + "required": [ + "batch", + "citations", + "code_execution", + "context_management", + "effort", + "image_input", + "pdf_input", + "structured_outputs", + "thinking" + ], + "title": "ModelCapabilities", + "description": "Model capability information." + }, + "ModelInfo": { + "properties": { + "capabilities": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModelCapabilities" + }, + { + "type": "null" + } + ], + "description": "Object mapping capability names to their support details. Keys are always present for all known capabilities." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At", + "description": "RFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown.", + "examples": [ + "2026-02-04T00:00:00Z" + ] + }, + "display_name": { + "type": "string", + "title": "Display Name", + "description": "A human-readable name for the model.", + "examples": [ + "Claude Opus 4.6" + ] + }, + "id": { + "type": "string", + "title": "Id", + "description": "Unique model identifier.", + "examples": [ + "claude-opus-4-6" + ] + }, + "max_input_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Input Tokens", + "description": "Maximum input context window size in tokens for this model." + }, + "max_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Tokens", + "description": "Maximum value for the `max_tokens` parameter when using this model." + }, + "type": { + "type": "string", + "const": "model", + "title": "Type", + "description": "Object type.\n\nFor Models, this is always `\"model\"`.", + "default": "model" + } + }, + "type": "object", + "required": [ + "capabilities", + "created_at", + "display_name", + "id", + "max_input_tokens", + "max_tokens", + "type" + ], + "title": "ModelInfo" + }, + "NotFoundError": { + "properties": { + "message": { + "default": "Not found", + "title": "Message", + "type": "string" + }, + "type": { + "const": "not_found_error", + "default": "not_found_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "NotFoundError", + "type": "object" + }, + "OutputConfig": { + "additionalProperties": false, + "properties": { + "effort": { + "anyOf": [ + { + "$ref": "#/components/schemas/EffortLevel" + }, + { + "type": "null" + } + ], + "description": "How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer.\n\nValid values are `low`, `medium`, `high`, `xhigh`, or `max`." + }, + "format": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonOutputFormat" + }, + { + "type": "null" + } + ], + "description": "A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)" + } + }, + "title": "OutputConfig", + "type": "object" + }, + "OverloadedError": { + "properties": { + "message": { + "default": "Overloaded", + "title": "Message", + "type": "string" + }, + "type": { + "const": "overloaded_error", + "default": "overloaded_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "OverloadedError", + "type": "object" + }, + "PermissionError": { + "properties": { + "message": { + "default": "Permission denied", + "title": "Message", + "type": "string" + }, + "type": { + "const": "permission_error", + "default": "permission_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "PermissionError", + "type": "object" + }, + "PlainTextSource": { + "additionalProperties": false, + "properties": { + "data": { + "title": "Data", + "type": "string" + }, + "media_type": { + "const": "text/plain", + "title": "Media Type", + "type": "string" + }, + "type": { + "const": "text", + "title": "Type", + "type": "string" + } + }, + "required": [ + "data", + "media_type", + "type" + ], + "title": "PlainTextSource", + "type": "object" + }, + "RateLimitError": { + "properties": { + "message": { + "default": "Rate limited", + "title": "Message", + "type": "string" + }, + "type": { + "const": "rate_limit_error", + "default": "rate_limit_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "RateLimitError", + "type": "object" + }, + "RefusalStopDetails": { + "description": "Structured information about a refusal.", + "properties": { + "category": { + "anyOf": [ + { + "enum": [ + "cyber", + "bio" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The policy category that triggered the refusal.\n\n`null` when the refusal doesn't map to a named category.", + "title": "Category" + }, + "explanation": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Human-readable explanation of the refusal.\n\nThis text is not guaranteed to be stable. `null` when no explanation is available for the category.", + "title": "Explanation" + }, + "type": { + "const": "refusal", + "default": "refusal", + "title": "Type", + "type": "string" + } + }, + "required": [ + "category", + "explanation", + "type" + ], + "title": "RefusalStopDetails", + "type": "object" + }, + "RequestBashCodeExecutionOutputBlock": { + "additionalProperties": false, + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "bash_code_execution_output", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "RequestBashCodeExecutionOutputBlock", + "type": "object" + }, + "RequestBashCodeExecutionResultBlock": { + "additionalProperties": false, + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/RequestBashCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "stdout": { + "title": "Stdout", + "type": "string" + }, + "type": { + "const": "bash_code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "return_code", + "stderr", + "stdout", + "type" + ], + "title": "RequestBashCodeExecutionResultBlock", + "type": "object" + }, + "RequestBashCodeExecutionToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestBashCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/RequestBashCodeExecutionResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "bash_code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestBashCodeExecutionToolResultBlock", + "type": "object" + }, + "RequestBashCodeExecutionToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/BashCodeExecutionToolResultErrorCode" + }, + "type": { + "const": "bash_code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestBashCodeExecutionToolResultError", + "type": "object" + }, + "RequestCharLocationCitation": { + "additionalProperties": false, + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_char_index": { + "title": "End Char Index", + "type": "integer" + }, + "start_char_index": { + "minimum": 0, + "title": "Start Char Index", + "type": "integer" + }, + "type": { + "const": "char_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_char_index", + "start_char_index", + "type" + ], + "title": "RequestCharLocationCitation", + "type": "object" + }, + "RequestCitationsConfig": { + "additionalProperties": false, + "properties": { + "enabled": { + "title": "Enabled", + "type": "boolean" + } + }, + "title": "RequestCitationsConfig", + "type": "object" + }, + "RequestCodeExecutionOutputBlock": { + "additionalProperties": false, + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "code_execution_output", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "RequestCodeExecutionOutputBlock", + "type": "object" + }, + "RequestCodeExecutionResultBlock": { + "additionalProperties": false, + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/RequestCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "stdout": { + "title": "Stdout", + "type": "string" + }, + "type": { + "const": "code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "return_code", + "stderr", + "stdout", + "type" + ], + "title": "RequestCodeExecutionResultBlock", + "type": "object" + }, + "RequestCodeExecutionToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/RequestCodeExecutionResultBlock" + }, + { + "$ref": "#/components/schemas/RequestEncryptedCodeExecutionResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestCodeExecutionToolResultBlock", + "type": "object" + }, + "RequestCodeExecutionToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/CodeExecutionToolResultErrorCode" + }, + "type": { + "const": "code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestCodeExecutionToolResultError", + "type": "object" + }, + "RequestContainerUploadBlock": { + "additionalProperties": false, + "description": "A content block that represents a file to be uploaded to the container\nFiles uploaded via this block will be available in the container's input directory.", + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "container_upload", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "RequestContainerUploadBlock", + "type": "object" + }, + "RequestContentBlockLocationCitation": { + "additionalProperties": false, + "properties": { + "cited_text": { + "description": "The full text of the cited block range, concatenated.\n\nAlways equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.", + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_block_index": { + "description": "Exclusive 0-based end index of the cited block range in the source's `content` array.\n\nAlways greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.", + "title": "End Block Index", + "type": "integer" + }, + "start_block_index": { + "description": "0-based index of the first cited block in the source's `content` array.", + "minimum": 0, + "title": "Start Block Index", + "type": "integer" + }, + "type": { + "const": "content_block_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_block_index", + "start_block_index", + "type" + ], + "title": "RequestContentBlockLocationCitation", + "type": "object" + }, + "RequestCounts": { + "properties": { + "canceled": { + "type": "integer", + "title": "Canceled", + "description": "Number of requests in the Message Batch that have been canceled.\n\nThis is zero until processing of the entire Message Batch has ended.", + "default": 0, + "examples": [ + 10 + ] + }, + "errored": { + "type": "integer", + "title": "Errored", + "description": "Number of requests in the Message Batch that encountered an error.\n\nThis is zero until processing of the entire Message Batch has ended.", + "default": 0, + "examples": [ + 30 + ] + }, + "expired": { + "type": "integer", + "title": "Expired", + "description": "Number of requests in the Message Batch that have expired.\n\nThis is zero until processing of the entire Message Batch has ended.", + "default": 0, + "examples": [ + 10 + ] + }, + "processing": { + "type": "integer", + "title": "Processing", + "description": "Number of requests in the Message Batch that are processing.", + "default": 0, + "examples": [ + 100 + ] + }, + "succeeded": { + "type": "integer", + "title": "Succeeded", + "description": "Number of requests in the Message Batch that have completed successfully.\n\nThis is zero until processing of the entire Message Batch has ended.", + "default": 0, + "examples": [ + 50 + ] + } + }, + "type": "object", + "required": [ + "canceled", + "errored", + "expired", + "processing", + "succeeded" + ], + "title": "RequestCounts" + }, + "RequestDocumentBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestCitationsConfig" + }, + { + "type": "null" + } + ] + }, + "context": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Context" + }, + "source": { + "discriminator": { + "mapping": { + "base64": "#/components/schemas/Base64PDFSource", + "content": "#/components/schemas/ContentBlockSource", + "text": "#/components/schemas/PlainTextSource", + "url": "#/components/schemas/URLPDFSource" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/Base64PDFSource" + }, + { + "$ref": "#/components/schemas/PlainTextSource" + }, + { + "$ref": "#/components/schemas/ContentBlockSource" + }, + { + "$ref": "#/components/schemas/URLPDFSource" + } + ], + "title": "Source" + }, + "title": { + "anyOf": [ + { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "const": "document", + "title": "Type", + "type": "string" + } + }, + "required": [ + "source", + "type" + ], + "title": "RequestDocumentBlock", + "type": "object" + }, + "RequestEncryptedCodeExecutionResultBlock": { + "additionalProperties": false, + "description": "Code execution result with encrypted stdout for PFC + web_search results.", + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/RequestCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "encrypted_stdout": { + "title": "Encrypted Stdout", + "type": "string" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "type": { + "const": "encrypted_code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "encrypted_stdout", + "return_code", + "stderr", + "type" + ], + "title": "RequestEncryptedCodeExecutionResultBlock", + "type": "object" + }, + "RequestImageBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "source": { + "discriminator": { + "mapping": { + "base64": "#/components/schemas/Base64ImageSource", + "url": "#/components/schemas/URLImageSource" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/Base64ImageSource" + }, + { + "$ref": "#/components/schemas/URLImageSource" + } + ], + "title": "Source" + }, + "type": { + "const": "image", + "title": "Type", + "type": "string" + } + }, + "required": [ + "source", + "type" + ], + "title": "RequestImageBlock", + "type": "object" + }, + "RequestPageLocationCitation": { + "additionalProperties": false, + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_page_number": { + "title": "End Page Number", + "type": "integer" + }, + "start_page_number": { + "minimum": 1, + "title": "Start Page Number", + "type": "integer" + }, + "type": { + "const": "page_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_page_number", + "start_page_number", + "type" + ], + "title": "RequestPageLocationCitation", + "type": "object" + }, + "RequestRedactedThinkingBlock": { + "additionalProperties": false, + "properties": { + "data": { + "title": "Data", + "type": "string" + }, + "type": { + "const": "redacted_thinking", + "title": "Type", + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "title": "RequestRedactedThinkingBlock", + "type": "object" + }, + "RequestSearchResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "$ref": "#/components/schemas/RequestCitationsConfig" + }, + "content": { + "items": { + "$ref": "#/components/schemas/RequestTextBlock" + }, + "title": "Content", + "type": "array" + }, + "source": { + "title": "Source", + "type": "string" + }, + "title": { + "title": "Title", + "type": "string" + }, + "type": { + "const": "search_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "source", + "title", + "type" + ], + "title": "RequestSearchResultBlock", + "type": "object" + }, + "RequestSearchResultLocationCitation": { + "additionalProperties": false, + "properties": { + "cited_text": { + "description": "The full text of the cited block range, concatenated.\n\nAlways equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.", + "title": "Cited Text", + "type": "string" + }, + "end_block_index": { + "description": "Exclusive 0-based end index of the cited block range in the source's `content` array.\n\nAlways greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.", + "title": "End Block Index", + "type": "integer" + }, + "search_result_index": { + "description": "0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.\n\nCounted separately from `document_index`; server-side web search results are not included in this count.", + "minimum": 0, + "title": "Search Result Index", + "type": "integer" + }, + "source": { + "title": "Source", + "type": "string" + }, + "start_block_index": { + "description": "0-based index of the first cited block in the source's `content` array.", + "minimum": 0, + "title": "Start Block Index", + "type": "integer" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "const": "search_result_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "end_block_index", + "search_result_index", + "source", + "start_block_index", + "title", + "type" + ], + "title": "RequestSearchResultLocationCitation", + "type": "object" + }, + "RequestServerToolUseBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/ServerToolCaller", + "code_execution_20260120": "#/components/schemas/ServerToolCaller_20260120", + "direct": "#/components/schemas/DirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/DirectCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Id", + "type": "string" + }, + "input": { + "additionalProperties": true, + "title": "Input", + "type": "object" + }, + "name": { + "enum": [ + "web_search", + "web_fetch", + "code_execution", + "bash_code_execution", + "text_editor_code_execution", + "tool_search_tool_regex", + "tool_search_tool_bm25" + ], + "title": "Name", + "type": "string" + }, + "type": { + "const": "server_tool_use", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "input", + "name", + "type" + ], + "title": "RequestServerToolUseBlock", + "type": "object" + }, + "RequestTextBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [ + { + "items": { + "discriminator": { + "mapping": { + "char_location": "#/components/schemas/RequestCharLocationCitation", + "content_block_location": "#/components/schemas/RequestContentBlockLocationCitation", + "page_location": "#/components/schemas/RequestPageLocationCitation", + "search_result_location": "#/components/schemas/RequestSearchResultLocationCitation", + "web_search_result_location": "#/components/schemas/RequestWebSearchResultLocationCitation" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/RequestCharLocationCitation" + }, + { + "$ref": "#/components/schemas/RequestPageLocationCitation" + }, + { + "$ref": "#/components/schemas/RequestContentBlockLocationCitation" + }, + { + "$ref": "#/components/schemas/RequestWebSearchResultLocationCitation" + }, + { + "$ref": "#/components/schemas/RequestSearchResultLocationCitation" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Citations" + }, + "text": { + "minLength": 1, + "title": "Text", + "type": "string" + }, + "type": { + "const": "text", + "title": "Type", + "type": "string" + } + }, + "required": [ + "text", + "type" + ], + "title": "RequestTextBlock", + "type": "object" + }, + "RequestTextEditorCodeExecutionCreateResultBlock": { + "additionalProperties": false, + "properties": { + "is_file_update": { + "title": "Is File Update", + "type": "boolean" + }, + "type": { + "const": "text_editor_code_execution_create_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "is_file_update", + "type" + ], + "title": "RequestTextEditorCodeExecutionCreateResultBlock", + "type": "object" + }, + "RequestTextEditorCodeExecutionStrReplaceResultBlock": { + "additionalProperties": false, + "properties": { + "lines": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Lines" + }, + "new_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "New Lines" + }, + "new_start": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "New Start" + }, + "old_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Old Lines" + }, + "old_start": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Old Start" + }, + "type": { + "const": "text_editor_code_execution_str_replace_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "RequestTextEditorCodeExecutionStrReplaceResultBlock", + "type": "object" + }, + "RequestTextEditorCodeExecutionToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestTextEditorCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/RequestTextEditorCodeExecutionViewResultBlock" + }, + { + "$ref": "#/components/schemas/RequestTextEditorCodeExecutionCreateResultBlock" + }, + { + "$ref": "#/components/schemas/RequestTextEditorCodeExecutionStrReplaceResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "text_editor_code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestTextEditorCodeExecutionToolResultBlock", + "type": "object" + }, + "RequestTextEditorCodeExecutionToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/TextEditorCodeExecutionToolResultErrorCode" + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Message" + }, + "type": { + "const": "text_editor_code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestTextEditorCodeExecutionToolResultError", + "type": "object" + }, + "RequestTextEditorCodeExecutionViewResultBlock": { + "additionalProperties": false, + "properties": { + "content": { + "title": "Content", + "type": "string" + }, + "file_type": { + "enum": [ + "text", + "image", + "pdf" + ], + "title": "File Type", + "type": "string" + }, + "num_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Num Lines" + }, + "start_line": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Start Line" + }, + "total_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Total Lines" + }, + "type": { + "const": "text_editor_code_execution_view_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "file_type", + "type" + ], + "title": "RequestTextEditorCodeExecutionViewResultBlock", + "type": "object" + }, + "RequestThinkingBlock": { + "additionalProperties": false, + "properties": { + "signature": { + "title": "Signature", + "type": "string" + }, + "thinking": { + "title": "Thinking", + "type": "string" + }, + "type": { + "const": "thinking", + "title": "Type", + "type": "string" + } + }, + "required": [ + "signature", + "thinking", + "type" + ], + "title": "RequestThinkingBlock", + "type": "object" + }, + "RequestToolReferenceBlock": { + "additionalProperties": false, + "description": "Tool reference block that can be included in tool_result content.", + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "tool_name": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]{1,256}$", + "title": "Tool Name", + "type": "string" + }, + "type": { + "const": "tool_reference", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_name", + "type" + ], + "title": "RequestToolReferenceBlock", + "type": "object" + }, + "RequestToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "type": "string", + "x-stainless-skip": [ + "go", + "cli" + ] + }, + { + "items": { + "discriminator": { + "mapping": { + "document": "#/components/schemas/RequestDocumentBlock", + "image": "#/components/schemas/RequestImageBlock", + "search_result": "#/components/schemas/RequestSearchResultBlock", + "text": "#/components/schemas/RequestTextBlock", + "tool_reference": "#/components/schemas/RequestToolReferenceBlock" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/RequestTextBlock" + }, + { + "$ref": "#/components/schemas/RequestImageBlock" + }, + { + "$ref": "#/components/schemas/RequestSearchResultBlock" + }, + { + "$ref": "#/components/schemas/RequestDocumentBlock" + }, + { + "$ref": "#/components/schemas/RequestToolReferenceBlock" + } + ], + "title": "Block" + }, + "type": "array", + "x-stainless-naming": { + "python": { + "type_name": "Content" + }, + "ruby": { + "type_name": "Content" + }, + "php": { + "type_name": "Content" + } + } + } + ], + "title": "Content" + }, + "is_error": { + "title": "Is Error", + "type": "boolean" + }, + "tool_use_id": { + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_use_id", + "type" + ], + "title": "RequestToolResultBlock", + "type": "object" + }, + "RequestToolSearchToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestToolSearchToolResultError" + }, + { + "$ref": "#/components/schemas/RequestToolSearchToolSearchResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "tool_search_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestToolSearchToolResultBlock", + "type": "object" + }, + "RequestToolSearchToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/ToolSearchToolResultErrorCode" + }, + "type": { + "const": "tool_search_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestToolSearchToolResultError", + "type": "object" + }, + "RequestToolSearchToolSearchResultBlock": { + "additionalProperties": false, + "properties": { + "tool_references": { + "items": { + "$ref": "#/components/schemas/RequestToolReferenceBlock" + }, + "title": "Tool References", + "type": "array" + }, + "type": { + "const": "tool_search_tool_search_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_references", + "type" + ], + "title": "RequestToolSearchToolSearchResultBlock", + "type": "object" + }, + "RequestToolUseBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/ServerToolCaller", + "code_execution_20260120": "#/components/schemas/ServerToolCaller_20260120", + "direct": "#/components/schemas/DirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/DirectCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "id": { + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Id", + "type": "string" + }, + "input": { + "additionalProperties": true, + "title": "Input", + "type": "object" + }, + "name": { + "maxLength": 200, + "minLength": 1, + "title": "Name", + "type": "string" + }, + "type": { + "const": "tool_use", + "title": "Type", + "type": "string" + } + }, + "required": [ + "id", + "input", + "name", + "type" + ], + "title": "RequestToolUseBlock", + "type": "object" + }, + "RequestWebFetchResultBlock": { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/components/schemas/RequestDocumentBlock" + }, + "retrieved_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "ISO 8601 timestamp when the content was retrieved", + "title": "Retrieved At" + }, + "type": { + "const": "web_fetch_result", + "title": "Type", + "type": "string" + }, + "url": { + "description": "Fetched content URL", + "title": "Url", + "type": "string" + } + }, + "required": [ + "content", + "type", + "url" + ], + "title": "RequestWebFetchResultBlock", + "type": "object" + }, + "RequestWebFetchToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/ServerToolCaller", + "code_execution_20260120": "#/components/schemas/ServerToolCaller_20260120", + "direct": "#/components/schemas/DirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/DirectCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestWebFetchToolResultError" + }, + { + "$ref": "#/components/schemas/RequestWebFetchResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "web_fetch_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestWebFetchToolResultBlock", + "type": "object" + }, + "RequestWebFetchToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/WebFetchToolResultErrorCode" + }, + "type": { + "const": "web_fetch_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestWebFetchToolResultError", + "type": "object" + }, + "RequestWebSearchResultBlock": { + "additionalProperties": false, + "properties": { + "encrypted_content": { + "title": "Encrypted Content", + "type": "string" + }, + "page_age": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Page Age" + }, + "title": { + "title": "Title", + "type": "string" + }, + "type": { + "const": "web_search_result", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "encrypted_content", + "title", + "type", + "url" + ], + "title": "RequestWebSearchResultBlock", + "type": "object" + }, + "RequestWebSearchResultLocationCitation": { + "additionalProperties": false, + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "encrypted_index": { + "title": "Encrypted Index", + "type": "string" + }, + "title": { + "anyOf": [ + { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "const": "web_search_result_location", + "title": "Type", + "type": "string" + }, + "url": { + "maxLength": 2048, + "minLength": 1, + "title": "Url", + "type": "string" + } + }, + "required": [ + "cited_text", + "encrypted_index", + "title", + "type", + "url" + ], + "title": "RequestWebSearchResultLocationCitation", + "type": "object" + }, + "RequestWebSearchToolResultBlock": { + "additionalProperties": false, + "properties": { + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "caller": { + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/ServerToolCaller", + "code_execution_20260120": "#/components/schemas/ServerToolCaller_20260120", + "direct": "#/components/schemas/DirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/DirectCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "content": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/RequestWebSearchResultBlock" + }, + "type": "array", + "title": "web_search_tool_result_block_item" + }, + { + "$ref": "#/components/schemas/RequestWebSearchToolResultError", + "x-stainless-naming": { + "go": { + "variant_constructor": "NewWebSearchToolRequestError" + } + } + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "web_search_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "RequestWebSearchToolResultBlock", + "type": "object" + }, + "RequestWebSearchToolResultError": { + "additionalProperties": false, + "properties": { + "error_code": { + "$ref": "#/components/schemas/WebSearchToolResultErrorCode" + }, + "type": { + "const": "web_search_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "RequestWebSearchToolResultError", + "type": "object" + }, + "ResponseBashCodeExecutionOutputBlock": { + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "bash_code_execution_output", + "default": "bash_code_execution_output", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "ResponseBashCodeExecutionOutputBlock", + "type": "object" + }, + "ResponseBashCodeExecutionResultBlock": { + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/ResponseBashCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "stdout": { + "title": "Stdout", + "type": "string" + }, + "type": { + "const": "bash_code_execution_result", + "default": "bash_code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "return_code", + "stderr", + "stdout", + "type" + ], + "title": "ResponseBashCodeExecutionResultBlock", + "type": "object" + }, + "ResponseBashCodeExecutionToolResultBlock": { + "properties": { + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResponseBashCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/ResponseBashCodeExecutionResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "bash_code_execution_tool_result", + "default": "bash_code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseBashCodeExecutionToolResultBlock", + "type": "object" + }, + "ResponseBashCodeExecutionToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/BashCodeExecutionToolResultErrorCode" + }, + "type": { + "const": "bash_code_execution_tool_result_error", + "default": "bash_code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "ResponseBashCodeExecutionToolResultError", + "type": "object" + }, + "ResponseCharLocationCitation": { + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_char_index": { + "title": "End Char Index", + "type": "integer" + }, + "file_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "File Id" + }, + "start_char_index": { + "minimum": 0, + "title": "Start Char Index", + "type": "integer" + }, + "type": { + "const": "char_location", + "default": "char_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_char_index", + "file_id", + "start_char_index", + "type" + ], + "title": "ResponseCharLocationCitation", + "type": "object" + }, + "ResponseCitationsConfig": { + "properties": { + "enabled": { + "default": false, + "title": "Enabled", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "ResponseCitationsConfig", + "type": "object" + }, + "ResponseCodeExecutionOutputBlock": { + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "code_execution_output", + "default": "code_execution_output", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "ResponseCodeExecutionOutputBlock", + "type": "object" + }, + "ResponseCodeExecutionResultBlock": { + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/ResponseCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "stdout": { + "title": "Stdout", + "type": "string" + }, + "type": { + "const": "code_execution_result", + "default": "code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "return_code", + "stderr", + "stdout", + "type" + ], + "title": "ResponseCodeExecutionResultBlock", + "type": "object" + }, + "ResponseCodeExecutionToolResultBlock": { + "properties": { + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResponseCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/ResponseCodeExecutionResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseEncryptedCodeExecutionResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "code_execution_tool_result", + "default": "code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseCodeExecutionToolResultBlock", + "type": "object" + }, + "ResponseCodeExecutionToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/CodeExecutionToolResultErrorCode" + }, + "type": { + "const": "code_execution_tool_result_error", + "default": "code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "ResponseCodeExecutionToolResultError", + "type": "object" + }, + "ResponseContainerUploadBlock": { + "description": "Response model for a file uploaded to the container.", + "properties": { + "file_id": { + "title": "File Id", + "type": "string" + }, + "type": { + "const": "container_upload", + "default": "container_upload", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "type" + ], + "title": "ResponseContainerUploadBlock", + "type": "object" + }, + "ResponseContentBlockLocationCitation": { + "properties": { + "cited_text": { + "description": "The full text of the cited block range, concatenated.\n\nAlways equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.", + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_block_index": { + "description": "Exclusive 0-based end index of the cited block range in the source's `content` array.\n\nAlways greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.", + "title": "End Block Index", + "type": "integer" + }, + "file_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "File Id" + }, + "start_block_index": { + "description": "0-based index of the first cited block in the source's `content` array.", + "minimum": 0, + "title": "Start Block Index", + "type": "integer" + }, + "type": { + "const": "content_block_location", + "default": "content_block_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_block_index", + "file_id", + "start_block_index", + "type" + ], + "title": "ResponseContentBlockLocationCitation", + "type": "object" + }, + "ResponseDocumentBlock": { + "properties": { + "citations": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResponseCitationsConfig" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Citation configuration for the document" + }, + "source": { + "discriminator": { + "mapping": { + "base64": "#/components/schemas/Base64PDFSource", + "text": "#/components/schemas/PlainTextSource" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/Base64PDFSource" + }, + { + "$ref": "#/components/schemas/PlainTextSource" + } + ], + "title": "Source" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The title of the document", + "title": "Title" + }, + "type": { + "const": "document", + "default": "document", + "title": "Type", + "type": "string" + } + }, + "required": [ + "citations", + "source", + "title", + "type" + ], + "title": "ResponseDocumentBlock", + "type": "object" + }, + "ResponseEncryptedCodeExecutionResultBlock": { + "description": "Code execution result with encrypted stdout for PFC + web_search results.", + "properties": { + "content": { + "items": { + "$ref": "#/components/schemas/ResponseCodeExecutionOutputBlock" + }, + "title": "Content", + "type": "array" + }, + "encrypted_stdout": { + "title": "Encrypted Stdout", + "type": "string" + }, + "return_code": { + "title": "Return Code", + "type": "integer" + }, + "stderr": { + "title": "Stderr", + "type": "string" + }, + "type": { + "const": "encrypted_code_execution_result", + "default": "encrypted_code_execution_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "encrypted_stdout", + "return_code", + "stderr", + "type" + ], + "title": "ResponseEncryptedCodeExecutionResultBlock", + "type": "object" + }, + "ResponsePageLocationCitation": { + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "document_index": { + "minimum": 0, + "title": "Document Index", + "type": "integer" + }, + "document_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document Title" + }, + "end_page_number": { + "title": "End Page Number", + "type": "integer" + }, + "file_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "File Id" + }, + "start_page_number": { + "minimum": 1, + "title": "Start Page Number", + "type": "integer" + }, + "type": { + "const": "page_location", + "default": "page_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "document_index", + "document_title", + "end_page_number", + "file_id", + "start_page_number", + "type" + ], + "title": "ResponsePageLocationCitation", + "type": "object" + }, + "ResponseRedactedThinkingBlock": { + "properties": { + "data": { + "title": "Data", + "type": "string" + }, + "type": { + "const": "redacted_thinking", + "default": "redacted_thinking", + "title": "Type", + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "title": "ResponseRedactedThinkingBlock", + "type": "object" + }, + "ResponseSearchResultLocationCitation": { + "properties": { + "cited_text": { + "description": "The full text of the cited block range, concatenated.\n\nAlways equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.", + "title": "Cited Text", + "type": "string" + }, + "end_block_index": { + "description": "Exclusive 0-based end index of the cited block range in the source's `content` array.\n\nAlways greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.", + "title": "End Block Index", + "type": "integer" + }, + "search_result_index": { + "description": "0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.\n\nCounted separately from `document_index`; server-side web search results are not included in this count.", + "minimum": 0, + "title": "Search Result Index", + "type": "integer" + }, + "source": { + "title": "Source", + "type": "string" + }, + "start_block_index": { + "description": "0-based index of the first cited block in the source's `content` array.", + "minimum": 0, + "title": "Start Block Index", + "type": "integer" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "const": "search_result_location", + "default": "search_result_location", + "title": "Type", + "type": "string" + } + }, + "required": [ + "cited_text", + "end_block_index", + "search_result_index", + "source", + "start_block_index", + "title", + "type" + ], + "title": "ResponseSearchResultLocationCitation", + "type": "object" + }, + "ResponseServerToolUseBlock": { + "properties": { + "caller": { + "default": { + "type": "direct" + }, + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/ServerToolCaller", + "code_execution_20260120": "#/components/schemas/ServerToolCaller_20260120", + "direct": "#/components/schemas/DirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/DirectCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Id", + "type": "string" + }, + "input": { + "additionalProperties": true, + "title": "Input", + "type": "object" + }, + "name": { + "enum": [ + "web_search", + "web_fetch", + "code_execution", + "bash_code_execution", + "text_editor_code_execution", + "tool_search_tool_regex", + "tool_search_tool_bm25" + ], + "title": "Name", + "type": "string" + }, + "type": { + "const": "server_tool_use", + "default": "server_tool_use", + "title": "Type", + "type": "string" + } + }, + "required": [ + "caller", + "id", + "input", + "name", + "type" + ], + "title": "ResponseServerToolUseBlock", + "type": "object" + }, + "ResponseTextBlock": { + "properties": { + "citations": { + "anyOf": [ + { + "items": { + "discriminator": { + "mapping": { + "char_location": "#/components/schemas/ResponseCharLocationCitation", + "content_block_location": "#/components/schemas/ResponseContentBlockLocationCitation", + "page_location": "#/components/schemas/ResponsePageLocationCitation", + "search_result_location": "#/components/schemas/ResponseSearchResultLocationCitation", + "web_search_result_location": "#/components/schemas/ResponseWebSearchResultLocationCitation" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ResponseCharLocationCitation" + }, + { + "$ref": "#/components/schemas/ResponsePageLocationCitation" + }, + { + "$ref": "#/components/schemas/ResponseContentBlockLocationCitation" + }, + { + "$ref": "#/components/schemas/ResponseWebSearchResultLocationCitation" + }, + { + "$ref": "#/components/schemas/ResponseSearchResultLocationCitation" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Citations supporting the text block.\n\nThe type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.", + "title": "Citations" + }, + "text": { + "maxLength": 5000000, + "minLength": 0, + "title": "Text", + "type": "string" + }, + "type": { + "const": "text", + "default": "text", + "title": "Type", + "type": "string" + } + }, + "required": [ + "citations", + "text", + "type" + ], + "title": "ResponseTextBlock", + "type": "object" + }, + "ResponseTextEditorCodeExecutionCreateResultBlock": { + "properties": { + "is_file_update": { + "title": "Is File Update", + "type": "boolean" + }, + "type": { + "const": "text_editor_code_execution_create_result", + "default": "text_editor_code_execution_create_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "is_file_update", + "type" + ], + "title": "ResponseTextEditorCodeExecutionCreateResultBlock", + "type": "object" + }, + "ResponseTextEditorCodeExecutionStrReplaceResultBlock": { + "properties": { + "lines": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Lines" + }, + "new_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "New Lines" + }, + "new_start": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "New Start" + }, + "old_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Old Lines" + }, + "old_start": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Old Start" + }, + "type": { + "const": "text_editor_code_execution_str_replace_result", + "default": "text_editor_code_execution_str_replace_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "lines", + "new_lines", + "new_start", + "old_lines", + "old_start", + "type" + ], + "title": "ResponseTextEditorCodeExecutionStrReplaceResultBlock", + "type": "object" + }, + "ResponseTextEditorCodeExecutionToolResultBlock": { + "properties": { + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResponseTextEditorCodeExecutionToolResultError" + }, + { + "$ref": "#/components/schemas/ResponseTextEditorCodeExecutionViewResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseTextEditorCodeExecutionCreateResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseTextEditorCodeExecutionStrReplaceResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "text_editor_code_execution_tool_result", + "default": "text_editor_code_execution_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseTextEditorCodeExecutionToolResultBlock", + "type": "object" + }, + "ResponseTextEditorCodeExecutionToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/TextEditorCodeExecutionToolResultErrorCode" + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Error Message" + }, + "type": { + "const": "text_editor_code_execution_tool_result_error", + "default": "text_editor_code_execution_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "error_message", + "type" + ], + "title": "ResponseTextEditorCodeExecutionToolResultError", + "type": "object" + }, + "ResponseTextEditorCodeExecutionViewResultBlock": { + "properties": { + "content": { + "title": "Content", + "type": "string" + }, + "file_type": { + "enum": [ + "text", + "image", + "pdf" + ], + "title": "File Type", + "type": "string" + }, + "num_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Num Lines" + }, + "start_line": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Start Line" + }, + "total_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Total Lines" + }, + "type": { + "const": "text_editor_code_execution_view_result", + "default": "text_editor_code_execution_view_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "file_type", + "num_lines", + "start_line", + "total_lines", + "type" + ], + "title": "ResponseTextEditorCodeExecutionViewResultBlock", + "type": "object" + }, + "ResponseThinkingBlock": { + "properties": { + "signature": { + "title": "Signature", + "type": "string" + }, + "thinking": { + "title": "Thinking", + "type": "string" + }, + "type": { + "const": "thinking", + "default": "thinking", + "title": "Type", + "type": "string" + } + }, + "required": [ + "signature", + "thinking", + "type" + ], + "title": "ResponseThinkingBlock", + "type": "object" + }, + "ResponseToolReferenceBlock": { + "properties": { + "tool_name": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]{1,256}$", + "title": "Tool Name", + "type": "string" + }, + "type": { + "const": "tool_reference", + "default": "tool_reference", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_name", + "type" + ], + "title": "ResponseToolReferenceBlock", + "type": "object" + }, + "ResponseToolSearchToolResultBlock": { + "properties": { + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResponseToolSearchToolResultError" + }, + { + "$ref": "#/components/schemas/ResponseToolSearchToolSearchResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "tool_search_tool_result", + "default": "tool_search_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "content", + "tool_use_id", + "type" + ], + "title": "ResponseToolSearchToolResultBlock", + "type": "object" + }, + "ResponseToolSearchToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/ToolSearchToolResultErrorCode" + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Error Message" + }, + "type": { + "const": "tool_search_tool_result_error", + "default": "tool_search_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "error_message", + "type" + ], + "title": "ResponseToolSearchToolResultError", + "type": "object" + }, + "ResponseToolSearchToolSearchResultBlock": { + "properties": { + "tool_references": { + "items": { + "$ref": "#/components/schemas/ResponseToolReferenceBlock" + }, + "title": "Tool References", + "type": "array" + }, + "type": { + "const": "tool_search_tool_search_result", + "default": "tool_search_tool_search_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_references", + "type" + ], + "title": "ResponseToolSearchToolSearchResultBlock", + "type": "object" + }, + "ResponseToolUseBlock": { + "properties": { + "caller": { + "default": { + "type": "direct" + }, + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/ServerToolCaller", + "code_execution_20260120": "#/components/schemas/ServerToolCaller_20260120", + "direct": "#/components/schemas/DirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/DirectCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "id": { + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Id", + "type": "string" + }, + "input": { + "additionalProperties": true, + "title": "Input", + "type": "object" + }, + "name": { + "minLength": 1, + "title": "Name", + "type": "string" + }, + "type": { + "const": "tool_use", + "default": "tool_use", + "title": "Type", + "type": "string" + } + }, + "required": [ + "caller", + "id", + "input", + "name", + "type" + ], + "title": "ResponseToolUseBlock", + "type": "object" + }, + "ResponseWebFetchResultBlock": { + "properties": { + "content": { + "$ref": "#/components/schemas/ResponseDocumentBlock" + }, + "retrieved_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ISO 8601 timestamp when the content was retrieved", + "title": "Retrieved At" + }, + "type": { + "const": "web_fetch_result", + "default": "web_fetch_result", + "title": "Type", + "type": "string" + }, + "url": { + "description": "Fetched content URL", + "title": "Url", + "type": "string" + } + }, + "required": [ + "content", + "retrieved_at", + "type", + "url" + ], + "title": "ResponseWebFetchResultBlock", + "type": "object" + }, + "ResponseWebFetchToolResultBlock": { + "properties": { + "caller": { + "default": { + "type": "direct" + }, + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/ServerToolCaller", + "code_execution_20260120": "#/components/schemas/ServerToolCaller_20260120", + "direct": "#/components/schemas/DirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/DirectCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResponseWebFetchToolResultError" + }, + { + "$ref": "#/components/schemas/ResponseWebFetchResultBlock" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "web_fetch_tool_result", + "default": "web_fetch_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "caller", + "content", + "tool_use_id", + "type" + ], + "title": "ResponseWebFetchToolResultBlock", + "type": "object" + }, + "ResponseWebFetchToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/WebFetchToolResultErrorCode" + }, + "type": { + "const": "web_fetch_tool_result_error", + "default": "web_fetch_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "ResponseWebFetchToolResultError", + "type": "object" + }, + "ResponseWebSearchResultBlock": { + "properties": { + "encrypted_content": { + "title": "Encrypted Content", + "type": "string" + }, + "page_age": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Page Age" + }, + "title": { + "title": "Title", + "type": "string" + }, + "type": { + "const": "web_search_result", + "default": "web_search_result", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "encrypted_content", + "page_age", + "title", + "type", + "url" + ], + "title": "ResponseWebSearchResultBlock", + "type": "object" + }, + "ResponseWebSearchResultLocationCitation": { + "properties": { + "cited_text": { + "title": "Cited Text", + "type": "string" + }, + "encrypted_index": { + "title": "Encrypted Index", + "type": "string" + }, + "title": { + "anyOf": [ + { + "maxLength": 512, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "const": "web_search_result_location", + "default": "web_search_result_location", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "cited_text", + "encrypted_index", + "title", + "type", + "url" + ], + "title": "ResponseWebSearchResultLocationCitation", + "type": "object" + }, + "ResponseWebSearchToolResultBlock": { + "properties": { + "caller": { + "default": { + "type": "direct" + }, + "discriminator": { + "mapping": { + "code_execution_20250825": "#/components/schemas/ServerToolCaller", + "code_execution_20260120": "#/components/schemas/ServerToolCaller_20260120", + "direct": "#/components/schemas/DirectCaller" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/DirectCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller" + }, + { + "$ref": "#/components/schemas/ServerToolCaller_20260120" + } + ], + "title": "Caller" + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResponseWebSearchToolResultError" + }, + { + "items": { + "$ref": "#/components/schemas/ResponseWebSearchResultBlock" + }, + "type": "array" + } + ], + "title": "Content" + }, + "tool_use_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Use Id", + "type": "string" + }, + "type": { + "const": "web_search_tool_result", + "default": "web_search_tool_result", + "title": "Type", + "type": "string" + } + }, + "required": [ + "caller", + "content", + "tool_use_id", + "type" + ], + "title": "ResponseWebSearchToolResultBlock", + "type": "object" + }, + "ResponseWebSearchToolResultError": { + "properties": { + "error_code": { + "$ref": "#/components/schemas/WebSearchToolResultErrorCode" + }, + "type": { + "const": "web_search_tool_result_error", + "default": "web_search_tool_result_error", + "title": "Type", + "type": "string" + } + }, + "required": [ + "error_code", + "type" + ], + "title": "ResponseWebSearchToolResultError", + "type": "object" + }, + "ServerToolCaller": { + "additionalProperties": false, + "description": "Tool invocation generated by a server-side tool.", + "properties": { + "tool_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Id", + "type": "string" + }, + "type": { + "const": "code_execution_20250825", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_id", + "type" + ], + "title": "ServerToolCaller", + "type": "object" + }, + "ServerToolCaller_20260120": { + "additionalProperties": false, + "properties": { + "tool_id": { + "pattern": "^srvtoolu_[a-zA-Z0-9_]+$", + "title": "Tool Id", + "type": "string" + }, + "type": { + "const": "code_execution_20260120", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tool_id", + "type" + ], + "title": "ServerToolCaller_20260120", + "type": "object" + }, + "ServerToolUsage": { + "properties": { + "web_fetch_requests": { + "default": 0, + "description": "The number of web fetch tool requests.", + "examples": [ + 2 + ], + "minimum": 0, + "title": "Web Fetch Requests", + "type": "integer" + }, + "web_search_requests": { + "default": 0, + "description": "The number of web search tool requests.", + "examples": [ + 0 + ], + "minimum": 0, + "title": "Web Search Requests", + "type": "integer" + } + }, + "required": [ + "web_fetch_requests", + "web_search_requests" + ], + "title": "ServerToolUsage", + "type": "object" + }, + "SignatureContentBlockDelta": { + "properties": { + "signature": { + "title": "Signature", + "type": "string" + }, + "type": { + "const": "signature_delta", + "default": "signature_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "signature", + "type" + ], + "title": "SignatureContentBlockDelta", + "type": "object" + }, + "SucceededResult": { + "properties": { + "message": { + "$ref": "#/components/schemas/Message" + }, + "type": { + "const": "succeeded", + "default": "succeeded", + "title": "Type", + "type": "string" + } + }, + "required": [ + "message", + "type" + ], + "title": "SucceededResult", + "type": "object" + }, + "TextContentBlockDelta": { + "properties": { + "text": { + "title": "Text", + "type": "string" + }, + "type": { + "const": "text_delta", + "default": "text_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "text", + "type" + ], + "title": "TextContentBlockDelta", + "type": "object" + }, + "TextEditorCodeExecutionToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "unavailable", + "too_many_requests", + "execution_time_exceeded", + "file_not_found" + ], + "title": "TextEditorCodeExecutionToolResultErrorCode", + "type": "string" + }, + "TextEditor_20250124": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "str_replace_editor", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "text_editor_20250124", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "TextEditor_20250124", + "type": "object" + }, + "TextEditor_20250429": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "name": { + "const": "str_replace_based_edit_tool", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "text_editor_20250429", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "TextEditor_20250429", + "type": "object" + }, + "TextEditor_20250728": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + }, + "max_characters": { + "anyOf": [ + { + "minimum": 1, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.", + "title": "Max Characters" + }, + "name": { + "const": "str_replace_based_edit_tool", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "text_editor_20250728", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "TextEditor_20250728", + "type": "object" + }, + "ThinkingCapability": { + "properties": { + "supported": { + "type": "boolean", + "title": "Supported", + "description": "Whether this capability is supported by the model." + }, + "types": { + "$ref": "#/components/schemas/ThinkingTypes" + } + }, + "type": "object", + "required": [ + "supported", + "types" + ], + "title": "ThinkingCapability", + "description": "Thinking capability details." + }, + "ThinkingConfigAdaptive": { + "additionalProperties": false, + "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/components/schemas/ThinkingDisplayMode" + }, + { + "type": "null" + } + ], + "description": "Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`." + }, + "type": { + "const": "adaptive", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ThinkingConfigAdaptive", + "type": "object" + }, + "ThinkingConfigDisabled": { + "additionalProperties": false, + "properties": { + "type": { + "const": "disabled", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ThinkingConfigDisabled", + "type": "object", + "x-stainless-go-constant-constructor": true + }, + "ThinkingConfigEnabled": { + "additionalProperties": false, + "properties": { + "budget_tokens": { + "description": "Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.\n\nMust be ≥1024 and less than `max_tokens`.\n\nSee [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.", + "minimum": 1024, + "title": "Budget Tokens", + "type": "integer" + }, + "display": { + "anyOf": [ + { + "$ref": "#/components/schemas/ThinkingDisplayMode" + }, + { + "type": "null" + } + ], + "description": "Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`." + }, + "type": { + "const": "enabled", + "title": "Type", + "type": "string" + } + }, + "required": [ + "budget_tokens", + "type" + ], + "title": "ThinkingConfigEnabled", + "type": "object" + }, + "ThinkingContentBlockDelta": { + "properties": { + "thinking": { + "title": "Thinking", + "type": "string" + }, + "type": { + "const": "thinking_delta", + "default": "thinking_delta", + "title": "Type", + "type": "string" + } + }, + "required": [ + "thinking", + "type" + ], + "title": "ThinkingContentBlockDelta", + "type": "object" + }, + "ThinkingDisplayMode": { + "enum": [ + "summarized", + "omitted" + ], + "title": "ThinkingDisplayMode", + "type": "string" + }, + "ThinkingTypes": { + "properties": { + "adaptive": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model supports thinking with type 'adaptive' (auto)." + }, + "enabled": { + "$ref": "#/components/schemas/CapabilitySupport", + "description": "Whether the model supports thinking with type 'enabled'." + } + }, + "type": "object", + "required": [ + "adaptive", + "enabled" + ], + "title": "ThinkingTypes", + "description": "Supported thinking type configurations." + }, + "Tool": { + "additionalProperties": false, + "properties": { + "type": { + "anyOf": [ + { + "type": "null" + }, + { + "const": "custom", + "type": "string" + } + ], + "title": "Type" + }, + "description": { + "description": "Description of what this tool does.\n\nTool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.", + "examples": [ + "Get the current weather in a given location" + ], + "title": "Description", + "type": "string" + }, + "name": { + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "maxLength": 128, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]{1,128}$", + "title": "Name", + "type": "string" + }, + "input_schema": { + "$ref": "#/components/schemas/InputSchema", + "description": "[JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.\n\nThis defines the shape of the `input` that your tool accepts and that the model will produce.", + "examples": [ + { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string" + }, + "unit": { + "description": "Unit for the output - one of (celsius, fahrenheit)", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + ] + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "eager_input_streaming": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.", + "title": "Eager Input Streaming" + }, + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "input_examples": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + }, + "type": "object" + }, + "title": "Input Examples", + "type": "array" + } + }, + "required": [ + "name", + "input_schema" + ], + "title": "Tool", + "type": "object" + }, + "ToolChoiceAny": { + "additionalProperties": false, + "description": "The model will use any available tools.", + "properties": { + "disable_parallel_tool_use": { + "description": "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use.", + "title": "Disable Parallel Tool Use", + "type": "boolean" + }, + "type": { + "const": "any", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ToolChoiceAny", + "type": "object" + }, + "ToolChoiceAuto": { + "additionalProperties": false, + "description": "The model will automatically decide whether to use tools.", + "properties": { + "disable_parallel_tool_use": { + "description": "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output at most one tool use.", + "title": "Disable Parallel Tool Use", + "type": "boolean" + }, + "type": { + "const": "auto", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ToolChoiceAuto", + "type": "object" + }, + "ToolChoiceNone": { + "additionalProperties": false, + "description": "The model will not be allowed to use tools.", + "properties": { + "type": { + "const": "none", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ToolChoiceNone", + "type": "object", + "x-stainless-go-constant-constructor": true + }, + "ToolChoiceTool": { + "additionalProperties": false, + "description": "The model will use the specified tool with `tool_choice.name`.", + "properties": { + "disable_parallel_tool_use": { + "description": "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use.", + "title": "Disable Parallel Tool Use", + "type": "boolean" + }, + "name": { + "description": "The name of the tool to use.", + "title": "Name", + "type": "string" + }, + "type": { + "const": "tool", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "ToolChoiceTool", + "type": "object" + }, + "ToolSearchToolBM25_20251119": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "name": { + "const": "tool_search_tool_bm25", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "enum": [ + "tool_search_tool_bm25_20251119", + "tool_search_tool_bm25" + ], + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "ToolSearchToolBM25_20251119", + "type": "object" + }, + "ToolSearchToolRegex_20251119": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "name": { + "const": "tool_search_tool_regex", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "enum": [ + "tool_search_tool_regex_20251119", + "tool_search_tool_regex" + ], + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "ToolSearchToolRegex_20251119", + "type": "object" + }, + "ToolSearchToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "unavailable", + "too_many_requests", + "execution_time_exceeded" + ], + "title": "ToolSearchToolResultErrorCode", + "type": "string" + }, + "URLImageSource": { + "additionalProperties": false, + "properties": { + "type": { + "const": "url", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "title": "URLImageSource", + "type": "object" + }, + "URLPDFSource": { + "additionalProperties": false, + "properties": { + "type": { + "const": "url", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "title": "URLPDFSource", + "type": "object" + }, + "Usage": { + "properties": { + "cache_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/CacheCreation" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Breakdown of cached tokens by TTL" + }, + "cache_creation_input_tokens": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of input tokens used to create the cache entry.", + "examples": [ + 2051 + ], + "title": "Cache Creation Input Tokens" + }, + "cache_read_input_tokens": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of input tokens read from the cache.", + "examples": [ + 2051 + ], + "title": "Cache Read Input Tokens" + }, + "inference_geo": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The geographic region where inference was performed for this request.", + "title": "Inference Geo" + }, + "input_tokens": { + "description": "The number of input tokens which were used.", + "examples": [ + 2095 + ], + "minimum": 0, + "title": "Input Tokens", + "type": "integer" + }, + "output_tokens": { + "description": "The number of output tokens which were used.", + "examples": [ + 503 + ], + "minimum": 0, + "title": "Output Tokens", + "type": "integer" + }, + "server_tool_use": { + "anyOf": [ + { + "$ref": "#/components/schemas/ServerToolUsage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of server tool requests." + }, + "service_tier": { + "anyOf": [ + { + "enum": [ + "standard", + "priority", + "batch" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If the request used the priority, standard, or batch tier.", + "title": "Service Tier" + } + }, + "required": [ + "cache_creation", + "cache_creation_input_tokens", + "cache_read_input_tokens", + "inference_geo", + "input_tokens", + "output_tokens", + "server_tool_use", + "service_tier" + ], + "title": "Usage", + "type": "object" + }, + "UserLocation": { + "additionalProperties": false, + "properties": { + "city": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The city of the user.", + "examples": [ + "New York", + "Tokyo", + "Los Angeles" + ], + "title": "City" + }, + "country": { + "anyOf": [ + { + "maxLength": 2, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.", + "examples": [ + "US", + "JP", + "GB" + ], + "title": "Country" + }, + "region": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The region of the user.", + "examples": [ + "California", + "Ontario", + "Wales" + ], + "title": "Region" + }, + "timezone": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The [IANA timezone](https://nodatime.org/TimeZones) of the user.", + "examples": [ + "America/New_York", + "Asia/Tokyo", + "Europe/London" + ], + "title": "Timezone" + }, + "type": { + "const": "approximate", + "title": "Type", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "UserLocation", + "type": "object" + }, + "WebFetchToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "url_too_long", + "url_not_allowed", + "url_not_accessible", + "unsupported_content_type", + "too_many_requests", + "max_uses_exceeded", + "unavailable" + ], + "title": "WebFetchToolResultErrorCode", + "type": "string" + }, + "WebFetchTool_20250910": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to allow fetching from", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to block fetching from", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestCitationsConfig" + }, + { + "type": "null" + } + ], + "description": "Citations configuration for fetched documents. Citations are disabled by default." + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_content_tokens": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.", + "title": "Max Content Tokens" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_fetch", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "web_fetch_20250910", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "WebFetchTool_20250910", + "type": "object" + }, + "WebFetchTool_20260209": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to allow fetching from", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to block fetching from", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestCitationsConfig" + }, + { + "type": "null" + } + ], + "description": "Citations configuration for fetched documents. Citations are disabled by default." + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_content_tokens": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.", + "title": "Max Content Tokens" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_fetch", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "web_fetch_20260209", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "title": "WebFetchTool_20260209", + "type": "object" + }, + "WebFetchTool_20260309": { + "additionalProperties": false, + "description": "Web fetch tool with use_cache parameter for bypassing cached content.", + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to allow fetching from", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List of domains to block fetching from", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestCitationsConfig" + }, + { + "type": "null" + } + ], + "description": "Citations configuration for fetched documents. Citations are disabled by default." + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_content_tokens": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.", + "title": "Max Content Tokens" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_fetch", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "web_fetch_20260309", + "title": "Type", + "type": "string" + }, + "use_cache": { + "description": "Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.", + "title": "Use Cache", + "type": "boolean" + } + }, + "required": [ + "name", + "type" + ], + "title": "WebFetchTool_20260309", + "type": "object" + }, + "WebSearchToolResultErrorCode": { + "enum": [ + "invalid_tool_input", + "unavailable", + "max_uses_exceeded", + "too_many_requests", + "query_too_long", + "request_too_large" + ], + "title": "WebSearchToolResultErrorCode", + "type": "string" + }, + "WebSearchTool_20250305": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_search", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "web_search_20250305", + "title": "Type", + "type": "string" + }, + "user_location": { + "anyOf": [ + { + "$ref": "#/components/schemas/UserLocation" + }, + { + "type": "null" + } + ], + "description": "Parameters for the user's location. Used to provide more relevant search results." + } + }, + "required": [ + "name", + "type" + ], + "title": "WebSearchTool_20250305", + "type": "object" + }, + "WebSearchTool_20260209": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { + "$ref": "#/components/schemas/AllowedCaller" + }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_uses": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_search", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { + "const": "web_search_20260209", + "title": "Type", + "type": "string" + }, + "user_location": { + "anyOf": [ + { + "$ref": "#/components/schemas/UserLocation" + }, + { + "type": "null" + } + ], + "description": "Parameters for the user's location. Used to provide more relevant search results." + } + }, + "required": [ + "name", + "type" + ], + "title": "WebSearchTool_20260209", + "type": "object" + }, + "BetaManagedAgentsConflictError": { + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "conflict_error" + ] + }, + "message": { + "type": "string" + } + } + }, + "BetaManagedAgentsError": { + "discriminator": { + "propertyName": "type", + "mapping": { + "invalid_request_error": "#/components/schemas/BetaInvalidRequestError", + "authentication_error": "#/components/schemas/BetaAuthenticationError", + "billing_error": "#/components/schemas/BetaBillingError", + "permission_error": "#/components/schemas/BetaPermissionError", + "not_found_error": "#/components/schemas/BetaNotFoundError", + "rate_limit_error": "#/components/schemas/BetaRateLimitError", + "timeout_error": "#/components/schemas/BetaGatewayTimeoutError", + "api_error": "#/components/schemas/BetaAPIError", + "overloaded_error": "#/components/schemas/BetaOverloadedError", + "memory_precondition_failed_error": "#/components/schemas/BetaManagedAgentsMemoryPreconditionFailedError", + "memory_path_conflict_error": "#/components/schemas/BetaManagedAgentsMemoryPathConflictError", + "conflict_error": "#/components/schemas/BetaManagedAgentsConflictError" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaInvalidRequestError" + }, + { + "$ref": "#/components/schemas/BetaAuthenticationError" + }, + { + "$ref": "#/components/schemas/BetaBillingError" + }, + { + "$ref": "#/components/schemas/BetaPermissionError" + }, + { + "$ref": "#/components/schemas/BetaNotFoundError" + }, + { + "$ref": "#/components/schemas/BetaRateLimitError" + }, + { + "$ref": "#/components/schemas/BetaGatewayTimeoutError" + }, + { + "$ref": "#/components/schemas/BetaAPIError" + }, + { + "$ref": "#/components/schemas/BetaOverloadedError" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryPreconditionFailedError" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsMemoryPathConflictError" + }, + { + "$ref": "#/components/schemas/BetaManagedAgentsConflictError" + } + ] + }, + "CreateMessageParamsWithoutStream": { + "additionalProperties": false, + "example": { + "max_tokens": 1024, + "messages": [ + { + "content": "Hello, world", + "role": "user" + } + ], + "model": "claude-opus-4-6" + }, + "properties": { + "model": { + "$ref": "#/components/schemas/Model" + }, + "messages": { + "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.", + "items": { + "$ref": "#/components/schemas/InputMessage" + }, + "title": "Messages", + "type": "array" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { + "ephemeral": "#/components/schemas/CacheControlEphemeral" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/CacheControlEphemeral" + } + ] + }, + { + "type": "null" + } + ], + "description": "Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.", + "title": "Cache Control" + }, + "container": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Container identifier for reuse across requests.", + "title": "Container" + }, + "inference_geo": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used.", + "title": "Inference Geo" + }, + "max_tokens": { + "description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nSet to `0` to populate the [prompt cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.\n\nDifferent models have different maximum values for this parameter. See [models](https://docs.claude.com/en/docs/models-overview) for details.", + "examples": [ + 1024 + ], + "minimum": 0, + "title": "Max Tokens", + "type": "integer" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata", + "description": "An object describing metadata about the request." + }, + "output_config": { + "$ref": "#/components/schemas/OutputConfig", + "description": "Configuration options for the model's output, such as the output format." + }, + "service_tier": { + "description": "Determines whether to use priority capacity (if available) or standard capacity for this request.\n\nAnthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.", + "enum": [ + "auto", + "standard_only" + ], + "title": "Service Tier", + "type": "string" + }, + "stop_sequences": { + "description": "Custom text sequences that will cause the model to stop generating.\n\nOur models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `\"end_turn\"`.\n\nIf you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"` and the response `stop_sequence` value will contain the matched stop sequence.", + "items": { + "type": "string" + }, + "title": "Stop Sequences", + "type": "array" + }, + "system": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/RequestTextBlock" + }, + "type": "array" + } + ], + "description": "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).", + "examples": [ + [ + { + "text": "Today's date is 2024-06-01.", + "type": "text" + } + ], + "Today's date is 2023-01-01." + ], + "title": "System" + }, + "temperature": { + "deprecated": true, + "description": "Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic.", + "examples": [ + 1 + ], + "maximum": 1, + "minimum": 0, + "title": "Temperature", + "type": "number", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not support setting temperature. A value of 1.0 of will be accepted for backwards compatibility, all other values will be rejected with a 400 error." + }, + "thinking": { + "$ref": "#/components/schemas/ThinkingConfigParam" + }, + "tool_choice": { + "$ref": "#/components/schemas/ToolChoice" + }, + "tools": { + "description": "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview\\#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.", + "examples": [ + { + "description": "Get the current weather in a given location", + "input_schema": { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string" + }, + "unit": { + "description": "Unit for the output - one of (celsius, fahrenheit)", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather" + } + ], + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Tool" + }, + { + "$ref": "#/components/schemas/BashTool_20250124" + }, + { + "$ref": "#/components/schemas/CodeExecutionTool_20250522" + }, + { + "$ref": "#/components/schemas/CodeExecutionTool_20250825" + }, + { + "$ref": "#/components/schemas/CodeExecutionTool_20260120" + }, + { + "$ref": "#/components/schemas/MemoryTool_20250818" + }, + { + "$ref": "#/components/schemas/TextEditor_20250124" + }, + { + "$ref": "#/components/schemas/TextEditor_20250429" + }, + { + "$ref": "#/components/schemas/TextEditor_20250728" + }, + { + "$ref": "#/components/schemas/WebSearchTool_20250305" + }, + { + "$ref": "#/components/schemas/WebFetchTool_20250910" + }, + { + "$ref": "#/components/schemas/WebSearchTool_20260209" + }, + { + "$ref": "#/components/schemas/WebFetchTool_20260209" + }, + { + "$ref": "#/components/schemas/WebFetchTool_20260309" + }, + { + "$ref": "#/components/schemas/ToolSearchToolBM25_20251119" + }, + { + "$ref": "#/components/schemas/ToolSearchToolRegex_20251119" + } + ] + }, + "title": "Tools", + "type": "array" + }, + "top_k": { + "deprecated": true, + "description": "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only.", + "examples": [ + 5 + ], + "minimum": 0, + "title": "Top K", + "type": "integer", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value will be rejected with a 400 error." + }, + "top_p": { + "deprecated": true, + "description": "Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`.\n\nRecommended for advanced use cases only.", + "examples": [ + 0.7 + ], + "maximum": 1, + "minimum": 0, + "title": "Top P", + "type": "number", + "x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not support setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all other values will be rejected with a 400 error." + } + }, + "required": [ + "model", + "messages", + "max_tokens" + ], + "title": "CreateMessageParams", + "type": "object" + }, + "AnthropicBeta": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "message-batches-2024-09-24", + "prompt-caching-2024-07-31", + "computer-use-2024-10-22", + "computer-use-2025-01-24", + "pdfs-2024-09-25", + "token-counting-2024-11-01", + "token-efficient-tools-2025-02-19", + "output-128k-2025-02-19", + "files-api-2025-04-14", + "mcp-client-2025-04-04", + "mcp-client-2025-11-20", + "dev-full-thinking-2025-05-14", + "interleaved-thinking-2025-05-14", + "code-execution-2025-05-22", + "extended-cache-ttl-2025-04-11", + "context-1m-2025-08-07", + "context-management-2025-06-27", + "model-context-window-exceeded-2025-08-26", + "skills-2025-10-02", + "fast-mode-2026-02-01", + "output-300k-2026-03-24", + "user-profiles-2026-03-24", + "advisor-tool-2026-03-01", + "managed-agents-2026-04-01", + "cache-diagnosis-2026-04-07", + "thinking-token-count-2026-05-13" + ], + "x-stainless-nominal": false + } + ] + }, + "ThinkingConfigParam": { + "description": "Configuration for enabling Claude's extended thinking.\n\nWhen enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit.\n\nSee [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.", + "discriminator": { + "mapping": { + "adaptive": "#/components/schemas/ThinkingConfigAdaptive", + "disabled": "#/components/schemas/ThinkingConfigDisabled", + "enabled": "#/components/schemas/ThinkingConfigEnabled" + }, + "propertyName": "type" + }, + "examples": [ + { + "type": "adaptive" + } + ], + "oneOf": [ + { + "$ref": "#/components/schemas/ThinkingConfigEnabled" + }, + { + "$ref": "#/components/schemas/ThinkingConfigDisabled" + }, + { + "$ref": "#/components/schemas/ThinkingConfigAdaptive" + } + ], + "title": "Thinking" + }, + "BetaThinkingConfigParam": { + "description": "Configuration for enabling Claude's extended thinking.\n\nWhen enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit.\n\nSee [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.", + "discriminator": { + "mapping": { + "adaptive": "#/components/schemas/BetaThinkingConfigAdaptive", + "disabled": "#/components/schemas/BetaThinkingConfigDisabled", + "enabled": "#/components/schemas/BetaThinkingConfigEnabled" + }, + "propertyName": "type" + }, + "examples": [ + { + "type": "adaptive" + } + ], + "oneOf": [ + { + "$ref": "#/components/schemas/BetaThinkingConfigEnabled" + }, + { + "$ref": "#/components/schemas/BetaThinkingConfigDisabled" + }, + { + "$ref": "#/components/schemas/BetaThinkingConfigAdaptive" + } + ], + "title": "Thinking" + }, + "ToolChoice": { + "description": "How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.", + "discriminator": { + "mapping": { + "any": "#/components/schemas/ToolChoiceAny", + "auto": "#/components/schemas/ToolChoiceAuto", + "none": "#/components/schemas/ToolChoiceNone", + "tool": "#/components/schemas/ToolChoiceTool" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ToolChoiceAuto" + }, + { + "$ref": "#/components/schemas/ToolChoiceAny" + }, + { + "$ref": "#/components/schemas/ToolChoiceTool" + }, + { + "$ref": "#/components/schemas/ToolChoiceNone" + } + ], + "title": "Tool Choice" + }, + "BetaToolChoice": { + "description": "How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.", + "discriminator": { + "mapping": { + "any": "#/components/schemas/BetaToolChoiceAny", + "auto": "#/components/schemas/BetaToolChoiceAuto", + "none": "#/components/schemas/BetaToolChoiceNone", + "tool": "#/components/schemas/BetaToolChoiceTool" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaToolChoiceAuto" + }, + { + "$ref": "#/components/schemas/BetaToolChoiceAny" + }, + { + "$ref": "#/components/schemas/BetaToolChoiceTool" + }, + { + "$ref": "#/components/schemas/BetaToolChoiceNone" + } + ], + "title": "Tool Choice" + }, + "ContentBlock": { + "discriminator": { + "mapping": { + "bash_code_execution_tool_result": "#/components/schemas/ResponseBashCodeExecutionToolResultBlock", + "code_execution_tool_result": "#/components/schemas/ResponseCodeExecutionToolResultBlock", + "container_upload": "#/components/schemas/ResponseContainerUploadBlock", + "redacted_thinking": "#/components/schemas/ResponseRedactedThinkingBlock", + "server_tool_use": "#/components/schemas/ResponseServerToolUseBlock", + "text": "#/components/schemas/ResponseTextBlock", + "text_editor_code_execution_tool_result": "#/components/schemas/ResponseTextEditorCodeExecutionToolResultBlock", + "thinking": "#/components/schemas/ResponseThinkingBlock", + "tool_search_tool_result": "#/components/schemas/ResponseToolSearchToolResultBlock", + "tool_use": "#/components/schemas/ResponseToolUseBlock", + "web_fetch_tool_result": "#/components/schemas/ResponseWebFetchToolResultBlock", + "web_search_tool_result": "#/components/schemas/ResponseWebSearchToolResultBlock" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ResponseTextBlock" + }, + { + "$ref": "#/components/schemas/ResponseThinkingBlock" + }, + { + "$ref": "#/components/schemas/ResponseRedactedThinkingBlock" + }, + { + "$ref": "#/components/schemas/ResponseToolUseBlock" + }, + { + "$ref": "#/components/schemas/ResponseServerToolUseBlock" + }, + { + "$ref": "#/components/schemas/ResponseWebSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseWebFetchToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseBashCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseTextEditorCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseToolSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/ResponseContainerUploadBlock" + } + ] + }, + "InputContentBlock": { + "discriminator": { + "mapping": { + "bash_code_execution_tool_result": "#/components/schemas/RequestBashCodeExecutionToolResultBlock", + "code_execution_tool_result": "#/components/schemas/RequestCodeExecutionToolResultBlock", + "container_upload": "#/components/schemas/RequestContainerUploadBlock", + "document": "#/components/schemas/RequestDocumentBlock", + "image": "#/components/schemas/RequestImageBlock", + "redacted_thinking": "#/components/schemas/RequestRedactedThinkingBlock", + "search_result": "#/components/schemas/RequestSearchResultBlock", + "server_tool_use": "#/components/schemas/RequestServerToolUseBlock", + "text": "#/components/schemas/RequestTextBlock", + "text_editor_code_execution_tool_result": "#/components/schemas/RequestTextEditorCodeExecutionToolResultBlock", + "thinking": "#/components/schemas/RequestThinkingBlock", + "tool_result": "#/components/schemas/RequestToolResultBlock", + "tool_search_tool_result": "#/components/schemas/RequestToolSearchToolResultBlock", + "tool_use": "#/components/schemas/RequestToolUseBlock", + "web_fetch_tool_result": "#/components/schemas/RequestWebFetchToolResultBlock", + "web_search_tool_result": "#/components/schemas/RequestWebSearchToolResultBlock" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/RequestTextBlock", + "description": "Regular text content." + }, + { + "$ref": "#/components/schemas/RequestImageBlock", + "description": "Image content specified directly as base64 data or as a reference via a URL." + }, + { + "$ref": "#/components/schemas/RequestDocumentBlock", + "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL." + }, + { + "$ref": "#/components/schemas/RequestSearchResultBlock", + "description": "A search result block containing source, title, and content from search operations." + }, + { + "$ref": "#/components/schemas/RequestThinkingBlock", + "description": "A block specifying internal thinking by the model." + }, + { + "$ref": "#/components/schemas/RequestRedactedThinkingBlock", + "description": "A block specifying internal, redacted thinking by the model." + }, + { + "$ref": "#/components/schemas/RequestToolUseBlock", + "description": "A block indicating a tool use by the model." + }, + { + "$ref": "#/components/schemas/RequestToolResultBlock", + "description": "A block specifying the results of a tool use by the model." + }, + { + "$ref": "#/components/schemas/RequestServerToolUseBlock" + }, + { + "$ref": "#/components/schemas/RequestWebSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/RequestWebFetchToolResultBlock" + }, + { + "$ref": "#/components/schemas/RequestCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/RequestBashCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/RequestTextEditorCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/RequestToolSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/RequestContainerUploadBlock" + } + ], + "x-stainless-python-extend-union": [ + "ContentBlock" + ], + "x-stainless-python-extend-union-imports": [ + "from .content_block import ContentBlock" + ], + "x-stainless-go-variant-constructor": { + "naming": "new_{variant}_block" + } + }, + "BetaContentBlock": { + "discriminator": { + "mapping": { + "advisor_tool_result": "#/components/schemas/BetaResponseAdvisorToolResultBlock", + "bash_code_execution_tool_result": "#/components/schemas/BetaResponseBashCodeExecutionToolResultBlock", + "code_execution_tool_result": "#/components/schemas/BetaResponseCodeExecutionToolResultBlock", + "compaction": "#/components/schemas/BetaResponseCompactionBlock", + "container_upload": "#/components/schemas/BetaResponseContainerUploadBlock", + "mcp_tool_result": "#/components/schemas/BetaResponseMCPToolResultBlock", + "mcp_tool_use": "#/components/schemas/BetaResponseMCPToolUseBlock", + "redacted_thinking": "#/components/schemas/BetaResponseRedactedThinkingBlock", + "server_tool_use": "#/components/schemas/BetaResponseServerToolUseBlock", + "text": "#/components/schemas/BetaResponseTextBlock", + "text_editor_code_execution_tool_result": "#/components/schemas/BetaResponseTextEditorCodeExecutionToolResultBlock", + "thinking": "#/components/schemas/BetaResponseThinkingBlock", + "tool_search_tool_result": "#/components/schemas/BetaResponseToolSearchToolResultBlock", + "tool_use": "#/components/schemas/BetaResponseToolUseBlock", + "web_fetch_tool_result": "#/components/schemas/BetaResponseWebFetchToolResultBlock", + "web_search_tool_result": "#/components/schemas/BetaResponseWebSearchToolResultBlock" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaResponseTextBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseThinkingBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseRedactedThinkingBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseToolUseBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseServerToolUseBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseWebSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseWebFetchToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseAdvisorToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseBashCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseTextEditorCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseToolSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseMCPToolUseBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseMCPToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseContainerUploadBlock" + }, + { + "$ref": "#/components/schemas/BetaResponseCompactionBlock" + } + ] + }, + "BetaInputContentBlock": { + "discriminator": { + "mapping": { + "advisor_tool_result": "#/components/schemas/BetaRequestAdvisorToolResultBlock", + "bash_code_execution_tool_result": "#/components/schemas/BetaRequestBashCodeExecutionToolResultBlock", + "code_execution_tool_result": "#/components/schemas/BetaRequestCodeExecutionToolResultBlock", + "compaction": "#/components/schemas/BetaRequestCompactionBlock", + "container_upload": "#/components/schemas/BetaRequestContainerUploadBlock", + "document": "#/components/schemas/BetaRequestDocumentBlock", + "image": "#/components/schemas/BetaRequestImageBlock", + "mcp_tool_result": "#/components/schemas/BetaRequestMCPToolResultBlock", + "mcp_tool_use": "#/components/schemas/BetaRequestMCPToolUseBlock", + "redacted_thinking": "#/components/schemas/BetaRequestRedactedThinkingBlock", + "search_result": "#/components/schemas/BetaRequestSearchResultBlock", + "server_tool_use": "#/components/schemas/BetaRequestServerToolUseBlock", + "text": "#/components/schemas/BetaRequestTextBlock", + "text_editor_code_execution_tool_result": "#/components/schemas/BetaRequestTextEditorCodeExecutionToolResultBlock", + "thinking": "#/components/schemas/BetaRequestThinkingBlock", + "tool_result": "#/components/schemas/BetaRequestToolResultBlock", + "tool_search_tool_result": "#/components/schemas/BetaRequestToolSearchToolResultBlock", + "tool_use": "#/components/schemas/BetaRequestToolUseBlock", + "web_fetch_tool_result": "#/components/schemas/BetaRequestWebFetchToolResultBlock", + "web_search_tool_result": "#/components/schemas/BetaRequestWebSearchToolResultBlock" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaRequestTextBlock", + "description": "Regular text content." + }, + { + "$ref": "#/components/schemas/BetaRequestImageBlock", + "description": "Image content specified directly as base64 data or as a reference via a URL." + }, + { + "$ref": "#/components/schemas/BetaRequestDocumentBlock", + "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL." + }, + { + "$ref": "#/components/schemas/BetaRequestSearchResultBlock", + "description": "A search result block containing source, title, and content from search operations." + }, + { + "$ref": "#/components/schemas/BetaRequestThinkingBlock", + "description": "A block specifying internal thinking by the model." + }, + { + "$ref": "#/components/schemas/BetaRequestRedactedThinkingBlock", + "description": "A block specifying internal, redacted thinking by the model." + }, + { + "$ref": "#/components/schemas/BetaRequestToolUseBlock", + "description": "A block indicating a tool use by the model." + }, + { + "$ref": "#/components/schemas/BetaRequestToolResultBlock", + "description": "A block specifying the results of a tool use by the model." + }, + { + "$ref": "#/components/schemas/BetaRequestServerToolUseBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestWebSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestWebFetchToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestAdvisorToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestBashCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestTextEditorCodeExecutionToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestToolSearchToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestMCPToolUseBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestMCPToolResultBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestContainerUploadBlock" + }, + { + "$ref": "#/components/schemas/BetaRequestCompactionBlock" + } + ], + "x-stainless-go-variant-constructor": { + "naming": "new_beta_{variant}_block" + } + }, + "StopReason": { + "enum": [ + "end_turn", + "max_tokens", + "stop_sequence", + "tool_use", + "pause_turn", + "refusal" + ], + "type": "string" + }, + "BetaStopReason": { + "enum": [ + "end_turn", + "max_tokens", + "stop_sequence", + "tool_use", + "pause_turn", + "compaction", + "refusal", + "model_context_window_exceeded" + ], + "type": "string" + }, + "Model": { + "title": "Model", + "description": "The model that will complete your prompt.\\n\\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.", + "anyOf": [ + { + "type": "string" + }, + { + "const": "claude-opus-4-7", + "description": "Frontier intelligence for long-running agents and coding", + "x-stainless-nominal": false + }, + { + "const": "claude-mythos-preview", + "description": "New class of intelligence, strongest in coding and cybersecurity", + "x-stainless-nominal": false + }, + { + "const": "claude-opus-4-6", + "description": "Frontier intelligence for long-running agents and coding", + "x-stainless-nominal": false + }, + { + "const": "claude-sonnet-4-6", + "description": "Best combination of speed and intelligence", + "x-stainless-nominal": false + }, + { + "const": "claude-haiku-4-5", + "description": "Fastest model with near-frontier intelligence", + "x-stainless-nominal": false + }, + { + "const": "claude-haiku-4-5-20251001", + "description": "Fastest model with near-frontier intelligence", + "x-stainless-nominal": false + }, + { + "const": "claude-opus-4-5", + "description": "Premium model combining maximum intelligence with practical performance", + "x-stainless-nominal": false + }, + { + "const": "claude-opus-4-5-20251101", + "description": "Premium model combining maximum intelligence with practical performance", + "x-stainless-nominal": false + }, + { + "const": "claude-sonnet-4-5", + "description": "High-performance model for agents and coding", + "x-stainless-nominal": false + }, + { + "const": "claude-sonnet-4-5-20250929", + "description": "High-performance model for agents and coding", + "x-stainless-nominal": false + }, + { + "const": "claude-opus-4-1", + "description": "Exceptional model for specialized complex tasks", + "x-stainless-nominal": false + }, + { + "const": "claude-opus-4-1-20250805", + "description": "Exceptional model for specialized complex tasks", + "x-stainless-nominal": false + }, + { + "const": "claude-opus-4-0", + "description": "Powerful model for complex tasks", + "x-stainless-nominal": false, + "deprecated": true, + "x-stainless-deprecation-message": "Will reach end-of-life on June 15th, 2026. Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information." + }, + { + "const": "claude-opus-4-20250514", + "description": "Powerful model for complex tasks", + "x-stainless-nominal": false, + "deprecated": true, + "x-stainless-deprecation-message": "Will reach end-of-life on June 15th, 2026. Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information." + }, + { + "const": "claude-sonnet-4-0", + "description": "High-performance model with extended thinking", + "x-stainless-nominal": false, + "deprecated": true, + "x-stainless-deprecation-message": "Will reach end-of-life on June 15th, 2026. Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information." + }, + { + "const": "claude-sonnet-4-20250514", + "description": "High-performance model with extended thinking", + "x-stainless-nominal": false, + "deprecated": true, + "x-stainless-deprecation-message": "Will reach end-of-life on June 15th, 2026. Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information." + }, + { + "const": "claude-3-haiku-20240307", + "description": "Fast and cost-effective model", + "x-stainless-nominal": false, + "deprecated": true, + "x-stainless-deprecation-message": "Will reach end-of-life on April 20th, 2026. Please migrate to claude-haiku-4-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information." + } + ] + }, + "BetaManagedAgentsModel": { + "title": "BetaManagedAgentsModel", + "description": "The model that will power your agent.\\n\\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.", + "anyOf": [ + { + "type": "string" + }, + { + "const": "claude-opus-4-7", + "description": "Frontier intelligence for long-running agents and coding", + "x-stainless-nominal": false + }, + { + "const": "claude-opus-4-6", + "description": "Most intelligent model for building agents and coding", + "x-stainless-nominal": false + }, + { + "const": "claude-sonnet-4-6", + "description": "Best combination of speed and intelligence", + "x-stainless-nominal": false + }, + { + "const": "claude-haiku-4-5", + "description": "Fastest model with near-frontier intelligence", + "x-stainless-nominal": false + }, + { + "const": "claude-haiku-4-5-20251001", + "description": "Fastest model with near-frontier intelligence", + "x-stainless-nominal": false + }, + { + "const": "claude-opus-4-5", + "description": "Premium model combining maximum intelligence with practical performance", + "x-stainless-nominal": false + }, + { + "const": "claude-opus-4-5-20251101", + "description": "Premium model combining maximum intelligence with practical performance", + "x-stainless-nominal": false + }, + { + "const": "claude-sonnet-4-5", + "description": "High-performance model for agents and coding", + "x-stainless-nominal": false + }, + { + "const": "claude-sonnet-4-5-20250929", + "description": "High-performance model for agents and coding", + "x-stainless-nominal": false + } + ] + }, + "BetaMemoryTool_20250818_ViewCommand": { + "type": "object", + "required": [ + "command", + "path" + ], + "properties": { + "command": { + "type": "string", + "enum": [ + "view" + ], + "const": "view", + "default": "view", + "description": "Command type identifier" + }, + "path": { + "type": "string", + "description": "Path to directory or file to view", + "example": "/memories" + }, + "view_range": { + "type": "array", + "description": "Optional line range for viewing specific lines", + "items": { + "type": "integer" + }, + "minItems": 2, + "maxItems": 2, + "example": [ + 1, + 10 + ] + } + } + }, + "BetaMemoryTool_20250818_CreateCommand": { + "type": "object", + "required": [ + "command", + "path", + "file_text" + ], + "properties": { + "command": { + "type": "string", + "enum": [ + "create" + ], + "const": "create", + "default": "create", + "description": "Command type identifier" + }, + "path": { + "type": "string", + "description": "Path where the file should be created", + "example": "/memories/notes.txt" + }, + "file_text": { + "type": "string", + "description": "Content to write to the file", + "example": "Meeting notes:\n- Discussed project timeline\n- Next steps defined\n" + } + } + }, + "BetaMemoryTool_20250818_StrReplaceCommand": { + "type": "object", + "required": [ + "command", + "path", + "old_str", + "new_str" + ], + "properties": { + "command": { + "type": "string", + "enum": [ + "str_replace" + ], + "const": "str_replace", + "default": "str_replace", + "description": "Command type identifier" + }, + "path": { + "type": "string", + "description": "Path to the file where text should be replaced", + "example": "/memories/preferences.txt" + }, + "old_str": { + "type": "string", + "description": "Text to search for and replace", + "example": "Favorite color: blue" + }, + "new_str": { + "type": "string", + "description": "Text to replace with", + "example": "Favorite color: green" + } + } + }, + "BetaMemoryTool_20250818_InsertCommand": { + "type": "object", + "required": [ + "command", + "path", + "insert_line", + "insert_text" + ], + "properties": { + "command": { + "type": "string", + "enum": [ + "insert" + ], + "const": "insert", + "default": "insert", + "description": "Command type identifier" + }, + "path": { + "type": "string", + "description": "Path to the file where text should be inserted", + "example": "/memories/todo.txt" + }, + "insert_line": { + "type": "integer", + "description": "Line number where text should be inserted", + "minimum": 1, + "example": 2 + }, + "insert_text": { + "type": "string", + "description": "Text to insert at the specified line", + "example": "- Review memory tool documentation\n" + } + } + }, + "BetaMemoryTool_20250818_DeleteCommand": { + "type": "object", + "required": [ + "command", + "path" + ], + "properties": { + "command": { + "type": "string", + "enum": [ + "delete" + ], + "const": "delete", + "default": "delete", + "description": "Command type identifier" + }, + "path": { + "type": "string", + "description": "Path to the file or directory to delete", + "example": "/memories/old_file.txt" + } + } + }, + "BetaMemoryTool_20250818_RenameCommand": { + "type": "object", + "required": [ + "command", + "old_path", + "new_path" + ], + "properties": { + "command": { + "type": "string", + "enum": [ + "rename" + ], + "const": "rename", + "default": "rename", + "description": "Command type identifier" + }, + "old_path": { + "type": "string", + "description": "Current path of the file or directory", + "example": "/memories/draft.txt" + }, + "new_path": { + "type": "string", + "description": "New path for the file or directory", + "example": "/memories/final.txt" + } + } + }, + "BetaMemoryTool_20250818_Command": { + "oneOf": [ + { + "$ref": "#/components/schemas/BetaMemoryTool_20250818_ViewCommand" + }, + { + "$ref": "#/components/schemas/BetaMemoryTool_20250818_CreateCommand" + }, + { + "$ref": "#/components/schemas/BetaMemoryTool_20250818_StrReplaceCommand" + }, + { + "$ref": "#/components/schemas/BetaMemoryTool_20250818_InsertCommand" + }, + { + "$ref": "#/components/schemas/BetaMemoryTool_20250818_DeleteCommand" + }, + { + "$ref": "#/components/schemas/BetaMemoryTool_20250818_RenameCommand" + } + ], + "discriminator": { + "propertyName": "command", + "mapping": { + "view": "#/components/schemas/BetaMemoryTool_20250818_ViewCommand", + "create": "#/components/schemas/BetaMemoryTool_20250818_CreateCommand", + "str_replace": "#/components/schemas/BetaMemoryTool_20250818_StrReplaceCommand", + "insert": "#/components/schemas/BetaMemoryTool_20250818_InsertCommand", + "delete": "#/components/schemas/BetaMemoryTool_20250818_DeleteCommand", + "rename": "#/components/schemas/BetaMemoryTool_20250818_RenameCommand" + } + } + }, + "BetaManagedAgentsAgentToolset20260401_BashInput": { + "type": "object", + "additionalProperties": false, + "description": "Input payload for the `bash` tool of the\n`agent_toolset_20260401` toolset. All fields are optional;\na normal invocation supplies `command`, while `restart=true`\n(with no `command`) reboots the runner-side bash session.\n", + "properties": { + "command": { + "type": "string", + "description": "Shell command to execute. Omit only when `restart` is true." + }, + "restart": { + "type": "boolean", + "description": "When true, restart the persistent bash session instead of\nrunning a command. Subsequent calls without `restart` will\nrun against the fresh session.\n" + }, + "timeout_ms": { + "type": "integer", + "minimum": 0, + "description": "Per-call timeout in milliseconds. Defaults to the\nrunner-wide tool timeout when omitted or zero.\n" + } + } + }, + "BetaManagedAgentsAgentToolset20260401_ReadInput": { + "type": "object", + "additionalProperties": false, + "required": [ + "file_path" + ], + "description": "Input payload for the `read` tool. Reads file contents\nrelative to the runner's working directory (or absolute when\nthe runner permits).\n", + "properties": { + "file_path": { + "type": "string", + "description": "Path of the file to read." + }, + "view_range": { + "type": "array", + "items": { + "type": "integer" + }, + "minItems": 2, + "maxItems": 2, + "description": "Optional `[start_line, end_line]` 1-indexed inclusive\nrange. When omitted the entire file is returned.\n`end_line` of 0 or negative means \"to end of file\".\n" + } + } + }, + "BetaManagedAgentsAgentToolset20260401_WriteInput": { + "type": "object", + "additionalProperties": false, + "required": [ + "file_path", + "content" + ], + "description": "Input payload for the `write` tool. Writes (overwriting) the\nentire file contents.\n", + "properties": { + "file_path": { + "type": "string", + "description": "Path of the file to write." + }, + "content": { + "type": "string", + "description": "Full file contents to write." + } + } + }, + "BetaManagedAgentsAgentToolset20260401_EditInput": { + "type": "object", + "additionalProperties": false, + "required": [ + "file_path", + "old_string", + "new_string" + ], + "description": "Input payload for the `edit` tool. Performs a string\nreplacement in the named file; by default `old_string` must\noccur exactly once.\n", + "properties": { + "file_path": { + "type": "string", + "description": "Path of the file to edit." + }, + "old_string": { + "type": "string", + "description": "Substring to find and replace." + }, + "new_string": { + "type": "string", + "description": "Replacement text." + }, + "replace_all": { + "type": "boolean", + "description": "When true, replace every occurrence of `old_string`\ninstead of requiring a unique match.\n" + } + } + }, + "BetaManagedAgentsAgentToolset20260401_GlobInput": { + "type": "object", + "additionalProperties": false, + "required": [ + "pattern" + ], + "description": "Input payload for the `glob` tool. Returns paths matching a\ndoublestar glob pattern, newest first.\n", + "properties": { + "pattern": { + "type": "string", + "description": "Doublestar glob pattern (e.g. `**/*.go`). Absolute patterns\nare only permitted when the runner is configured to allow\nthem.\n" + }, + "path": { + "type": "string", + "description": "Optional directory root to search under. Defaults to the\nrunner's working directory.\n" + } + } + }, + "BetaManagedAgentsAgentToolset20260401_GrepInput": { + "type": "object", + "additionalProperties": false, + "required": [ + "pattern" + ], + "description": "Input payload for the `grep` tool. Searches file contents for\na regular expression, returning matching lines.\n", + "properties": { + "pattern": { + "type": "string", + "description": "Regular expression to search for." + }, + "path": { + "type": "string", + "description": "Optional directory root to search under. Defaults to the\nrunner's working directory.\n" + } + } + }, + "BetaIterationsUsage": { + "anyOf": [ + { + "items": { + "discriminator": { + "mapping": { + "advisor_message": "#/components/schemas/BetaAdvisorMessageIterationUsage", + "compaction": "#/components/schemas/BetaCompactionIterationUsage", + "message": "#/components/schemas/BetaMessageIterationUsage" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/BetaMessageIterationUsage" + }, + { + "$ref": "#/components/schemas/BetaCompactionIterationUsage" + }, + { + "$ref": "#/components/schemas/BetaAdvisorMessageIterationUsage" + } + ], + "x-stainless-naming": { + "java": { + "type_name": "BetaIterationsUsageItems" + }, + "csharp": { + "type_name": "BetaIterationsUsageItems" + } + } + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Per-iteration token usage breakdown.\n\nEach entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to:\n- Determine which iterations exceeded long context thresholds (>=200k tokens)\n- Calculate the true context window size from the last iteration\n- Understand token accumulation across server-side tool use loops", + "title": "Iterations" + } + } + }, + "servers": [ + { + "url": "https://api.anthropic.com" + } + ], + "webhooks": { + "session.created": { + "post": { + "operationId": "BetaSessionCreatedWebhook", + "summary": "session.created webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.pending": { + "post": { + "operationId": "BetaSessionPendingWebhook", + "summary": "session.pending webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.running": { + "post": { + "operationId": "BetaSessionRunningWebhook", + "summary": "session.running webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.idled": { + "post": { + "operationId": "BetaSessionIdledWebhook", + "summary": "session.idled webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.requires_action": { + "post": { + "operationId": "BetaSessionRequiresActionWebhook", + "summary": "session.requires_action webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.archived": { + "post": { + "operationId": "BetaSessionArchivedWebhook", + "summary": "session.archived webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.deleted": { + "post": { + "operationId": "BetaSessionDeletedWebhook", + "summary": "session.deleted webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.status_rescheduled": { + "post": { + "operationId": "BetaSessionStatusRescheduledWebhook", + "summary": "session.status_rescheduled webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.status_run_started": { + "post": { + "operationId": "BetaSessionStatusRunStartedWebhook", + "summary": "session.status_run_started webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.status_idled": { + "post": { + "operationId": "BetaSessionStatusIdledWebhook", + "summary": "session.status_idled webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.status_terminated": { + "post": { + "operationId": "BetaSessionStatusTerminatedWebhook", + "summary": "session.status_terminated webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.thread_created": { + "post": { + "operationId": "BetaSessionThreadCreatedWebhook", + "summary": "session.thread_created webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.thread_idled": { + "post": { + "operationId": "BetaSessionThreadIdledWebhook", + "summary": "session.thread_idled webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.thread_terminated": { + "post": { + "operationId": "BetaSessionThreadTerminatedWebhook", + "summary": "session.thread_terminated webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "session.outcome_evaluation_ended": { + "post": { + "operationId": "BetaSessionOutcomeEvaluationEndedWebhook", + "summary": "session.outcome_evaluation_ended webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "vault.created": { + "post": { + "operationId": "BetaVaultCreatedWebhook", + "summary": "vault.created webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "vault.archived": { + "post": { + "operationId": "BetaVaultArchivedWebhook", + "summary": "vault.archived webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "vault.deleted": { + "post": { + "operationId": "BetaVaultDeletedWebhook", + "summary": "vault.deleted webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "vault_credential.created": { + "post": { + "operationId": "BetaVaultCredentialCreatedWebhook", + "summary": "vault_credential.created webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "vault_credential.archived": { + "post": { + "operationId": "BetaVaultCredentialArchivedWebhook", + "summary": "vault_credential.archived webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "vault_credential.deleted": { + "post": { + "operationId": "BetaVaultCredentialDeletedWebhook", + "summary": "vault_credential.deleted webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + }, + "vault_credential.refresh_failed": { + "post": { + "operationId": "BetaVaultCredentialRefreshFailedWebhook", + "summary": "vault_credential.refresh_failed webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BetaWebhookEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Return any 2xx status to acknowledge receipt." + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/typescript/ai-schemas/scripts/specs/elevenlabs/elevenlabs.openapi.json b/packages/typescript/ai-schemas/scripts/specs/elevenlabs/elevenlabs.openapi.json new file mode 100644 index 000000000..96620dc93 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/specs/elevenlabs/elevenlabs.openapi.json @@ -0,0 +1,88585 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "ElevenLabs API Documentation", + "description": "This is the documentation for the ElevenLabs API. You can use this API to use our service programmatically, this is done by using your API key. You can find your API key in the dashboard at https://elevenlabs.io/app/settings/api-keys.", + "version": "1.0" + }, + "paths": { + "/v1/history": { + "get": { + "tags": [ + "speech-history" + ], + "summary": "List Generated Items", + "description": "Returns a list of your generated audio.", + "operationId": "get_speech_history", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "description": "How many history items to return at maximum. Can not exceed 1000, defaults to 100.", + "default": 100, + "title": "Page Size" + }, + "description": "How many history items to return at maximum. Can not exceed 1000, defaults to 100." + }, + { + "name": "start_after_history_item_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "After which ID to start fetching, use this parameter to paginate across a large collection of history items. In case this parameter is not provided history items will be fetched starting from the most recently created one ordered descending by their creation date.", + "title": "Start After History Item Id" + }, + "description": "After which ID to start fetching, use this parameter to paginate across a large collection of history items. In case this parameter is not provided history items will be fetched starting from the most recently created one ordered descending by their creation date." + }, + { + "name": "voice_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Voice ID to be filtered for, you can use GET https://api.elevenlabs.io/v1/voices to receive a list of voices and their IDs.", + "title": "Voice Id" + }, + "description": "Voice ID to be filtered for, you can use GET https://api.elevenlabs.io/v1/voices to receive a list of voices and their IDs." + }, + { + "name": "model_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model ID to filter history items by.", + "examples": [ + "eleven_turbo_v2", + "eleven_multilingual_v2" + ], + "title": "Model Id" + }, + "description": "Model ID to filter history items by." + }, + { + "name": "date_before_unix", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Unix timestamp to filter history items before this date (exclusive).", + "examples": [ + 1640995200 + ], + "title": "Date Before Unix" + }, + "description": "Unix timestamp to filter history items before this date (exclusive)." + }, + { + "name": "date_after_unix", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Unix timestamp to filter history items after this date (inclusive).", + "examples": [ + 1640995200 + ], + "title": "Date After Unix" + }, + "description": "Unix timestamp to filter history items after this date (inclusive)." + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Sort direction for the results.", + "examples": [ + "desc", + "asc" + ], + "default": "desc", + "title": "Sort Direction" + }, + "description": "Sort direction for the results." + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "search term used for filtering", + "examples": [ + "In the land far far away" + ], + "title": "Search" + }, + "description": "search term used for filtering" + }, + { + "name": "source", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "TTS", + "STS" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Source of the generated history item", + "examples": [ + "TTS" + ], + "title": "Source" + }, + "description": "Source of the generated history item" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSpeechHistoryResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "history", + "x-fern-sdk-method-name": "list" + } + }, + "/v1/history/{history_item_id}": { + "get": { + "tags": [ + "speech-history" + ], + "summary": "Get History Item", + "description": "Retrieves a history item.", + "operationId": "get_speech_history_item_by_id", + "parameters": [ + { + "name": "history_item_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "History item ID to be used, you can use GET https://api.elevenlabs.io/v1/history to receive a list of history items and their IDs.", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "History Item Id" + }, + "description": "History item ID to be used, you can use GET https://api.elevenlabs.io/v1/history to receive a list of history items and their IDs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpeechHistoryItemResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "history", + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "speech-history" + ], + "summary": "Delete History Item", + "description": "Delete a history item by its ID", + "operationId": "delete_speech_history_item", + "parameters": [ + { + "name": "history_item_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "History item ID to be used, you can use GET https://api.elevenlabs.io/v1/history to receive a list of history items and their IDs.", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "History Item Id" + }, + "description": "History item ID to be used, you can use GET https://api.elevenlabs.io/v1/history to receive a list of history items and their IDs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteHistoryItemResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "history", + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/history/{history_item_id}/audio": { + "get": { + "tags": [ + "speech-history" + ], + "summary": "Get Audio From History Item", + "description": "Returns the audio of an history item.", + "operationId": "get_audio_full_from_speech_history_item", + "parameters": [ + { + "name": "history_item_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "History item ID to be used, you can use GET https://api.elevenlabs.io/v1/history to receive a list of history items and their IDs.", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "History Item Id" + }, + "description": "History item ID to be used, you can use GET https://api.elevenlabs.io/v1/history to receive a list of history items and their IDs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "The audio file of the history item.", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "history", + "x-fern-sdk-method-name": "get_audio" + } + }, + "/v1/history/download": { + "post": { + "tags": [ + "speech-history" + ], + "summary": "Download History Items", + "description": "Download one or more history items. If one history item ID is provided, we will return a single audio file. If more than one history item IDs are provided, we will provide the history items packed into a .zip file.", + "operationId": "download_speech_history_items", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Download_history_items_v1_history_download_post" + } + } + } + }, + "responses": { + "200": { + "description": "The requested audio file, or a zip file containing multiple audio files when multiple history items are requested.", + "content": { + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "example": { + "error": "invalid_output_format", + "message": "output_format must be wav or none" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "history", + "x-fern-sdk-method-name": "download" + } + }, + "/v1/sound-generation": { + "post": { + "tags": [ + "sound-generation" + ], + "summary": "Sound Generation", + "description": "Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects models in the world.", + "operationId": "sound_generation", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Sound_Generation_v1_sound_generation_post" + } + } + } + }, + "responses": { + "200": { + "description": "The generated sound effect as an MP3 file", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "headers": { + "character-cost": { + "description": "The number of characters used for billing", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_sound_effects", + "x-fern-sdk-method-name": "convert" + } + }, + "/v1/audio-isolation": { + "post": { + "tags": [ + "audio-isolation" + ], + "summary": "Audio Isolation", + "description": "Removes background noise from audio", + "operationId": "audio_isolation", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Audio_Isolation_v1_audio_isolation_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "audio/mpeg": {} + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "audio_isolation", + "x-fern-sdk-method-name": "convert" + } + }, + "/v1/audio-isolation/history": { + "get": { + "tags": [ + "audio-isolation" + ], + "summary": "Get Audio Isolation History", + "description": "Returns a list of all your audio isolation generations.", + "operationId": "get_audio_isolation_history", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "description": "How many history items to return at maximum. Defaults to 100.", + "default": 100, + "title": "Page Size" + }, + "description": "How many history items to return at maximum. Defaults to 100." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number for search pagination (1-based). Only used when search is provided.", + "default": 1, + "title": "Page" + }, + "description": "Page number for search pagination (1-based). Only used when search is provided." + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional search term used for filtering audio isolation history (title/text).", + "examples": [ + "podcast", + "lecture" + ], + "title": "Search" + }, + "description": "Optional search term used for filtering audio isolation history (title/text)." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAudioIsolationHistoryResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "audio_isolation", + "x-fern-sdk-method-name": "list" + } + }, + "/v1/audio-isolation/history/{history_item_id}": { + "delete": { + "tags": [ + "audio-isolation" + ], + "summary": "Delete Audio Isolation History Item", + "description": "Deletes a specific audio isolation history item and the associated media files.", + "operationId": "delete_audio_isolation_history_item", + "parameters": [ + { + "name": "history_item_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Identifier of the audio isolation history item.", + "title": "History Item Id" + }, + "description": "Identifier of the audio isolation history item." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "audio_isolation", + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/audio-isolation/stream": { + "post": { + "tags": [ + "audio-isolation" + ], + "summary": "Audio Isolation Stream", + "description": "Removes background noise from audio and streams the result", + "operationId": "audio_isolation_stream", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Audio_Isolation_Stream_v1_audio_isolation_stream_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "audio/mpeg": {} + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "audio_isolation", + "x-fern-sdk-method-name": "stream", + "x-fern-streaming": true + } + }, + "/v1/voices/{voice_id}/samples/{sample_id}": { + "delete": { + "tags": [ + "samples" + ], + "summary": "Delete Sample", + "description": "Removes a sample by its ID.", + "operationId": "delete_sample", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "sample_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Sample ID to be used, you can use GET https://api.elevenlabs.io/v1/voices/{voice_id} to list all the available samples for a voice.", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "Sample Id" + }, + "description": "Sample ID to be used, you can use GET https://api.elevenlabs.io/v1/voices/{voice_id} to list all the available samples for a voice." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteSampleResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "samples", + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/voices/{voice_id}/samples/{sample_id}/audio": { + "get": { + "tags": [ + "samples" + ], + "summary": "Get Audio From Sample", + "description": "Returns the audio corresponding to a sample attached to a voice.", + "operationId": "get_audio_from_sample", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "sample_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Sample ID to be used, you can use GET https://api.elevenlabs.io/v1/voices/{voice_id} to list all the available samples for a voice.", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "Sample Id" + }, + "description": "Sample ID to be used, you can use GET https://api.elevenlabs.io/v1/voices/{voice_id} to list all the available samples for a voice." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "audio/*": {} + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "samples", + "audio" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/text-to-speech/{voice_id}": { + "post": { + "tags": [ + "text-to-speech" + ], + "summary": "Text To Speech", + "description": "Converts text into speech using a voice of your choice and returns audio.", + "operationId": "text_to_speech_full", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "enable_logging", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "title": "Enable request logging.", + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.", + "default": true + }, + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers." + }, + { + "name": "optimize_streaming_latency", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "DEPRECATED. How much we should optimize streaming request latency (time to first audio byte).", + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "type": "string", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "alaw_8000", + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_128", + "mp3_44100_192", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "opus_48000_128", + "opus_48000_192", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "pcm_8000", + "ulaw_8000", + "wav_16000", + "wav_22050", + "wav_24000", + "wav_32000", + "wav_44100", + "wav_48000", + "wav_8000" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_text_to_speech_full" + } + } + } + }, + "responses": { + "200": { + "description": "The generated audio file", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_speech", + "x-fern-sdk-method-name": "convert" + } + }, + "/v1/text-to-speech/{voice_id}/with-timestamps": { + "post": { + "tags": [ + "text-to-speech" + ], + "summary": "Text To Speech With Timestamps", + "description": "Generate speech from text with precise character-level timing information for audio-text synchronization.", + "operationId": "text_to_speech_full_with_timestamps", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "enable_logging", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "title": "Enable request logging.", + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.", + "default": true + }, + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers." + }, + { + "name": "optimize_streaming_latency", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "DEPRECATED. How much we should optimize streaming request latency (time to first audio byte).", + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "type": "string", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "alaw_8000", + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_128", + "mp3_44100_192", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "opus_48000_128", + "opus_48000_192", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "pcm_8000", + "ulaw_8000", + "wav_16000", + "wav_22050", + "wav_24000", + "wav_32000", + "wav_44100", + "wav_48000", + "wav_8000" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_text_to_speech_full_with_timestamps" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AudioWithTimestampsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_speech", + "x-fern-sdk-method-name": "convert_with_timestamps" + } + }, + "/v1/text-to-speech/{voice_id}/stream": { + "post": { + "tags": [ + "text-to-speech" + ], + "summary": "Text To Speech Streaming", + "description": "Converts text into speech using a voice of your choice and returns audio as an audio stream.", + "operationId": "text_to_speech_stream", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "enable_logging", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "title": "Enable request logging.", + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.", + "default": true + }, + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers." + }, + { + "name": "optimize_streaming_latency", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "DEPRECATED. How much we should optimize streaming request latency (time to first audio byte).", + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "type": "string", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_text_to_speech_stream" + } + } + } + }, + "responses": { + "200": { + "description": "Streaming audio data", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_speech", + "x-fern-sdk-method-name": "stream", + "x-fern-streaming": true + } + }, + "/v1/text-to-speech/{voice_id}/stream/with-timestamps": { + "post": { + "tags": [ + "text-to-speech" + ], + "summary": "Text To Speech Streaming With Timestamps", + "description": "Converts text into speech using a voice of your choice and returns a stream of JSONs containing audio as a base64 encoded string together with information on when which character was spoken.", + "operationId": "text_to_speech_stream_with_timestamps", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "enable_logging", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "title": "Enable request logging.", + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.", + "default": true + }, + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers." + }, + { + "name": "optimize_streaming_latency", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "DEPRECATED. How much we should optimize streaming request latency (time to first audio byte).", + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "type": "string", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_text_to_speech_stream_with_timestamps" + } + } + } + }, + "responses": { + "200": { + "description": "Stream of transcription chunks", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StreamingAudioChunkWithTimestampsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_speech", + "x-fern-sdk-method-name": "stream_with_timestamps", + "x-fern-streaming": true + } + }, + "/v1/text-to-dialogue": { + "post": { + "tags": [ + "text-to-dialogue" + ], + "summary": "Text To Dialogue (Multi-Voice)", + "description": "Converts a list of text and voice ID pairs into speech (dialogue) and returns audio.", + "operationId": "text_to_dialogue", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/NonStreamingOutputFormats" + }, + { + "$ref": "#/components/schemas/AllowedOutputFormats" + } + ], + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "alaw_8000", + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_128", + "mp3_44100_192", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "opus_48000_128", + "opus_48000_192", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "pcm_8000", + "ulaw_8000", + "wav_16000", + "wav_22050", + "wav_24000", + "wav_32000", + "wav_44100", + "wav_48000", + "wav_8000" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Text_to_dialogue__multi_voice__v1_text_to_dialogue_post" + } + } + } + }, + "responses": { + "200": { + "description": "The generated audio file", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_dialogue", + "x-fern-sdk-method-name": "convert" + } + }, + "/v1/text-to-dialogue/stream": { + "post": { + "tags": [ + "text-to-dialogue" + ], + "summary": "Text To Dialogue (Multi-Voice) Streaming", + "description": "Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream.", + "operationId": "text_to_dialogue_stream", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Text_to_dialogue__multi_voice__streaming_v1_text_to_dialogue_stream_post" + } + } + } + }, + "responses": { + "200": { + "description": "Streaming audio data", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_dialogue", + "x-fern-sdk-method-name": "stream", + "x-fern-streaming": true + } + }, + "/v1/text-to-dialogue/stream/with-timestamps": { + "post": { + "tags": [ + "text-to-dialogue" + ], + "summary": "Text To Dialogue Streaming With Timestamps", + "description": "Converts a list of text and voice ID pairs into speech (dialogue) and returns a stream of JSON blobs containing audio as a base64 encoded string and timestamps", + "operationId": "text_to_dialogue_stream_with_timestamps", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_text_to_dialogue_stream_with_timestamps" + } + } + } + }, + "responses": { + "200": { + "description": "Stream of transcription chunks", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_dialogue", + "x-fern-sdk-method-name": "stream_with_timestamps", + "x-fern-streaming": true + } + }, + "/v1/text-to-dialogue/with-timestamps": { + "post": { + "tags": [ + "text-to-dialogue" + ], + "summary": "Text To Dialogue With Timestamps", + "description": "Generate dialogue from text with precise character-level timing information for audio-text synchronization.", + "operationId": "text_to_dialogue_full_with_timestamps", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/NonStreamingOutputFormats" + }, + { + "$ref": "#/components/schemas/AllowedOutputFormats" + } + ], + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "alaw_8000", + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_128", + "mp3_44100_192", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "opus_48000_128", + "opus_48000_192", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "pcm_8000", + "ulaw_8000", + "wav_16000", + "wav_22050", + "wav_24000", + "wav_32000", + "wav_44100", + "wav_48000", + "wav_8000" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_text_to_dialogue_full_with_timestamps" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AudioWithTimestampsAndVoiceSegmentsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_dialogue", + "x-fern-sdk-method-name": "convert_with_timestamps" + } + }, + "/v1/speech-to-speech/{voice_id}": { + "post": { + "tags": [ + "speech-to-speech" + ], + "summary": "Speech To Speech", + "description": "Transform audio from one voice to another. Maintain full control over emotion, timing and delivery.", + "operationId": "speech_to_speech_full", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "enable_logging", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "title": "Enable request logging.", + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.", + "default": true + }, + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers." + }, + { + "name": "optimize_streaming_latency", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "DEPRECATED. How much we should optimize streaming request latency (time to first audio byte).", + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "type": "string", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "alaw_8000", + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_128", + "mp3_44100_192", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "opus_48000_128", + "opus_48000_192", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "pcm_8000", + "ulaw_8000", + "wav_16000", + "wav_22050", + "wav_24000", + "wav_32000", + "wav_44100", + "wav_48000", + "wav_8000" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Speech_to_Speech_v1_speech_to_speech__voice_id__post" + } + } + } + }, + "responses": { + "200": { + "description": "The generated audio file", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "speech_to_speech", + "x-fern-sdk-method-name": "convert" + } + }, + "/v1/speech-to-speech/{voice_id}/stream": { + "post": { + "tags": [ + "speech-to-speech" + ], + "summary": "Speech To Speech Streaming", + "description": "Stream audio from one voice to another. Maintain full control over emotion, timing and delivery.", + "operationId": "speech_to_speech_stream", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "enable_logging", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "title": "Enable request logging.", + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.", + "default": true + }, + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers." + }, + { + "name": "optimize_streaming_latency", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "DEPRECATED. How much we should optimize streaming request latency (time to first audio byte).", + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + "description": "You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values:\n0 - default mode (no latency optimizations)\n1 - normal latency optimizations (about 50% of possible latency improvement of option 3)\n2 - strong latency optimizations (about 75% of possible latency improvement of option 3)\n3 - max latency optimizations\n4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates).\n\nDefaults to None.\n", + "deprecated": true + }, + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "type": "string", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Speech_to_Speech_Streaming_v1_speech_to_speech__voice_id__stream_post" + } + } + } + }, + "responses": { + "200": { + "description": "Streaming audio data", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "speech_to_speech", + "x-fern-sdk-method-name": "stream", + "x-fern-streaming": true + } + }, + "/v1/text-to-voice/create-previews": { + "post": { + "tags": [ + "text-to-voice" + ], + "summary": "[Deprecated] Generate A Voice Preview From Description", + "description": "**Deprecated.** Use `POST /v1/text-to-voice/design` instead. Generate a custom voice based on voice description. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create the voice use `POST /v1/text-to-voice` with the chosen `generated_voice_id`.", + "operationId": "text_to_voice", + "deprecated": true, + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_192" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoicePreviewsRequestModel" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoicePreviewsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_voice", + "x-fern-sdk-method-name": "create_previews" + } + }, + "/v1/text-to-voice": { + "post": { + "tags": [ + "text-to-voice" + ], + "summary": "Create A New Voice From Voice Preview", + "description": "Create a voice from previously generated voice preview. This endpoint should be called after you fetched a generated_voice_id using POST /v1/text-to-voice/design or POST /v1/text-to-voice/:voice_id/remix.", + "operationId": "create_voice", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_a_new_voice_from_voice_preview_v1_text_to_voice_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_voice", + "x-fern-sdk-method-name": "create" + } + }, + "/v1/text-to-voice/design": { + "post": { + "tags": [ + "text-to-voice" + ], + "summary": "Design A Voice.", + "description": "Design a voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint.", + "operationId": "text_to_voice_design", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_192" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceDesignRequestModel" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoicePreviewsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_voice", + "x-fern-sdk-method-name": "design" + } + }, + "/v1/text-to-voice/{voice_id}/remix": { + "post": { + "tags": [ + "text-to-voice" + ], + "summary": "Remix A Voice.", + "description": "Remix an existing voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint.", + "operationId": "text_to_voice_remix", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_192" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceRemixRequestModel" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoicePreviewsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "text_to_voice", + "x-fern-sdk-method-name": "remix" + } + }, + "/v1/text-to-voice/{generated_voice_id}/stream": { + "get": { + "tags": [ + "text-to-voice" + ], + "summary": "Text To Voice Preview Streaming", + "description": "Stream a voice preview that was created via the /v1/text-to-voice/design endpoint.", + "operationId": "text_to_voice_preview_stream", + "parameters": [ + { + "name": "generated_voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The generated_voice_id to stream.", + "examples": [ + "37HceQefKmEi3bGovXjL" + ], + "embed": true, + "title": "Generated Voice Id" + }, + "description": "The generated_voice_id to stream." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Streaming audio data", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "text_to_voice", + "preview" + ], + "x-fern-sdk-method-name": "stream", + "x-fern-streaming": true + } + }, + "/v1/user": { + "get": { + "summary": "Get User Info", + "description": "Gets information about the user", + "operationId": "get_user_info", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "user", + "x-fern-sdk-method-name": "get" + } + }, + "/v1/user/subscription": { + "get": { + "summary": "Get User Subscription Info", + "description": "Gets extended information about the users subscription", + "operationId": "get_user_subscription_info", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedSubscriptionResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "user", + "subscription" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/voices": { + "get": { + "tags": [ + "voices" + ], + "summary": "List Voices", + "description": "Returns a list of all available voices for a user. Stops working once the user's workspace exceeds 500 voices.", + "operationId": "get_voices", + "parameters": [ + { + "name": "show_legacy", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "If set to true, legacy premade voices will be included in responses from /v1/voices", + "examples": [ + true + ], + "default": false, + "title": "Show Legacy" + }, + "description": "If set to true, legacy premade voices will be included in responses from /v1/voices" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetVoicesResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "voices", + "x-fern-sdk-method-name": "get_all" + } + }, + "/v2/voices": { + "get": { + "tags": [ + "voices" + ], + "summary": "Get Voices V2", + "description": "Gets a list of all available voices for a user with search, filtering and pagination.", + "operationId": "get_user_voices_v2", + "parameters": [ + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The next page token to use for pagination. Returned from the previous request. Use this in combination with the has_more flag for reliable pagination.", + "examples": [ + "0" + ], + "title": "Next Page Token" + }, + "description": "The next page token to use for pagination. Returned from the previous request. Use this in combination with the has_more flag for reliable pagination." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "description": "How many voices to return at maximum. Can not exceed 100, defaults to 10. Page 0 may include more voices due to default voices being included.", + "default": 10, + "title": "Page Size" + }, + "description": "How many voices to return at maximum. Can not exceed 100, defaults to 10. Page 0 may include more voices due to default voices being included." + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Search term to filter voices by. Searches in name, description, labels, category.", + "title": "Search" + }, + "description": "Search term to filter voices by. Searches in name, description, labels, category." + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Which field to sort by, one of 'created_at_unix' or 'name'. 'created_at_unix' may not be available for older voices.", + "examples": [ + "created_at_unix" + ], + "title": "Sort" + }, + "description": "Which field to sort by, one of 'created_at_unix' or 'name'. 'created_at_unix' may not be available for older voices." + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Which direction to sort the voices in. 'asc' or 'desc'.", + "examples": [ + "desc" + ], + "title": "Sort Direction" + }, + "description": "Which direction to sort the voices in. 'asc' or 'desc'." + }, + { + "name": "voice_type", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'non-community', 'saved'. 'non-default' is equal to all but 'default'. 'non-community' is equal to 'personal' and 'workspace' combined (excludes library copies). 'saved' is equal to non-default, but includes default voices if they have been added to a collection.", + "title": "Voice Type" + }, + "description": "Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'non-community', 'saved'. 'non-default' is equal to all but 'default'. 'non-community' is equal to 'personal' and 'workspace' combined (excludes library copies). 'saved' is equal to non-default, but includes default voices if they have been added to a collection." + }, + { + "name": "category", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional'", + "title": "Category" + }, + "description": "Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional'" + }, + { + "name": "fine_tuning_state", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "State of the voice's fine tuning to filter by. Applicable only to professional voices clones. One of 'draft', 'not_verified', 'not_started', 'queued', 'fine_tuning', 'fine_tuned', 'failed', 'delayed'", + "title": "Fine Tuning State" + }, + "description": "State of the voice's fine tuning to filter by. Applicable only to professional voices clones. One of 'draft', 'not_verified', 'not_started', 'queued', 'fine_tuning', 'fine_tuned', 'failed', 'delayed'" + }, + { + "name": "collection_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Collection ID to filter voices by.", + "title": "Collection Id" + }, + "description": "Collection ID to filter voices by." + }, + { + "name": "include_total_count", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to include the total count of voices found in the response. NOTE: The total_count value is a live snapshot and may change between requests as users create, modify, or delete voices. For pagination, rely on the has_more flag instead. Only enable this when you actually need the total count (e.g., for display purposes), as it incurs a performance cost.", + "examples": [ + true + ], + "default": true, + "title": "Include Total Count" + }, + "description": "Whether to include the total count of voices found in the response. NOTE: The total_count value is a live snapshot and may change between requests as users create, modify, or delete voices. For pagination, rely on the has_more flag instead. Only enable this when you actually need the total count (e.g., for display purposes), as it incurs a performance cost." + }, + { + "name": "voice_ids", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Voice IDs to lookup by. Maximum 100 voice IDs.", + "title": "Voice Ids" + }, + "description": "Voice IDs to lookup by. Maximum 100 voice IDs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetVoicesV2ResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "voices", + "x-fern-sdk-method-name": "search" + } + }, + "/v1/voices/settings/default": { + "get": { + "tags": [ + "voices" + ], + "summary": "Get Default Voice Settings.", + "description": "Gets the default settings for voices. \"similarity_boost\" corresponds to\"Clarity + Similarity Enhancement\" in the web app and \"stability\" corresponds to \"Stability\" slider in the web app.", + "operationId": "get_voice_settings_default", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceSettingsResponseModel" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "settings" + ], + "x-fern-sdk-method-name": "get_default" + } + }, + "/v1/voices/{voice_id}/settings": { + "get": { + "tags": [ + "voices" + ], + "summary": "Get Voice Settings", + "description": "Returns the settings for a specific voice. \"similarity_boost\" corresponds to\"Clarity + Similarity Enhancement\" in the web app and \"stability\" corresponds to \"Stability\" slider in the web app.", + "operationId": "get_voice_settings", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceSettingsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "settings" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/voices/{voice_id}": { + "get": { + "tags": [ + "voices" + ], + "summary": "Get Voice", + "description": "Returns metadata about a specific voice.", + "operationId": "get_voice_by_id", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "with_settings", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "This parameter is now deprecated. It is ignored and will be removed in a future version.", + "deprecated": true, + "default": true, + "title": "With Settings" + }, + "description": "This parameter is now deprecated. It is ignored and will be removed in a future version.", + "deprecated": true + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "voices", + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "voices" + ], + "summary": "Delete Voice", + "description": "Deletes a voice by its ID.", + "operationId": "delete_voice", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVoiceResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "voices", + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/voices/{voice_id}/settings/edit": { + "post": { + "tags": [ + "voices" + ], + "summary": "Edit Voice Settings", + "description": "Edit your settings for a specific voice. \"similarity_boost\" corresponds to \"Clarity + Similarity Enhancement\" in the web app and \"stability\" corresponds to \"Stability\" slider in the web app.", + "operationId": "edit_voice_settings", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceSettingsResponseModel", + "description": "The settings for a specific voice." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditVoiceSettingsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "settings" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/voices/add": { + "post": { + "tags": [ + "voices" + ], + "summary": "Add Voice", + "description": "Add a new voice to your collection of voices in VoiceLab.", + "operationId": "add_voice", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Add_voice_v1_voices_add_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddVoiceIVCResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "ivc" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/voices/{voice_id}/edit": { + "post": { + "tags": [ + "voices" + ], + "summary": "Edit Voice", + "description": "Edit a voice created by you.", + "operationId": "edit_voice", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Edit_voice_v1_voices__voice_id__edit_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditVoiceResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "voices", + "x-fern-sdk-method-name": "update" + } + }, + "/v1/voices/add/{public_user_id}/{voice_id}": { + "post": { + "tags": [ + "voices" + ], + "summary": "Add Shared Voice", + "description": "Add a shared voice to your collection of voices.", + "operationId": "add_sharing_voice", + "parameters": [ + { + "name": "public_user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Public user ID used to publicly identify ElevenLabs users.", + "examples": [ + "63e06b7e7cafdc46be4d2e0b3f045940231ae058d508589653d74d1265a574ca" + ], + "title": "Public User Id" + }, + "description": "Public user ID used to publicly identify ElevenLabs users." + }, + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Add_shared_voice_v1_voices_add__public_user_id___voice_id__post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddVoiceResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "voices", + "x-fern-sdk-method-name": "share" + } + }, + "/v1/studio/podcasts": { + "post": { + "tags": [ + "studio" + ], + "summary": "Create Podcast", + "description": "Create and auto-convert a podcast project. Currently, the LLM cost is covered by us but you will still be charged for the audio generation. In the future, you will be charged for both the LLM and audio generation costs.", + "operationId": "create_podcast", + "parameters": [ + { + "name": "safety-identifier", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for moderation. Your workspace must be allowlisted to use this feature.", + "title": "Safety-Identifier" + }, + "description": "Used for moderation. Your workspace must be allowlisted to use this feature." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_podcast_v1_studio_podcasts_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PodcastProjectResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "studio", + "x-fern-sdk-method-name": "create_podcast" + } + }, + "/v1/music/video-to-music": { + "post": { + "tags": [ + "video-to-music" + ], + "summary": "Video To Music", + "description": "Generate background music from one or more video files. Videos are combined in order. Optional description and style tags influence the generated music.", + "operationId": "video_to_music", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Video_to_Music_v1_music_video_to_music_post" + } + } + } + }, + "responses": { + "200": { + "description": "Generated audio file matching the video. Content-Type and file extension depend on the output_format parameter (default mp3).", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "403": { + "description": "Subscription required." + }, + "422": { + "description": "Validation error (e.g. invalid or missing videos)." + } + }, + "x-fern-sdk-group-name": "music", + "x-fern-sdk-method-name": "video_to_music" + } + }, + "/v1/studio/projects/{project_id}/pronunciation-dictionaries": { + "post": { + "tags": [ + "studio" + ], + "summary": "Create Pronunciation Dictionaries", + "description": "Create a set of pronunciation dictionaries acting on a project. This will automatically mark text within this project as requiring reconverting where the new dictionary would apply or the old one no longer does.", + "operationId": "update_pronunciation_dictionaries", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_Pronunciation_Dictionaries_v1_studio_projects__project_id__pronunciation_dictionaries_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePronunciationDictionaryResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "pronunciation_dictionaries" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/studio/projects": { + "get": { + "tags": [ + "studio" + ], + "summary": "List Studio Projects", + "description": "Returns a list of your Studio projects with metadata.", + "operationId": "get_projects", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetProjectsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects" + ], + "x-fern-sdk-method-name": "list" + }, + "post": { + "tags": [ + "studio" + ], + "summary": "Create Studio Project", + "description": "Creates a new Studio project, it can be either initialized as blank, from a document or from a URL.", + "operationId": "add_project", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Create_Studio_project_v1_studio_projects_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddProjectResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/studio/projects/{project_id}": { + "post": { + "tags": [ + "studio" + ], + "summary": "Update Studio Project", + "description": "Updates the specified Studio project by setting the values of the parameters passed.", + "operationId": "edit_project", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_Studio_project_v1_studio_projects__project_id__post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditProjectResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects" + ], + "x-fern-sdk-method-name": "update" + }, + "get": { + "tags": [ + "studio" + ], + "summary": "Get Studio Project", + "description": "Returns information about a specific Studio project. This endpoint returns more detailed information about a project than `GET /v1/studio`.", + "operationId": "get_project_by_id", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "share_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The share ID of the project", + "title": "Share Id" + }, + "description": "The share ID of the project" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectExtendedResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects" + ], + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "studio" + ], + "summary": "Delete Studio Project", + "description": "Deletes a Studio project.", + "operationId": "delete_project", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteProjectResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/studio/projects/{project_id}/content": { + "post": { + "tags": [ + "studio" + ], + "summary": "Update Studio Project Content", + "description": "Updates Studio project content.", + "operationId": "edit_project_content", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Update_Studio_project_content_v1_studio_projects__project_id__content_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditProjectResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "content" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/studio/projects/{project_id}/convert": { + "post": { + "tags": [ + "studio" + ], + "summary": "Convert Studio Project", + "description": "Starts conversion of a Studio project and all of its chapters.", + "operationId": "convert_project_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvertProjectResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects" + ], + "x-fern-sdk-method-name": "convert" + } + }, + "/v1/studio/projects/{project_id}/snapshots": { + "get": { + "tags": [ + "studio" + ], + "summary": "List Studio Project Snapshots", + "description": "Retrieves a list of snapshots for a Studio project.", + "operationId": "get_project_snapshots", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectSnapshotsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "snapshots" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/studio/projects/{project_id}/snapshots/{project_snapshot_id}": { + "get": { + "tags": [ + "studio" + ], + "summary": "Get Project Snapshot", + "description": "Returns the project snapshot.", + "operationId": "get_project_snapshot_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "project_snapshot_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project snapshot.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Snapshot Id" + }, + "description": "The ID of the Studio project snapshot." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectSnapshotExtendedResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "snapshots" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/studio/projects/{project_id}/snapshots/{project_snapshot_id}/stream": { + "post": { + "tags": [ + "studio" + ], + "summary": "Stream Studio Project Audio", + "description": "Stream the audio from a Studio project snapshot.", + "operationId": "stream_project_snapshot_audio_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "project_snapshot_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project snapshot.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Snapshot Id" + }, + "description": "The ID of the Studio project snapshot." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Stream_Studio_project_audio_v1_studio_projects__project_id__snapshots__project_snapshot_id__stream_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "snapshots" + ], + "x-fern-sdk-method-name": "stream", + "x-fern-streaming": true + } + }, + "/v1/studio/projects/{project_id}/snapshots/{project_snapshot_id}/archive": { + "post": { + "tags": [ + "studio" + ], + "summary": "Stream Archive With Studio Project Audio", + "description": "Returns a compressed archive of the Studio project's audio.", + "operationId": "stream_project_snapshot_archive_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "project_snapshot_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project snapshot.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Snapshot Id" + }, + "description": "The ID of the Studio project snapshot." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Streaming archive data", + "content": { + "application/x-zip": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "snapshots" + ], + "x-fern-sdk-method-name": "stream_archive" + } + }, + "/v1/studio/projects/{project_id}/chapters": { + "get": { + "tags": [ + "studio" + ], + "summary": "List Chapters", + "description": "Returns a list of a Studio project's chapters.", + "operationId": "get_chapters", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetChaptersResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "chapters" + ], + "x-fern-sdk-method-name": "list" + }, + "post": { + "tags": [ + "studio" + ], + "summary": "Create Chapter", + "description": "Creates a new chapter either as blank or from a URL.", + "operationId": "add_chapter", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_chapter_v1_studio_projects__project_id__chapters_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddChapterResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "chapters" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/studio/projects/{project_id}/chapters/{chapter_id}": { + "get": { + "tags": [ + "studio" + ], + "summary": "Get Chapter", + "description": "Returns information about a specific chapter.", + "operationId": "get_chapter_by_id_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "chapter_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the chapter.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Chapter Id" + }, + "description": "The ID of the chapter." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChapterWithContentResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "chapters" + ], + "x-fern-sdk-method-name": "get" + }, + "post": { + "tags": [ + "studio" + ], + "summary": "Update Chapter", + "description": "Updates a chapter.", + "operationId": "edit_chapter", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "chapter_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the chapter.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Chapter Id" + }, + "description": "The ID of the chapter." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_chapter_v1_studio_projects__project_id__chapters__chapter_id__post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditChapterResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "chapters" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "studio" + ], + "summary": "Delete Chapter", + "description": "Deletes a chapter.", + "operationId": "delete_chapter_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "chapter_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the chapter.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Chapter Id" + }, + "description": "The ID of the chapter." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteChapterResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "chapters" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/studio/projects/{project_id}/chapters/{chapter_id}/convert": { + "post": { + "tags": [ + "studio" + ], + "summary": "Convert Chapter", + "description": "Starts conversion of a specific chapter.", + "operationId": "convert_chapter_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "chapter_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the chapter.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Chapter Id" + }, + "description": "The ID of the chapter." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvertChapterResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "chapters" + ], + "x-fern-sdk-method-name": "convert" + } + }, + "/v1/studio/projects/{project_id}/chapters/{chapter_id}/snapshots": { + "get": { + "tags": [ + "studio" + ], + "summary": "List Chapter Snapshots", + "description": "Gets information about all the snapshots of a chapter. Each snapshot can be downloaded as audio. Whenever a chapter is converted a snapshot will automatically be created.", + "operationId": "get_chapter_snapshots", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "chapter_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the chapter.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Chapter Id" + }, + "description": "The ID of the chapter." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChapterSnapshotsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "chapters", + "snapshots" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/studio/projects/{project_id}/chapters/{chapter_id}/snapshots/{chapter_snapshot_id}": { + "get": { + "tags": [ + "studio" + ], + "summary": "Get Chapter Snapshot", + "description": "Returns the chapter snapshot.", + "operationId": "get_chapter_snapshot_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "chapter_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the chapter.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Chapter Id" + }, + "description": "The ID of the chapter." + }, + { + "name": "chapter_snapshot_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the chapter snapshot.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Chapter Snapshot Id" + }, + "description": "The ID of the chapter snapshot." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChapterSnapshotExtendedResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "chapters", + "snapshots" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/studio/projects/{project_id}/chapters/{chapter_id}/snapshots/{chapter_snapshot_id}/stream": { + "post": { + "tags": [ + "studio" + ], + "summary": "Stream Chapter Audio", + "description": "Stream the audio from a chapter snapshot. Use `GET /v1/studio/projects/{project_id}/chapters/{chapter_id}/snapshots` to return the snapshots of a chapter.", + "operationId": "stream_chapter_snapshot_audio", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "chapter_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the chapter.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Chapter Id" + }, + "description": "The ID of the chapter." + }, + { + "name": "chapter_snapshot_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the chapter snapshot.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Chapter Snapshot Id" + }, + "description": "The ID of the chapter snapshot." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Stream_chapter_audio_v1_studio_projects__project_id__chapters__chapter_id__snapshots__chapter_snapshot_id__stream_post" + } + } + } + }, + "responses": { + "200": { + "description": "Streaming audio data", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects", + "chapters", + "snapshots" + ], + "x-fern-sdk-method-name": "stream", + "x-fern-streaming": true + } + }, + "/v1/studio/projects/{project_id}/muted-tracks": { + "get": { + "tags": [ + "studio" + ], + "summary": "Get Project Muted Tracks", + "description": "Returns a list of chapter IDs that have muted tracks in a project.", + "operationId": "get_project_muted_tracks_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectMutedTracksResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "studio", + "projects" + ], + "x-fern-sdk-method-name": "get_muted_tracks" + } + }, + "/v1/dubbing/resource/{dubbing_id}": { + "get": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Get The Dubbing Resource For An Id.", + "description": "Given a dubbing ID generated from the '/v1/dubbing' endpoint with studio enabled, returns the dubbing resource.", + "operationId": "get_dubbing_resource", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DubbingResource" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/dubbing/resource/{dubbing_id}/language": { + "post": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Add A Language To The Resource", + "description": "Adds the given ElevenLab Turbo V2/V2.5 language code to the resource. Does not automatically generate transcripts/translations/audio.", + "operationId": "add_language", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Add_a_language_to_the_resource_v1_dubbing_resource__dubbing_id__language_post" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LanguageAddedResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource", + "language" + ], + "x-fern-sdk-method-name": "add" + } + }, + "/v1/dubbing/resource/{dubbing_id}/speaker/{speaker_id}/segment": { + "post": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Create A Segment For The Speaker", + "description": "Creates a new segment in dubbing resource with a start and end time for the speaker in every available language. Does not automatically generate transcripts/translations/audio.", + "operationId": "create_clip", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "speaker_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the speaker.", + "title": "Speaker Id" + }, + "description": "ID of the speaker." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentCreatePayload", + "description": "The text, and start and end times of a segment." + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentCreateResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource", + "speaker", + "segment" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/dubbing/resource/{dubbing_id}/segment/{segment_id}/{language}": { + "patch": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Modify A Single Segment", + "description": "Modifies a single segment with new text and/or start/end times. Will update the values for only a specific language of a segment. Does not automatically regenerate the dub.", + "operationId": "update_segment_language", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "segment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the segment", + "title": "Segment Id" + }, + "description": "ID of the segment" + }, + { + "name": "language", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the language.", + "title": "Language" + }, + "description": "ID of the language." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentUpdatePayload", + "description": "The text, and start and end times of a segment." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentUpdateResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource", + "segment" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/dubbing/resource/{dubbing_id}/migrate-segments": { + "post": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Move Segments Between Speakers", + "description": "Change the attribution of one or more segments to a different speaker.", + "operationId": "migrate_segments", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Move_segments_between_speakers_v1_dubbing_resource__dubbing_id__migrate_segments_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentMigrationResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource" + ], + "x-fern-sdk-method-name": "migrate_segments" + } + }, + "/v1/dubbing/resource/{dubbing_id}/segment/{segment_id}": { + "delete": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Deletes A Single Segment", + "description": "Deletes a single segment from the dubbing.", + "operationId": "delete_segment", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "segment_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the segment", + "title": "Segment Id" + }, + "description": "ID of the segment" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentDeleteResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource", + "segment" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/dubbing/resource/{dubbing_id}/transcribe": { + "post": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Transcribes Segments", + "description": "Regenerate the transcriptions for the specified segments. Does not automatically regenerate translations or dubs.", + "operationId": "transcribe", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Transcribes_segments_v1_dubbing_resource__dubbing_id__transcribe_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentTranscriptionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource" + ], + "x-fern-sdk-method-name": "transcribe" + } + }, + "/v1/dubbing/resource/{dubbing_id}/translate": { + "post": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Translates All Or Some Segments And Languages", + "description": "Regenerate the translations for either the entire resource or the specified segments/languages. Will automatically transcribe missing transcriptions. Will not automatically regenerate the dubs.", + "operationId": "translate", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Translates_all_or_some_segments_and_languages_v1_dubbing_resource__dubbing_id__translate_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentTranslationResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource" + ], + "x-fern-sdk-method-name": "translate" + } + }, + "/v1/dubbing/resource/{dubbing_id}/dub": { + "post": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Dubs All Or Some Segments And Languages", + "description": "Regenerate the dubs for either the entire resource or the specified segments/languages. Will automatically transcribe and translate any missing transcriptions and translations.", + "operationId": "dub", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Dubs_all_or_some_segments_and_languages_v1_dubbing_resource__dubbing_id__dub_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentDubResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource" + ], + "x-fern-sdk-method-name": "dub" + } + }, + "/v1/dubbing/resource/{dubbing_id}/speaker/{speaker_id}": { + "patch": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Update Metadata For A Speaker", + "description": "Amend the metadata associated with a speaker, such as their voice. Both voice cloning and using voices from the ElevenLabs library are supported.", + "operationId": "update_speaker", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "speaker_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the speaker.", + "title": "Speaker Id" + }, + "description": "ID of the speaker." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_metadata_for_a_speaker_v1_dubbing_resource__dubbing_id__speaker__speaker_id__patch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpeakerUpdatedResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource", + "speaker" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/dubbing/resource/{dubbing_id}/speaker": { + "post": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Create A New Speaker", + "operationId": "create_speaker", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_a_new_speaker_v1_dubbing_resource__dubbing_id__speaker_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpeakerCreatedResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource", + "speaker" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/dubbing/resource/{dubbing_id}/speaker/{speaker_id}/similar-voices": { + "get": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Search The Elevenlabs Library For Voices Similar To A Speaker.", + "description": "Fetch the top 10 similar voices to a speaker, including the voice IDs, names, descriptions, and, where possible, a sample audio recording.", + "operationId": "get_similar_voices_for_speaker", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "speaker_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the speaker.", + "title": "Speaker Id" + }, + "description": "ID of the speaker." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimilarVoicesForSpeakerResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource", + "speaker" + ], + "x-fern-sdk-method-name": "find_similar_voices" + } + }, + "/v1/dubbing/resource/{dubbing_id}/render/{language}": { + "post": { + "tags": [ + "dubbing", + "dubbing", + "resource", + "segment", + "enterprise" + ], + "summary": "Render Audio Or Video For The Given Language", + "description": "Regenerate the output media for a language using the latest Studio state. Please ensure all segments have been dubbed before rendering, otherwise they will be omitted. Renders are generated asynchronously, and to check the status of all renders please use the 'Get Dubbing Resource' endpoint.", + "operationId": "render", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "language", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The target language code to render, eg. 'es'. To render the source track use 'original'.", + "title": "Language" + }, + "description": "The target language code to render, eg. 'es'. To render the source track use 'original'." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Render_audio_or_video_for_the_given_language_v1_dubbing_resource__dubbing_id__render__language__post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DubbingRenderResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "resource" + ], + "x-fern-sdk-method-name": "render" + } + }, + "/v1/dubbing": { + "get": { + "tags": [ + "dubbing", + "dubbing", + "dubbing" + ], + "summary": "List Dubs", + "description": "List the dubs you have access to.", + "operationId": "list_dubs", + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 200, + "minimum": 1, + "description": "How many dubs to return at maximum. Can not exceed 200, defaults to 100.", + "default": 100, + "title": "Page Size" + }, + "description": "How many dubs to return at maximum. Can not exceed 200, defaults to 100." + }, + { + "name": "dubbing_status", + "in": "query", + "required": false, + "schema": { + "enum": [ + "dubbing", + "dubbed", + "failed" + ], + "type": "string", + "description": "What state the dub is currently in.", + "embed": true, + "title": "Dubbing Status" + }, + "description": "What state the dub is currently in." + }, + { + "name": "filter_by_creator", + "in": "query", + "required": false, + "schema": { + "enum": [ + "personal", + "others", + "all" + ], + "type": "string", + "description": "Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them.", + "examples": [ + "all" + ], + "default": "all", + "title": "Filter By Creator" + }, + "description": "Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them." + }, + { + "name": "order_by", + "in": "query", + "required": false, + "schema": { + "const": "created_at", + "type": "string", + "description": "The field to use for ordering results from this query.", + "default": "created_at", + "title": "Order By" + }, + "description": "The field to use for ordering results from this query." + }, + { + "name": "order_direction", + "in": "query", + "required": false, + "schema": { + "enum": [ + "DESCENDING", + "ASCENDING" + ], + "type": "string", + "description": "The order direction to use for results from this query.", + "default": "DESCENDING", + "title": "Order Direction" + }, + "description": "The order direction to use for results from this query." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DubbingMetadataPageResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "dubbing", + "x-fern-sdk-method-name": "list" + }, + "post": { + "tags": [ + "dubbing", + "dubbing", + "dubbing" + ], + "summary": "Dub A Video Or An Audio File", + "description": "Dubs a provided audio or video file into given language.", + "operationId": "create_dubbing", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Dub_a_video_or_an_audio_file_v1_dubbing_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DoDubbingResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "dubbing", + "x-fern-sdk-method-name": "create" + } + }, + "/v1/dubbing/{dubbing_id}": { + "get": { + "tags": [ + "dubbing", + "dubbing", + "dubbing" + ], + "summary": "Get Dubbing", + "description": "Returns metadata about a dubbing project, including whether it's still in progress or not", + "operationId": "get_dubbed_metadata", + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DubbingMetadataResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "dubbing", + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "dubbing", + "dubbing", + "dubbing" + ], + "summary": "Delete Dubbing", + "description": "Deletes a dubbing project.", + "operationId": "delete_dubbing", + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteDubbingResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "dubbing", + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/dubbing/{dubbing_id}/audio/{language_code}": { + "get": { + "tags": [ + "dubbing", + "dubbing", + "dubbing" + ], + "summary": "Get Dubbed File", + "description": "Returns dub as a streamed MP3 or MP4 file. If this dub has been edited using Dubbing Studio you need to use the resource render endpoint as this endpoint only returns the original automatic dub result.", + "operationId": "get_dubbed_file", + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "language_code", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the language.", + "title": "Language Code" + }, + "description": "ID of the language." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "The dubbed audio or video file", + "content": { + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/mp4": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "403": { + "description": "Permission denied", + "content": { + "application/json": { + "example": { + "error": "permission_denied", + "message": "User does not have required permissions" + } + } + } + }, + "404": { + "description": "Dubbing not found", + "content": { + "application/json": { + "example": { + "error": "dubbing_not_found", + "message": "There is no dubbing for language {language_code}." + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + }, + "425": { + "description": "Dubbing not ready", + "content": { + "application/json": { + "example": { + "error": "dubbing_not_dubbed", + "message": "Dubbing has not finished yet." + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "audio" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/dubbing/{dubbing_id}/transcript/{language_code}": { + "get": { + "tags": [ + "dubbing", + "dubbing", + "dubbing" + ], + "summary": "Get Dubbed Transcript", + "description": "Returns transcript for the dub as an SRT or WEBVTT file.", + "operationId": "get_dubbed_transcript_file", + "deprecated": true, + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "language_code", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ISO-693 language code to retrieve the transcript for. Use 'source' to fetch the transcript of the original media.", + "examples": [ + "source", + "en", + "fra" + ], + "title": "Language Code" + }, + "description": "ISO-693 language code to retrieve the transcript for. Use 'source' to fetch the transcript of the original media." + }, + { + "name": "format_type", + "in": "query", + "required": false, + "schema": { + "enum": [ + "srt", + "webvtt", + "json" + ], + "type": "string", + "description": "Format to return transcript in. For subtitles use either 'srt' or 'webvtt', and for a full transcript use 'json'. The 'json' format is not yet supported for Dubbing Studio.", + "embed": true, + "default": "srt", + "title": "Format Type" + }, + "description": "Format to return transcript in. For subtitles use either 'srt' or 'webvtt', and for a full transcript use 'json'. The 'json' format is not yet supported for Dubbing Studio." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/DubbingTranscriptResponseModel" + }, + { + "type": "string" + } + ], + "title": "Response Get Dubbed Transcript V1 Dubbing Dubbing Id Transcript Language Code Get" + } + }, + "text/plain": { + "schema": { + "type": "string" + }, + "example": "1\n00:00:01,000 --> 00:00:04,000\nHello, this is the first subtitle line\n\n2\n00:00:05,000 --> 00:00:07,000\nAnd here's the second subtitle line" + } + } + }, + "403": { + "description": "Anonymous users cannot use this function", + "content": { + "application/json": { + "example": { + "error": "anonymous_not_allowed", + "message": "Anonymous users cannot use this function" + } + } + } + }, + "404": { + "description": "Dubbing or transcript not found", + "content": { + "application/json": { + "example": { + "error": "transcript_not_found", + "message": "No transcript was found for the dub." + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + }, + "425": { + "description": "Dubbing not ready", + "content": { + "application/json": { + "example": { + "error": "dubbing_not_dubbed", + "message": "Dubbing has not finished yet." + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "transcript" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/dubbing/{dubbing_id}/transcripts/{language_code}/format/{format_type}": { + "get": { + "tags": [ + "dubbing", + "dubbing", + "dubbing" + ], + "summary": "Retrieve A Transcript", + "description": "Fetch the transcript for one of the languages in a dub.", + "operationId": "get_dubbing_transcripts", + "parameters": [ + { + "name": "dubbing_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the dubbing project.", + "title": "Dubbing Id" + }, + "description": "ID of the dubbing project." + }, + { + "name": "language_code", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ISO-693 language code to retrieve the transcript for. Use 'source' to fetch the transcript of the original media.", + "examples": [ + "source", + "en", + "fra" + ], + "title": "Language Code" + }, + "description": "ISO-693 language code to retrieve the transcript for. Use 'source' to fetch the transcript of the original media." + }, + { + "name": "format_type", + "in": "path", + "required": true, + "schema": { + "enum": [ + "srt", + "webvtt", + "json" + ], + "type": "string", + "description": "Format to return transcript in. For subtitles use either 'srt' or 'webvtt', and for a full transcript use 'json'. The 'json' format is not yet supported for Dubbing Studio.", + "examples": [ + "srt", + "webvtt", + "json" + ], + "title": "Format Type" + }, + "description": "Format to return transcript in. For subtitles use either 'srt' or 'webvtt', and for a full transcript use 'json'. The 'json' format is not yet supported for Dubbing Studio." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DubbingTranscriptsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "dubbing", + "transcripts" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/models": { + "get": { + "tags": [ + "models" + ], + "summary": "Get Models", + "description": "Gets a list of available models.", + "operationId": "get_models", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ModelResponseModel" + }, + "title": "Response Get Models V1 Models Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "models", + "x-fern-sdk-method-name": "list" + } + }, + "/v1/audio-native": { + "post": { + "tags": [ + "audio-native" + ], + "summary": "Creates Audio Native Enabled Project.", + "description": "Creates Audio Native enabled project, optionally starts conversion and returns project ID and embeddable HTML snippet.", + "operationId": "create_audio_native_project", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Creates_Audio_Native_enabled_project__v1_audio_native_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AudioNativeCreateProjectResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "audio_native", + "x-fern-sdk-method-name": "create" + } + }, + "/v1/audio-native/{project_id}/settings": { + "get": { + "tags": [ + "audio-native" + ], + "summary": "Get Audio Native Project Settings", + "description": "Get player settings for the specific project.", + "operationId": "get_audio_native_project_settings_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAudioNativeProjectSettingsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "audio_native", + "x-fern-sdk-method-name": "get_settings" + } + }, + "/v1/audio-native/{project_id}/content": { + "post": { + "tags": [ + "audio-native" + ], + "summary": "Update Audio-Native Project Content", + "description": "Updates content for the specific AudioNative Project.", + "operationId": "audio_native_project_update_content_endpoint", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the Studio project.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Project Id" + }, + "description": "The ID of the Studio project." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Update_audio_native_Project_content_v1_audio_native__project_id__content_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AudioNativeEditContentResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "audio_native", + "x-fern-sdk-method-name": "update" + } + }, + "/v1/audio-native/content": { + "post": { + "tags": [ + "audio-native" + ], + "summary": "Update Audio-Native Content From Url", + "description": "Finds an AudioNative project matching the provided URL, extracts content from the URL, updates the project content, and queues it for conversion and auto-publishing.", + "operationId": "audio_native_update_content_from_url", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_audio_native_content_from_URL_v1_audio_native_content_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AudioNativeEditContentResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "audio_native", + "x-fern-sdk-method-name": "update_content_from_url" + } + }, + "/v1/shared-voices": { + "get": { + "tags": [ + "voices" + ], + "summary": "Get Voices", + "description": "Retrieves a list of shared voices.", + "operationId": "get_library_voices", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "description": "How many shared voices to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many shared voices to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "category", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Voice category used for filtering", + "examples": [ + "professional" + ], + "enum": [ + "professional", + "famous", + "high_quality" + ], + "title": "Category" + }, + "description": "Voice category used for filtering" + }, + { + "name": "gender", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Gender used for filtering", + "examples": [ + "male" + ], + "title": "Gender" + }, + "description": "Gender used for filtering" + }, + { + "name": "age", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Age used for filtering", + "examples": [ + "young" + ], + "title": "Age" + }, + "description": "Age used for filtering" + }, + { + "name": "accent", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Accent used for filtering", + "examples": [ + "american" + ], + "title": "Accent" + }, + "description": "Accent used for filtering" + }, + { + "name": "language", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Language used for filtering", + "examples": [ + "en" + ], + "title": "Language" + }, + "description": "Language used for filtering" + }, + { + "name": "locale", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Locale used for filtering", + "examples": [ + "en-US" + ], + "title": "Locale" + }, + "description": "Locale used for filtering" + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Search term used for filtering", + "examples": [ + "tiktok" + ], + "title": "Search" + }, + "description": "Search term used for filtering" + }, + { + "name": "use_cases", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Use-case used for filtering", + "examples": [ + "audiobook" + ], + "title": "Use Cases" + }, + "description": "Use-case used for filtering" + }, + { + "name": "descriptives", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Search term used for filtering", + "examples": [ + "tiktok" + ], + "title": "Descriptives" + }, + "description": "Search term used for filtering" + }, + { + "name": "featured", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Filter featured voices", + "examples": [ + true + ], + "default": false, + "title": "Featured" + }, + "description": "Filter featured voices" + }, + { + "name": "min_notice_period_days", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Filter voices with a minimum notice period of the given number of days.", + "examples": [ + 30 + ], + "title": "Min Notice Period Days" + }, + "description": "Filter voices with a minimum notice period of the given number of days." + }, + { + "name": "include_custom_rates", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Include/exclude voices with custom rates", + "examples": [ + true + ], + "title": "Include Custom Rates" + }, + "description": "Include/exclude voices with custom rates" + }, + { + "name": "include_live_moderated", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Include/exclude voices that are live moderated", + "examples": [ + true + ], + "title": "Include Live Moderated" + }, + "description": "Include/exclude voices that are live moderated" + }, + { + "name": "reader_app_enabled", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Filter voices that are enabled for the reader app", + "examples": [ + true + ], + "default": false, + "title": "Reader App Enabled" + }, + "description": "Filter voices that are enabled for the reader app" + }, + { + "name": "owner_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter voices by public owner ID", + "examples": [ + "7c9fab611d9a0e1fb2e7448a0c294a8804efc2bcc324b0a366a5d5232b7d1532" + ], + "title": "Owner Id" + }, + "description": "Filter voices by public owner ID" + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Sort criteria", + "examples": [ + "created_date" + ], + "title": "Sort" + }, + "description": "Sort criteria" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0, + "title": "Page" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLibraryVoicesResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "voices", + "x-fern-sdk-method-name": "get_shared" + } + }, + "/v1/similar-voices": { + "post": { + "tags": [ + "voices" + ], + "summary": "Get Similar Library Voices", + "description": "Returns a list of shared voices similar to the provided audio sample. If neither similarity_threshold nor top_k is provided, we will apply default values.", + "operationId": "get_similar_library_voices", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Get_similar_library_voices_v1_similar_voices_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLibraryVoicesResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "voices", + "x-fern-sdk-method-name": "find_similar_voices" + } + }, + "/v1/usage/character-stats": { + "get": { + "summary": "Get Characters Usage Metrics (Deprecated)", + "description": "(Deprecated) This endpoint is deprecated. Use /v1/workspace/analytics/query/usage-by-product-over-time instead, which exposes the bucket size as `interval_seconds` (an integer in seconds) rather than `aggregation_interval`. Returns the usage metrics for the current user or the entire workspace they are part of. The response provides a time axis based on the specified aggregation interval (default: day), with usage values for each interval along that axis. Usage is broken down by the selected breakdown type. For example, breakdown type \"voice\" will return the usage of each voice for each interval along the time axis.", + "operationId": "usage_characters", + "deprecated": true, + "parameters": [ + { + "name": "start_unix", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "description": "UTC Unix timestamp for the start of the usage window, in milliseconds. To include the first day of the window, the timestamp should be at 00:00:00 of that day.", + "examples": [ + "1685574000" + ], + "title": "Start Unix" + }, + "description": "UTC Unix timestamp for the start of the usage window, in milliseconds. To include the first day of the window, the timestamp should be at 00:00:00 of that day." + }, + { + "name": "end_unix", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "description": "UTC Unix timestamp for the end of the usage window, in milliseconds. To include the last day of the window, the timestamp should be at 23:59:59 of that day.", + "examples": [ + "1688165999" + ], + "title": "End Unix" + }, + "description": "UTC Unix timestamp for the end of the usage window, in milliseconds. To include the last day of the window, the timestamp should be at 23:59:59 of that day." + }, + { + "name": "include_workspace_metrics", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether or not to include the statistics of the entire workspace.", + "default": false, + "title": "Include Workspace Metrics" + }, + "description": "Whether or not to include the statistics of the entire workspace." + }, + { + "name": "breakdown_type", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BreakdownTypes", + "description": "How to break down the information. Cannot be \"user\" if include_workspace_metrics is False.", + "default": "none" + }, + "description": "How to break down the information. Cannot be \"user\" if include_workspace_metrics is False." + }, + { + "name": "aggregation_interval", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UsageAggregationInterval", + "description": "How to aggregate usage data over time. Can be \"hour\", \"day\", \"week\", \"month\", or \"cumulative\".", + "default": "day" + }, + "description": "How to aggregate usage data over time. Can be \"hour\", \"day\", \"week\", \"month\", or \"cumulative\"." + }, + { + "name": "aggregation_bucket_size", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Aggregation bucket size in seconds. Overrides the aggregation interval.", + "title": "Aggregation Bucket Size" + }, + "description": "Aggregation bucket size in seconds. Overrides the aggregation interval." + }, + { + "name": "metric", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/MetricType", + "description": "Which metric to aggregate.", + "default": "credits" + }, + "description": "Which metric to aggregate." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageCharactersResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "usage", + "x-fern-sdk-method-name": "get" + } + }, + "/v1/pronunciation-dictionaries/add-from-file": { + "post": { + "tags": [ + "Pronunciation Dictionary" + ], + "summary": "Add A Pronunciation Dictionary", + "description": "Creates a new pronunciation dictionary from a lexicon .PLS file", + "operationId": "add_from_file", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Add_a_pronunciation_dictionary_v1_pronunciation_dictionaries_add_from_file_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddPronunciationDictionaryResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "pronunciation_dictionaries", + "x-fern-sdk-method-name": "create_from_file" + } + }, + "/v1/pronunciation-dictionaries/add-from-rules": { + "post": { + "tags": [ + "Pronunciation Dictionary" + ], + "summary": "Add A Pronunciation Dictionary", + "description": "Creates a new pronunciation dictionary from provided rules.", + "operationId": "add_from_rules", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Add_a_pronunciation_dictionary_v1_pronunciation_dictionaries_add_from_rules_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddPronunciationDictionaryResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "pronunciation_dictionaries", + "x-fern-sdk-method-name": "create_from_rules" + } + }, + "/v1/pronunciation-dictionaries/{pronunciation_dictionary_id}": { + "patch": { + "tags": [ + "Pronunciation Dictionary" + ], + "summary": "Update Pronunciation Dictionary", + "description": "Partially update the pronunciation dictionary without changing the version", + "operationId": "patch_pronunciation_dictionary", + "parameters": [ + { + "name": "pronunciation_dictionary_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the pronunciation dictionary", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Pronunciation Dictionary Id" + }, + "description": "The id of the pronunciation dictionary" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__patch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPronunciationDictionaryMetadataResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "pronunciation_dictionaries", + "x-fern-sdk-method-name": "update" + }, + "get": { + "tags": [ + "Pronunciation Dictionary" + ], + "summary": "Get Metadata For A Pronunciation Dictionary", + "description": "Get metadata for a pronunciation dictionary", + "operationId": "get_pronunciation_dictionary_metadata", + "parameters": [ + { + "name": "pronunciation_dictionary_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the pronunciation dictionary", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Pronunciation Dictionary Id" + }, + "description": "The id of the pronunciation dictionary" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPronunciationDictionaryWithRulesResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "pronunciation_dictionaries", + "x-fern-sdk-method-name": "get" + } + }, + "/v1/pronunciation-dictionaries/{pronunciation_dictionary_id}/set-rules": { + "post": { + "tags": [ + "Pronunciation Dictionary" + ], + "summary": "Set Rules On The Pronunciation Dictionary", + "description": "Replaces all existing rules on the pronunciation dictionary with the provided ones.", + "operationId": "set_rules", + "parameters": [ + { + "name": "pronunciation_dictionary_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the pronunciation dictionary", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Pronunciation Dictionary Id" + }, + "description": "The id of the pronunciation dictionary" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Set_rules_on_the_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__set_rules_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully set rules on the pronunciation dictionary", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PronunciationDictionaryRulesResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "pronunciation_dictionaries", + "rules" + ], + "x-fern-sdk-method-name": "set" + } + }, + "/v1/pronunciation-dictionaries/{pronunciation_dictionary_id}/add-rules": { + "post": { + "tags": [ + "Pronunciation Dictionary" + ], + "summary": "Add Rules To The Pronunciation Dictionary", + "description": "Add rules to the pronunciation dictionary. If a rule with the same string_to_replace already exists, it will be replaced.", + "operationId": "add_rules", + "parameters": [ + { + "name": "pronunciation_dictionary_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the pronunciation dictionary", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Pronunciation Dictionary Id" + }, + "description": "The id of the pronunciation dictionary" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Add_rules_to_the_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__add_rules_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PronunciationDictionaryRulesResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "pronunciation_dictionaries", + "rules" + ], + "x-fern-sdk-method-name": "add" + } + }, + "/v1/pronunciation-dictionaries/{pronunciation_dictionary_id}/remove-rules": { + "post": { + "tags": [ + "Pronunciation Dictionary" + ], + "summary": "Remove Rules From The Pronunciation Dictionary", + "description": "Remove rules from the pronunciation dictionary", + "operationId": "remove_rules", + "parameters": [ + { + "name": "pronunciation_dictionary_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the pronunciation dictionary", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Pronunciation Dictionary Id" + }, + "description": "The id of the pronunciation dictionary" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Remove_rules_from_the_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__remove_rules_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PronunciationDictionaryRulesResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "pronunciation_dictionaries", + "rules" + ], + "x-fern-sdk-method-name": "remove" + } + }, + "/v1/pronunciation-dictionaries/{dictionary_id}/{version_id}/download": { + "get": { + "tags": [ + "Pronunciation Dictionary" + ], + "summary": "Get A Pls File With A Pronunciation Dictionary Version Rules", + "description": "Get a PLS file with a pronunciation dictionary version rules", + "operationId": "get_pronunciation_dictionary_version_pls", + "parameters": [ + { + "name": "dictionary_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the pronunciation dictionary", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Dictionary Id" + }, + "description": "The id of the pronunciation dictionary" + }, + { + "name": "version_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the pronunciation dictionary version", + "examples": [ + "BdF0s0aZ3oFoKnDYdTox" + ], + "title": "Version Id" + }, + "description": "The id of the pronunciation dictionary version" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "The PLS file containing pronunciation dictionary rules", + "content": { + "text/plain": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "headers": { + "Content-Disposition": { + "description": "Attachment filename", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "pronunciation_dictionaries", + "x-fern-sdk-method-name": "download" + } + }, + "/v1/pronunciation-dictionaries": { + "get": { + "tags": [ + "Pronunciation Dictionary" + ], + "summary": "Get Pronunciation Dictionaries", + "description": "Get a list of the pronunciation dictionaries you have access to and their metadata", + "operationId": "get_pronunciation_dictionaries_metadata", + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many pronunciation dictionaries to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many pronunciation dictionaries to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "creation_time_unix", + "name" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Which field to sort by, one of 'created_at_unix' or 'name'.", + "examples": [ + "creation_time_unix" + ], + "default": "creation_time_unix", + "title": "Sort" + }, + "description": "Which field to sort by, one of 'created_at_unix' or 'name'." + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Which direction to sort the voices in. 'ascending' or 'descending'.", + "examples": [ + "descending" + ], + "default": "DESCENDING", + "title": "Sort Direction" + }, + "description": "Which direction to sort the voices in. 'ascending' or 'descending'." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPronunciationDictionariesMetadataResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "pronunciation_dictionaries", + "x-fern-sdk-method-name": "list" + } + }, + "/v1/service-accounts/{service_account_user_id}/api-keys": { + "get": { + "tags": [ + "workspace" + ], + "summary": "Get Service Account Api Keys Route", + "description": "Get all API keys for a service account", + "operationId": "get_service_account_api_keys_route", + "parameters": [ + { + "name": "service_account_user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Service Account User Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceApiKeyListResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "service_accounts", + "api_keys" + ], + "x-fern-sdk-method-name": "list" + }, + "post": { + "tags": [ + "workspace" + ], + "summary": "Create Service Account Api Key", + "description": "Create a new API key for a service account", + "operationId": "create_service_account_api_key", + "parameters": [ + { + "name": "service_account_user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Service Account User Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_create_service_account_api_key_v1_service_accounts__service_account_user_id__api_keys_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceCreateApiKeyResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "service_accounts", + "api_keys" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/service-accounts/{service_account_user_id}/api-keys/{api_key_id}": { + "patch": { + "tags": [ + "workspace" + ], + "summary": "Edit Service Account Api Key", + "description": "Update an existing API key for a service account", + "operationId": "edit_service_account_api_key", + "parameters": [ + { + "name": "service_account_user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Service Account User Id" + } + }, + { + "name": "api_key_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Api Key Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_edit_service_account_api_key_v1_service_accounts__service_account_user_id__api_keys__api_key_id__patch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "service_accounts", + "api_keys" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "workspace" + ], + "summary": "Delete Service Account Api Key", + "description": "Delete an existing API key for a service account", + "operationId": "delete_service_account_api_key", + "parameters": [ + { + "name": "service_account_user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Service Account User Id" + } + }, + { + "name": "api_key_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Api Key Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "service_accounts", + "api_keys" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/workspace/audit-logs": { + "get": { + "tags": [ + "workspace" + ], + "summary": "Get Workspace Audit Logs", + "description": "Returns the audit log for the workspace. Requires enterprise tier and the audit_log_read permission.", + "operationId": "get_workspace_audit_logs", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Maximum number of entries per page", + "default": 50, + "title": "Limit" + }, + "description": "Maximum number of entries per page" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Cursor for the next page (from previous response)", + "title": "Cursor" + }, + "description": "Cursor for the next page (from previous response)" + }, + { + "name": "time_from_unix_ms", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Only include entries at or after this time (ms since epoch)", + "title": "Time From Unix Ms" + }, + "description": "Only include entries at or after this time (ms since epoch)" + }, + { + "name": "time_to_unix_ms", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Only include entries at or before this time (ms since epoch)", + "title": "Time To Unix Ms" + }, + "description": "Only include entries at or before this time (ms since epoch)" + }, + { + "name": "actor_uid", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by actor user ID", + "title": "Actor Uid" + }, + "description": "Filter by actor user ID" + }, + { + "name": "class_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by OCSF event class name (e.g. Account Change)", + "title": "Class Name" + }, + "description": "Filter by OCSF event class name (e.g. Account Change)" + }, + { + "name": "activity_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by audit activity name (e.g. Subscription Creation)", + "title": "Activity Name" + }, + "description": "Filter by audit activity name (e.g. Subscription Creation)" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceAuditLogsPageResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "audit_logs" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/workspace/auth-connections": { + "post": { + "tags": [ + "workspace" + ], + "summary": "Create Workspace Auth Connection", + "description": "Create a new OAuth2 auth connection for the workspace", + "operationId": "create_auth_connection", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateOAuth2ClientCredsRequest" + }, + { + "$ref": "#/components/schemas/CreateCustomHeaderAuthRequest" + }, + { + "$ref": "#/components/schemas/CreateBasicAuthRequest" + }, + { + "$ref": "#/components/schemas/CreateBearerAuthRequest" + }, + { + "$ref": "#/components/schemas/CreateOAuth2JWTRequest" + }, + { + "$ref": "#/components/schemas/CreatePrivateKeyJWTRequest" + }, + { + "$ref": "#/components/schemas/CreateMTLSAuthRequest" + } + ], + "description": "Auth connection to create", + "title": "Request Body" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/OAuth2ClientCredsResponse" + }, + { + "$ref": "#/components/schemas/BasicAuthResponse" + }, + { + "$ref": "#/components/schemas/BearerAuthResponse" + }, + { + "$ref": "#/components/schemas/OAuth2JWTResponse" + }, + { + "$ref": "#/components/schemas/PrivateKeyJWTResponse" + }, + { + "$ref": "#/components/schemas/MTLSAuthResponse" + }, + { + "$ref": "#/components/schemas/CustomHeaderAuthResponse" + }, + { + "$ref": "#/components/schemas/ApiIntegrationOAuth2AuthCodeResponse" + }, + { + "$ref": "#/components/schemas/ApiIntegrationOAuth2CustomAppResponse" + }, + { + "$ref": "#/components/schemas/WhatsAppAuthResponse" + }, + { + "$ref": "#/components/schemas/SlackBotAuthResponse" + } + ], + "discriminator": { + "propertyName": "auth_type", + "mapping": { + "oauth2_client_credentials": "#/components/schemas/OAuth2ClientCredsResponse", + "basic_auth": "#/components/schemas/BasicAuthResponse", + "bearer_auth": "#/components/schemas/BearerAuthResponse", + "oauth2_jwt": "#/components/schemas/OAuth2JWTResponse", + "private_key_jwt": "#/components/schemas/PrivateKeyJWTResponse", + "mtls": "#/components/schemas/MTLSAuthResponse", + "custom_header_auth": "#/components/schemas/CustomHeaderAuthResponse", + "api_integration_oauth2_auth_code": "#/components/schemas/ApiIntegrationOAuth2AuthCodeResponse", + "api_integration_oauth2_custom_app": "#/components/schemas/ApiIntegrationOAuth2CustomAppResponse", + "whatsapp_auth": "#/components/schemas/WhatsAppAuthResponse", + "slack_bot_auth": "#/components/schemas/SlackBotAuthResponse" + } + }, + "description": "The type of auth connection config", + "title": "Response Create Workspace Auth Connection V1 Workspace Auth Connections Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "auth_connections" + ], + "x-fern-sdk-method-name": "create" + }, + "get": { + "tags": [ + "workspace" + ], + "summary": "Get Workspace Auth Connections", + "description": "Get all auth connections for the workspace", + "operationId": "list_auth_connections", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListAuthConnectionsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "auth_connections" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/workspace/auth-connections/{auth_connection_id}": { + "patch": { + "tags": [ + "workspace" + ], + "summary": "Update Workspace Auth Connection", + "description": "Update an auth connection", + "operationId": "update_auth_connection", + "parameters": [ + { + "name": "auth_connection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Auth Connection Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpdateOAuth2ClientCredsRequest" + }, + { + "$ref": "#/components/schemas/UpdateBasicAuthRequest" + }, + { + "$ref": "#/components/schemas/UpdateOAuth2JWTRequest" + } + ], + "description": "Updated auth connection fields", + "title": "Request Body" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/OAuth2ClientCredsResponse" + }, + { + "$ref": "#/components/schemas/BasicAuthResponse" + }, + { + "$ref": "#/components/schemas/BearerAuthResponse" + }, + { + "$ref": "#/components/schemas/OAuth2JWTResponse" + }, + { + "$ref": "#/components/schemas/PrivateKeyJWTResponse" + }, + { + "$ref": "#/components/schemas/MTLSAuthResponse" + }, + { + "$ref": "#/components/schemas/CustomHeaderAuthResponse" + }, + { + "$ref": "#/components/schemas/ApiIntegrationOAuth2AuthCodeResponse" + }, + { + "$ref": "#/components/schemas/ApiIntegrationOAuth2CustomAppResponse" + }, + { + "$ref": "#/components/schemas/WhatsAppAuthResponse" + }, + { + "$ref": "#/components/schemas/SlackBotAuthResponse" + } + ], + "discriminator": { + "propertyName": "auth_type", + "mapping": { + "oauth2_client_credentials": "#/components/schemas/OAuth2ClientCredsResponse", + "basic_auth": "#/components/schemas/BasicAuthResponse", + "bearer_auth": "#/components/schemas/BearerAuthResponse", + "oauth2_jwt": "#/components/schemas/OAuth2JWTResponse", + "private_key_jwt": "#/components/schemas/PrivateKeyJWTResponse", + "mtls": "#/components/schemas/MTLSAuthResponse", + "custom_header_auth": "#/components/schemas/CustomHeaderAuthResponse", + "api_integration_oauth2_auth_code": "#/components/schemas/ApiIntegrationOAuth2AuthCodeResponse", + "api_integration_oauth2_custom_app": "#/components/schemas/ApiIntegrationOAuth2CustomAppResponse", + "whatsapp_auth": "#/components/schemas/WhatsAppAuthResponse", + "slack_bot_auth": "#/components/schemas/SlackBotAuthResponse" + } + }, + "description": "The type of auth connection config", + "title": "Response Update Workspace Auth Connection V1 Workspace Auth Connections Auth Connection Id Patch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "auth_connections" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "workspace" + ], + "summary": "Delete Workspace Auth Connection", + "description": "Delete an auth connection", + "operationId": "delete_auth_connection", + "parameters": [ + { + "name": "auth_connection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Auth Connection Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "auth_connections" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/service-accounts": { + "get": { + "tags": [ + "workspace" + ], + "summary": "Get Workspace Service Accounts", + "description": "List all service accounts in the workspace", + "operationId": "get_workspace_service_accounts", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceServiceAccountListResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "service_accounts" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/workspace/groups": { + "get": { + "tags": [ + "workspace" + ], + "summary": "Get All Groups", + "description": "Get all groups in the workspace", + "operationId": "get_groups_endpoint", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/WorkspaceGroupResponseModel" + }, + "title": "Response Get All Groups V1 Workspace Groups Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "groups" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/workspace/groups/search": { + "get": { + "tags": [ + "workspace" + ], + "summary": "Search User Groups", + "description": "Searches for user groups in the workspace. Multiple or no groups may be returned.", + "operationId": "search_groups", + "parameters": [ + { + "name": "name", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "Name of the target group.", + "title": "Name" + }, + "description": "Name of the target group." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkspaceGroupByNameResponseModel" + }, + "title": "Response Search User Groups V1 Workspace Groups Search Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "groups" + ], + "x-fern-sdk-method-name": "search" + } + }, + "/v1/workspace/groups/{group_id}/members/remove": { + "post": { + "tags": [ + "workspace" + ], + "summary": "Delete Member From User Group", + "description": "Removes a member from the specified group. Requires `group_members_manage` permission.", + "operationId": "remove_member", + "parameters": [ + { + "name": "group_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the target group.", + "title": "Group Id" + }, + "description": "The ID of the target group." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Delete_member_from_user_group_v1_workspace_groups__group_id__members_remove_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteWorkspaceGroupMemberResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "groups", + "members" + ], + "x-fern-sdk-method-name": "remove" + } + }, + "/v1/workspace/groups/{group_id}/members": { + "post": { + "tags": [ + "workspace" + ], + "summary": "Add Member To User Group", + "description": "Adds a member of your workspace to the specified group. Requires `group_members_manage` permission.", + "operationId": "add_member", + "parameters": [ + { + "name": "group_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the target group.", + "title": "Group Id" + }, + "description": "The ID of the target group." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Add_member_to_user_group_v1_workspace_groups__group_id__members_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddWorkspaceGroupMemberResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "groups", + "members" + ], + "x-fern-sdk-method-name": "add" + } + }, + "/v1/workspace/invites/add": { + "post": { + "tags": [ + "workspace" + ], + "summary": "Invite User", + "description": "Sends an email invitation to join your workspace to the provided email. If the user doesn't have an account they will be prompted to create one. If the user accepts this invite they will be added as a user to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission. If the user is already in the workspace a 400 error will be returned.", + "operationId": "invite_user", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Invite_user_v1_workspace_invites_add_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddWorkspaceInviteResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "invites" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/workspace/invites/add-bulk": { + "post": { + "tags": [ + "workspace" + ], + "summary": "Invite Multiple Users", + "description": "Sends email invitations to join your workspace to the provided emails. Requires all email addresses to be part of a verified domain. If the users don't have an account they will be prompted to create one. If the users accept these invites they will be added as users to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission.", + "operationId": "invite_users_bulk", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Invite_multiple_users_v1_workspace_invites_add_bulk_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddWorkspaceInviteResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "invites" + ], + "x-fern-sdk-method-name": "create_batch" + } + }, + "/v1/workspace/invites": { + "delete": { + "tags": [ + "workspace" + ], + "summary": "Delete Existing Invitation", + "description": "Invalidates an existing email invitation. The invitation will still show up in the inbox it has been delivered to, but activating it to join the workspace won't work. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission.", + "operationId": "delete_invite", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Delete_existing_invitation_v1_workspace_invites_delete" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteWorkspaceInviteResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "invites" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/workspace/members": { + "post": { + "tags": [ + "workspace" + ], + "summary": "Update Member", + "description": "Updates attributes of a workspace member. Apart from the email identifier, all parameters will remain unchanged unless specified. This endpoint may only be called by workspace administrators.", + "operationId": "update_workspace_member", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_member_v1_workspace_members_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWorkspaceMemberResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "members" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/workspace/resources/{resource_id}": { + "get": { + "tags": [ + "workspace" + ], + "summary": "Get Resource", + "description": "Gets the metadata of a resource by ID.", + "operationId": "get_resource_metadata", + "parameters": [ + { + "name": "resource_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the target resource.", + "title": "Resource Id" + }, + "description": "The ID of the target resource." + }, + { + "name": "resource_type", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/WorkspaceResourceType", + "description": "Resource type of the target resource." + }, + "description": "Resource type of the target resource." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceMetadataResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "resources" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/workspace/resources/{resource_id}/share": { + "post": { + "tags": [ + "workspace" + ], + "summary": "Share Workspace Resource", + "description": "Grants a role on a workspace resource to a user or a group. It overrides any existing role this user/service account/group/workspace api key has on the resource. To target a user or service account, pass only the user email. The user must be in your workspace. To target a group, pass only the group id. To target a workspace api key, pass the api key id. The resource will be shared with the service account associated with the api key. You must have admin access to the resource to share it.", + "operationId": "share_resource_endpoint", + "parameters": [ + { + "name": "resource_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the target resource.", + "title": "Resource Id" + }, + "description": "The ID of the target resource." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Share_workspace_resource_v1_workspace_resources__resource_id__share_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "resources" + ], + "x-fern-sdk-method-name": "share" + } + }, + "/v1/workspace/resources/{resource_id}/unshare": { + "post": { + "tags": [ + "workspace" + ], + "summary": "Unshare Workspace Resource", + "description": "Removes any existing role on a workspace resource from a user, service account, group or workspace api key. To target a user or service account, pass only the user email. The user must be in your workspace. To target a group, pass only the group id. To target a workspace api key, pass the api key id. The resource will be unshared from the service account associated with the api key. You must have admin access to the resource to unshare it. You cannot remove permissions from the user who created the resource.", + "operationId": "unshare_resource_endpoint", + "parameters": [ + { + "name": "resource_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the target resource.", + "title": "Resource Id" + }, + "description": "The ID of the target resource." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Unshare_workspace_resource_v1_workspace_resources__resource_id__unshare_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "resources" + ], + "x-fern-sdk-method-name": "unshare" + } + }, + "/v1/workspace/webhooks": { + "get": { + "tags": [ + "workspace" + ], + "summary": "List Workspace Webhooks", + "description": "List all webhooks for a workspace", + "operationId": "get_workspace_webhooks_route", + "parameters": [ + { + "name": "include_usages", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to include active usages of the webhook, only usable by admins", + "examples": [ + false + ], + "default": false, + "title": "Include Usages" + }, + "description": "Whether to include active usages of the webhook, only usable by admins" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceWebhookListResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "webhooks", + "x-fern-sdk-method-name": "list" + }, + "post": { + "tags": [ + "workspace" + ], + "summary": "Create Workspace Webhook", + "description": "Create a new webhook for the workspace with the specified authentication type.", + "operationId": "create_workspace_webhook_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_workspace_webhook_v1_workspace_webhooks_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceCreateWebhookResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "webhooks", + "x-fern-sdk-method-name": "create" + } + }, + "/v1/workspace/webhooks/{webhook_id}": { + "patch": { + "tags": [ + "workspace" + ], + "summary": "Update Workspace Webhook", + "description": "Update the specified workspace webhook", + "operationId": "edit_workspace_webhook_route", + "parameters": [ + { + "name": "webhook_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The unique ID for the webhook", + "examples": [ + "G007vmtq9uWYl7SUW9zGS8GZZa1K" + ], + "title": "Webhook Id" + }, + "description": "The unique ID for the webhook" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_workspace_webhook_v1_workspace_webhooks__webhook_id__patch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchWorkspaceWebhookResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "webhooks", + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "workspace" + ], + "summary": "Delete Workspace Webhook", + "description": "Delete the specified workspace webhook", + "operationId": "delete_workspace_webhook_route", + "parameters": [ + { + "name": "webhook_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The unique ID for the webhook", + "examples": [ + "G007vmtq9uWYl7SUW9zGS8GZZa1K" + ], + "title": "Webhook Id" + }, + "description": "The unique ID for the webhook" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteWorkspaceWebhookResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "webhooks", + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/speech-to-text": { + "post": { + "tags": [ + "speech-to-text" + ], + "summary": "Speech To Text", + "description": "Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned. Otherwise, returns a single transcript. The optional webhook_metadata parameter allows you to attach custom data that will be included in webhook responses for request correlation and tracking.", + "operationId": "speech_to_text", + "parameters": [ + { + "name": "enable_logging", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "title": "Enable request logging.", + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers.", + "default": true + }, + "description": "When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Speech_to_Text_v1_speech_to_text_post" + } + } + } + }, + "responses": { + "200": { + "description": "Synchronous transcription result", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpeechToTextChunkResponseModel" + }, + { + "$ref": "#/components/schemas/MultichannelSpeechToTextResponseModel" + }, + { + "$ref": "#/components/schemas/SpeechToTextWebhookResponseModel" + } + ], + "title": "Response Speech To Text V1 Speech To Text Post", + "oneOf": [ + { + "$ref": "#/components/schemas/SpeechToTextChunkResponseModel" + }, + { + "$ref": "#/components/schemas/MultichannelSpeechToTextResponseModel" + } + ] + }, + "examples": { + "single_channel": { + "summary": "Single channel response", + "value": { + "language_code": "en", + "language_probability": 0.98, + "text": "Hello world!", + "words": [ + { + "text": "Hello", + "start": 0, + "end": 0.5, + "type": "word", + "speaker_id": "speaker_1", + "logprob": -0.124 + } + ] + } + }, + "multichannel": { + "summary": "Multichannel response", + "value": { + "transcripts": [ + { + "language_code": "en", + "language_probability": 0.98, + "text": "Hello from channel one.", + "words": [ + { + "text": "Hello", + "start": 0, + "end": 0.5, + "type": "word", + "speaker_id": "speaker_0", + "channel_index": 0, + "logprob": -0.124 + } + ] + }, + { + "language_code": "en", + "language_probability": 0.97, + "text": "Greetings from channel two.", + "words": [ + { + "text": "Greetings", + "start": 0.1, + "end": 0.7, + "type": "word", + "speaker_id": "speaker_1", + "channel_index": 1, + "logprob": -0.156 + } + ] + } + ] + } + } + } + } + } + }, + "202": { + "description": "Asynchronous request accepted", + "content": { + "application/json": { + "example": { + "message": "Request accepted. Transcription result will be sent to the webhook.", + "request_id": "abc123" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "speech_to_text", + "x-fern-sdk-method-name": "convert" + } + }, + "/v1/speech-to-text/transcripts/{transcription_id}": { + "get": { + "tags": [ + "speech-to-text" + ], + "summary": "Get Transcript By Id", + "description": "Retrieve a previously generated transcript by its ID.", + "operationId": "get_transcript_by_id", + "parameters": [ + { + "name": "transcription_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The unique ID of the transcript to retrieve", + "title": "Transcription Id" + }, + "description": "The unique ID of the transcript to retrieve" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "The transcript data", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpeechToTextChunkResponseModel" + }, + { + "$ref": "#/components/schemas/MultichannelSpeechToTextResponseModel" + } + ], + "title": "Response Get Transcript By Id V1 Speech To Text Transcripts Transcription Id Get", + "oneOf": [ + { + "$ref": "#/components/schemas/SpeechToTextChunkResponseModel" + }, + { + "$ref": "#/components/schemas/MultichannelSpeechToTextResponseModel" + } + ] + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "example": { + "detail": { + "status": "unauthorized", + "message": "Authentication required." + } + } + } + } + }, + "404": { + "description": "Transcript not found", + "content": { + "application/json": { + "example": { + "detail": { + "status": "not_found_error", + "message": "Transcript not found." + } + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "speech_to_text", + "transcripts" + ], + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "speech-to-text" + ], + "summary": "Delete Transcript By Id", + "description": "Delete a previously generated transcript by its ID.", + "operationId": "delete_transcript_by_id", + "parameters": [ + { + "name": "transcription_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The unique ID of the transcript to delete", + "title": "Transcription Id" + }, + "description": "The unique ID of the transcript to delete" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Delete completed successfully.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "example": { + "detail": { + "status": "unauthorized", + "message": "Authentication required." + } + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "speech_to_text", + "transcripts" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/single-use-token/{token_type}": { + "post": { + "tags": [ + "Single Use Token" + ], + "summary": "Create Single Use Token", + "description": "Generate a time limited single-use token with embedded authentication for frontend clients.", + "operationId": "get_single_use_token", + "parameters": [ + { + "name": "token_type", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/SingleUseTokenType" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SingleUseTokenResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "tokens", + "single_use" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/forced-alignment": { + "post": { + "tags": [ + "forced-alignment" + ], + "summary": "Create Forced Alignment", + "description": "Force align an audio file to text. Use this endpoint to get the timing information for each character and word in an audio file based on a provided text transcript.", + "operationId": "forced_alignment", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Create_forced_alignment_v1_forced_alignment_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForcedAlignmentResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "forced_alignment", + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/conversation/get-signed-url": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Signed Url", + "description": "Get a signed url to start a conversation with an agent with an agent that requires authorization", + "operationId": "get_conversation_signed_link", + "parameters": [ + { + "name": "agent_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz", + "seng_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "title": "Agent Id" + }, + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource." + }, + { + "name": "include_conversation_id", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again.", + "default": false, + "title": "Include Conversation Id" + }, + "description": "Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again." + }, + { + "name": "branch_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The ID of the branch to use", + "title": "Branch Id" + }, + "description": "The ID of the branch to use" + }, + { + "name": "environment", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The environment to use for resolving environment variables (e.g. 'production', 'staging'). Defaults to 'production'.", + "title": "Environment" + }, + "description": "The environment to use for resolving environment variables (e.g. 'production', 'staging'). Defaults to 'production'." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationSignedUrlResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations" + ], + "x-fern-sdk-method-name": "get_signed_url" + } + }, + "/v1/convai/conversation/get_signed_url": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Signed Url", + "description": "Get a signed url to start a conversation with an agent with an agent that requires authorization", + "operationId": "get_signed_url_deprecated", + "deprecated": true, + "parameters": [ + { + "name": "agent_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz", + "seng_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "title": "Agent Id" + }, + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource." + }, + { + "name": "include_conversation_id", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again.", + "default": false, + "title": "Include Conversation Id" + }, + "description": "Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again." + }, + { + "name": "branch_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The ID of the branch to use", + "title": "Branch Id" + }, + "description": "The ID of the branch to use" + }, + { + "name": "environment", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The environment to use for resolving environment variables (e.g. 'production', 'staging'). Defaults to 'production'.", + "title": "Environment" + }, + "description": "The environment to use for resolving environment variables (e.g. 'production', 'staging'). Defaults to 'production'." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationSignedUrlResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-skip-spec": true + } + }, + "/v1/convai/conversation/token": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Webrtc Token", + "description": "Get a WebRTC session token for real-time communication.", + "operationId": "get_livekit_token", + "parameters": [ + { + "name": "agent_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz", + "seng_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "title": "Agent Id" + }, + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource." + }, + { + "name": "participant_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional custom participant name. If not provided, user ID will be used", + "title": "Participant Name" + }, + "description": "Optional custom participant name. If not provided, user ID will be used" + }, + { + "name": "branch_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The ID of the branch to use", + "title": "Branch Id" + }, + "description": "The ID of the branch to use" + }, + { + "name": "environment", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The environment to use for resolving environment variables (e.g. 'production', 'staging'). Defaults to 'production'.", + "title": "Environment" + }, + "description": "The environment to use for resolving environment variables (e.g. 'production', 'staging'). Defaults to 'production'." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations" + ], + "x-fern-sdk-method-name": "get_webrtc_token" + } + }, + "/v1/convai/twilio/outbound-call": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Handle An Outbound Call Via Twilio", + "description": "Handle an outbound call via Twilio", + "operationId": "handle_twilio_outbound_call", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Handle_an_outbound_call_via_Twilio_v1_convai_twilio_outbound_call_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TwilioOutboundCallResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "twilio" + ], + "x-fern-sdk-method-name": "outbound_call" + } + }, + "/v1/convai/twilio/register-call": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Register A Twilio Call And Return Twiml", + "description": "Register a Twilio call and return TwiML to connect the call", + "operationId": "register_twilio_call", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Register_a_Twilio_call_and_return_TwiML_v1_convai_twilio_register_call_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "twilio" + ], + "x-fern-sdk-method-name": "register_call" + } + }, + "/v1/convai/whatsapp/outbound-call": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Make An Outbound Call Via Whatsapp", + "description": "Make an outbound call via WhatsApp", + "operationId": "whatsapp_outbound_call", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Make_an_outbound_call_via_WhatsApp_v1_convai_whatsapp_outbound_call_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WhatsAppOutboundCallResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "whatsapp" + ], + "x-fern-sdk-method-name": "outbound_call" + } + }, + "/v1/convai/whatsapp/outbound-message": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Send An Outbound Message Via Whatsapp", + "description": "Send an outbound message via WhatsApp", + "operationId": "whatsapp_outbound_message", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Send_an_outbound_message_via_WhatsApp_v1_convai_whatsapp_outbound_message_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WhatsAppOutboundMessageResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "whatsapp" + ], + "x-fern-sdk-method-name": "outbound_message" + } + }, + "/v1/convai/agents/create": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Agent", + "description": "Create an agent from a config object", + "operationId": "create_agent_route", + "parameters": [ + { + "name": "enable_versioning", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Enable versioning for the agent", + "default": true, + "title": "Enable Versioning" + }, + "description": "Enable versioning for the agent" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_Agent_v1_convai_agents_create_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/agents/summaries": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Agent Summaries", + "description": "Returns summaries for the specified agents.", + "operationId": "get_agent_summaries_route", + "parameters": [ + { + "name": "agent_ids", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of agent IDs to fetch summaries for", + "examples": [ + "J3Pbu5gP6NNKBscdCdwB", + "K4Qcu6hQ7OOLCtdeDeXC" + ], + "max_items": 100, + "title": "Agent Ids" + }, + "description": "List of agent IDs to fetch summaries for" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/AgentSummaryBatchSuccessfulResponseModel" + }, + { + "$ref": "#/components/schemas/BatchFailureResponseModel" + } + ], + "discriminator": { + "propertyName": "status", + "mapping": { + "success": "#/components/schemas/AgentSummaryBatchSuccessfulResponseModel", + "failure": "#/components/schemas/BatchFailureResponseModel" + } + } + }, + "title": "Response Get Agent Summaries V1 Convai Agents Summaries Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "summaries" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/convai/agents/{agent_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Agent", + "description": "Retrieve config for an agent", + "operationId": "get_agent_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "version_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The ID of the agent version to use", + "examples": [ + "agtvrsn_8901k4t9z5defmb8vh3e9361y7nj" + ], + "title": "Version Id" + }, + "description": "The ID of the agent version to use" + }, + { + "name": "branch_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The ID of the branch to use", + "examples": [ + "agtbranch_0901k4aafjxxfxt93gd841r7tv5t" + ], + "title": "Branch Id" + }, + "description": "The ID of the branch to use" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAgentResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents" + ], + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Patches An Agent Settings", + "description": "Patches an Agent settings", + "operationId": "patch_agent_settings_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "enable_versioning_if_not_enabled", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Enable versioning for the agent, if not already enabled", + "default": true, + "title": "Enable Versioning If Not Enabled" + }, + "description": "Enable versioning for the agent, if not already enabled" + }, + { + "name": "branch_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The ID of the branch to use", + "examples": [ + "agtbranch_0901k4aafjxxfxt93gd841r7tv5t" + ], + "title": "Branch Id" + }, + "description": "The ID of the branch to use" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Patches_an_Agent_settings_v1_convai_agents__agent_id__patch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAgentResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Agent", + "description": "Delete an agent", + "operationId": "delete_agent_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response" + }, + "204": { + "description": "Agent successfully deleted" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/agents/{agent_id}/widget": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Agent Widget Config", + "description": "Retrieve the widget configuration for an agent", + "operationId": "get_agent_widget_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "conversation_signature", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "An expiring token that enables a websocket conversation to start. These can be generated for an agent using the /v1/convai/conversation/get-signed-url endpoint", + "title": "Conversation Signature" + }, + "description": "An expiring token that enables a websocket conversation to start. These can be generated for an agent using the /v1/convai/conversation/get-signed-url endpoint" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAgentEmbedResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "widget" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/convai/agents/{agent_id}/link": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Shareable Agent Link", + "description": "Get the current link used to share the agent with others", + "operationId": "get_agent_link_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAgentLinkResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "link" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/convai/agents/{agent_id}/avatar": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Post Agent Avatar", + "description": "Sets the avatar for an agent displayed in the widget", + "operationId": "post_agent_avatar_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Post_Agent_avatar_v1_convai_agents__agent_id__avatar_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostAgentAvatarResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "widget", + "avatar" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/agents": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "List Agents", + "description": "Returns a list of your agents and their metadata.", + "operationId": "get_agents_route", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many Agents to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many Agents to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Search by agents name.", + "title": "Search" + }, + "description": "Search by agents name." + }, + { + "name": "archived", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Filter agents by archived status", + "examples": [ + false + ], + "default": false, + "title": "Archived" + }, + "description": "Filter agents by archived status" + }, + { + "name": "show_only_owned_agents", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "If set to true, the endpoint will omit any agents that were shared with you by someone else and include only the ones you own. Deprecated: use created_by_user_id instead.", + "deprecated": true, + "default": false, + "title": "Show Only Owned Agents" + }, + "description": "If set to true, the endpoint will omit any agents that were shared with you by someone else and include only the ones you own. Deprecated: use created_by_user_id instead.", + "deprecated": true + }, + { + "name": "created_by_user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter agents by creator user ID. When set, only agents created by this user are returned. Takes precedence over show_only_owned_agents. Use '@me' to refer to the authenticated user.", + "title": "Created By User Id" + }, + "description": "Filter agents by creator user ID. When set, only agents created by this user are returned. Takes precedence over show_only_owned_agents. Use '@me' to refer to the authenticated user." + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/SortDirection", + "description": "The direction to sort the results", + "default": "desc" + }, + "description": "The direction to sort the results" + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentSortBy" + }, + { + "type": "null" + } + ], + "description": "The field to sort the results by", + "title": "Sort By" + }, + "description": "The field to sort the results by" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAgentsPageResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/agent/{agent_id}/knowledge-base/size": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Returns The Size Of The Agent'S Knowledge Base", + "description": "Returns the number of pages in the agent's knowledge base.", + "operationId": "get_agent_knowledge_base_size", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Agent Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAgentKnowledgebaseSizeResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "knowledge_base" + ], + "x-fern-sdk-method-name": "size" + } + }, + "/v1/convai/agent/{agent_id}/llm-usage/calculate": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Calculate Expected Llm Usage For An Agent", + "description": "Calculates expected number of LLM tokens needed for the specified agent.", + "operationId": "get_agent_llm_expected_cost_calculation", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Agent Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LLMUsageCalculatorRequestModel" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LLMUsageCalculatorResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "llm_usage" + ], + "x-fern-sdk-method-name": "calculate" + } + }, + "/v1/convai/agents/{agent_id}/duplicate": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Duplicate Agent", + "description": "Create a new agent by duplicating an existing one", + "operationId": "duplicate_agent_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Duplicate_Agent_v1_convai_agents__agent_id__duplicate_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents" + ], + "x-fern-sdk-method-name": "duplicate" + } + }, + "/v1/convai/agents/{agent_id}/simulate-conversation": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Simulates A Conversation", + "description": "Run a conversation between the agent and a simulated user.", + "operationId": "run_conversation_simulation_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Simulates_a_conversation_v1_convai_agents__agent_id__simulate_conversation_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentSimulatedChatTestResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents" + ], + "x-fern-sdk-method-name": "simulate_conversation" + } + }, + "/v1/convai/agents/{agent_id}/simulate-conversation/stream": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Simulates A Conversation (Stream)", + "description": "Run a conversation between the agent and a simulated user and stream back the response. Response is streamed back as partial lists of messages that should be concatenated and once the conversation has complete a single final message with the conversation analysis will be sent.", + "operationId": "run_conversation_simulation_route_stream", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Simulates_a_conversation__Stream__v1_convai_agents__agent_id__simulate_conversation_stream_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents" + ], + "x-fern-sdk-method-name": "simulate_conversation_stream" + } + }, + "/v1/convai/agent-testing/create": { + "post": { + "summary": "Create Agent Response Test", + "description": "Creates a new agent response test.", + "operationId": "create_agent_response_test_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateResponseUnitTestRequest" + }, + { + "$ref": "#/components/schemas/CreateToolCallUnitTestRequest" + }, + { + "$ref": "#/components/schemas/CreateSimulationTestRequest" + } + ], + "description": "Create Chat Response Test Request Information", + "title": "Test Request" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentTestResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/agent-testing/folders": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Agent Test Folder", + "description": "Creates a folder for organizing agent tests.", + "operationId": "create_agent_test_folder_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_agent_test_folder_v1_convai_agent_testing_folders_post" + } + } + } + }, + "responses": { + "200": { + "description": "Folder successfully created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentTestFolderResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests", + "folders" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/agent-testing/folders/{folder_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Agent Test Folder By Id", + "description": "Gets an agent test folder by ID, including its folder path.", + "operationId": "get_agent_test_folder_route", + "parameters": [ + { + "name": "folder_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The folder ID.", + "examples": [ + "tfld_7301khxdkycse5f88fzjdtrterzm" + ], + "title": "Folder Id" + }, + "description": "The folder ID." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Folder details retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAgentTestFolderResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests", + "folders" + ], + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Agent Test Folder", + "description": "Updates an agent test folder. Currently only supports updating the folder name.", + "operationId": "update_agent_test_folder_route", + "parameters": [ + { + "name": "folder_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The folder ID.", + "examples": [ + "tfld_7301khxdkycse5f88fzjdtrterzm" + ], + "title": "Folder Id" + }, + "description": "The folder ID." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_agent_test_folder_v1_convai_agent_testing_folders__folder_id__patch" + } + } + } + }, + "responses": { + "200": { + "description": "Folder successfully updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAgentTestFolderResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests", + "folders" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Agent Test Folder", + "description": "Deletes an agent test folder by ID. Use force=true to delete a non-empty folder and all its contents.", + "operationId": "delete_agent_test_folder_route", + "parameters": [ + { + "name": "folder_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The folder ID.", + "examples": [ + "tfld_7301khxdkycse5f88fzjdtrterzm" + ], + "title": "Folder Id" + }, + "description": "The folder ID." + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Force delete. Required for deleting non-empty folders.", + "default": false, + "title": "Force" + }, + "description": "Force delete. Required for deleting non-empty folders." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "204": { + "description": "Folder successfully deleted" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests", + "folders" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/agent-testing/bulk-move": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Bulk Move Tests To Folder", + "description": "Moves multiple tests or folders from one folder to another.", + "operationId": "agent_testing_bulk_move_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Bulk_move_tests_to_folder_v1_convai_agent_testing_bulk_move_post" + } + } + } + }, + "responses": { + "200": { + "description": "Tests or folders successfully moved to another folder", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests" + ], + "x-fern-sdk-method-name": "move" + } + }, + "/v1/convai/agent-testing/{test_id}": { + "get": { + "summary": "Get Agent Response Test By Id", + "description": "Gets an agent response test by ID.", + "operationId": "get_agent_response_test_route", + "parameters": [ + { + "name": "test_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a chat response test. This is returned on test creation.", + "examples": [ + "TeaqRRdTcIfIu2i7BYfT" + ], + "embed": true, + "title": "Test Id" + }, + "description": "The id of a chat response test. This is returned on test creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetResponseUnitTestResponseModel" + }, + { + "$ref": "#/components/schemas/GetToolCallUnitTestResponseModel" + }, + { + "$ref": "#/components/schemas/GetSimulationTestResponseModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "llm": "#/components/schemas/GetResponseUnitTestResponseModel", + "tool": "#/components/schemas/GetToolCallUnitTestResponseModel", + "simulation": "#/components/schemas/GetSimulationTestResponseModel" + } + }, + "title": "Response Get Agent Response Test By Id V1 Convai Agent Testing Test Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests" + ], + "x-fern-sdk-method-name": "get" + }, + "put": { + "summary": "Update Agent Response Test", + "description": "Updates an agent response test by ID.", + "operationId": "update_agent_response_test_route", + "parameters": [ + { + "name": "test_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a chat response test. This is returned on test creation.", + "examples": [ + "TeaqRRdTcIfIu2i7BYfT" + ], + "embed": true, + "title": "Test Id" + }, + "description": "The id of a chat response test. This is returned on test creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpdateResponseUnitTestRequest" + }, + { + "$ref": "#/components/schemas/UpdateToolCallUnitTestRequest" + }, + { + "$ref": "#/components/schemas/UpdateSimulationTestRequest" + } + ], + "description": "Agent test to update", + "title": "Test Request" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetResponseUnitTestResponseModel" + }, + { + "$ref": "#/components/schemas/GetToolCallUnitTestResponseModel" + }, + { + "$ref": "#/components/schemas/GetSimulationTestResponseModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "llm": "#/components/schemas/GetResponseUnitTestResponseModel", + "tool": "#/components/schemas/GetToolCallUnitTestResponseModel", + "simulation": "#/components/schemas/GetSimulationTestResponseModel" + } + }, + "title": "Response Update Agent Response Test V1 Convai Agent Testing Test Id Put" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "summary": "Delete Agent Response Test", + "description": "Deletes an agent response test by ID.", + "operationId": "delete_chat_response_test_route", + "parameters": [ + { + "name": "test_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a chat response test. This is returned on test creation.", + "examples": [ + "TeaqRRdTcIfIu2i7BYfT" + ], + "embed": true, + "title": "Test Id" + }, + "description": "The id of a chat response test. This is returned on test creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/agent-testing/summaries": { + "post": { + "summary": "Get Agent Response Test Summaries By Ids", + "description": "Gets multiple agent response tests by their IDs. Returns a dictionary mapping test IDs to test summaries.", + "operationId": "get_agent_response_tests_summaries_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListTestsByIdsRequestModel" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTestsSummariesByIdsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests" + ], + "x-fern-sdk-method-name": "summaries" + } + }, + "/v1/convai/agent-testing": { + "get": { + "summary": "List Agent Response Tests", + "description": "Lists all agent response tests with pagination support and optional search filtering.", + "operationId": "list_chat_response_tests_route", + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many Tests to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many Tests to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Search query to filter tests by name.", + "title": "Search" + }, + "description": "Search query to filter tests by name." + }, + { + "name": "parent_folder_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by parent folder ID. Use 'root' to get items in the root folder.", + "title": "Parent Folder Id" + }, + "description": "Filter by parent folder ID. Use 'root' to get items in the root folder." + }, + { + "name": "types", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/TestType" + } + }, + { + "type": "null" + } + ], + "description": "If present, the endpoint will return only tests/folders of the given types.", + "title": "Types" + }, + "description": "If present, the endpoint will return only tests/folders of the given types." + }, + { + "name": "include_folders", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Deprecated. Use the `types` query param and include `folder` instead.", + "deprecated": true, + "title": "Include Folders" + }, + "description": "Deprecated. Use the `types` query param and include `folder` instead.", + "deprecated": true + }, + { + "name": "sort_mode", + "in": "query", + "required": false, + "schema": { + "enum": [ + "default", + "folders_first" + ], + "type": "string", + "description": "Sort mode for listing tests. Use 'folders_first' to place folders before tests.", + "default": "default", + "title": "Sort Mode" + }, + "description": "Sort mode for listing tests. Use 'folders_first' to place folders before tests." + }, + { + "name": "sharing_mode", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TestSharingMode", + "description": "Filter test visibility. Use `shared_with_me` to return only tests/folders shared with the current user that they did not create.", + "default": "all" + }, + "description": "Filter test visibility. Use `shared_with_me` to return only tests/folders shared with the current user that they did not create." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTestsPageResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/test-invocations": { + "get": { + "summary": "List Test Invocations", + "description": "Lists all test invocations with pagination support and optional search filtering.", + "operationId": "list_test_invocations_route", + "parameters": [ + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by agent ID", + "title": "Agent Id" + }, + "description": "Filter by agent ID" + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many Tests to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many Tests to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTestInvocationsPageResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests", + "invocations" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/agents/{agent_id}/run-tests": { + "post": { + "summary": "Run Tests On The Agent", + "description": "Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration.", + "operationId": "run_agent_test_suite_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunAgentTestsRequestModel" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTestSuiteInvocationResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents" + ], + "x-fern-sdk-method-name": "run_tests" + } + }, + "/v1/convai/test-invocations/{test_invocation_id}": { + "get": { + "summary": "Get Test Invocation", + "description": "Gets a test invocation by ID.", + "operationId": "get_test_invocation_route", + "parameters": [ + { + "name": "test_invocation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a test invocation. This is returned when tests are run.", + "embed": true, + "title": "Test Invocation Id" + }, + "description": "The id of a test invocation. This is returned when tests are run." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTestSuiteInvocationResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests", + "invocations" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/convai/test-invocations/{test_invocation_id}/resubmit": { + "post": { + "summary": "Resubmit Tests", + "description": "Resubmits specific test runs from a test invocation.", + "operationId": "resubmit_tests_route", + "parameters": [ + { + "name": "test_invocation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a test invocation. This is returned when tests are run.", + "embed": true, + "title": "Test Invocation Id" + }, + "description": "The id of a test invocation. This is returned when tests are run." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResubmitTestsRequestModel" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tests", + "invocations" + ], + "x-fern-sdk-method-name": "resubmit" + } + }, + "/v1/convai/conversations": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Conversations", + "description": "Get all conversations of agents that user owns. With option to restrict to a specific agent.", + "operationId": "get_conversation_histories_route", + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz", + "seng_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "title": "Agent Id" + }, + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource." + }, + { + "name": "call_successful", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluationSuccessResult" + }, + { + "type": "null" + } + ], + "description": "The result of the success evaluation", + "examples": [ + "success" + ], + "title": "Call Successful" + }, + "description": "The result of the success evaluation" + }, + { + "name": "call_start_before_unix", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Unix timestamp (in seconds) to filter conversations up to this start date.", + "title": "Call Start Before Unix" + }, + "description": "Unix timestamp (in seconds) to filter conversations up to this start date." + }, + { + "name": "call_start_after_unix", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Unix timestamp (in seconds) to filter conversations after to this start date.", + "title": "Call Start After Unix" + }, + "description": "Unix timestamp (in seconds) to filter conversations after to this start date." + }, + { + "name": "call_duration_min_secs", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Minimum call duration in seconds.", + "title": "Call Duration Min Secs" + }, + "description": "Minimum call duration in seconds." + }, + { + "name": "call_duration_max_secs", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum call duration in seconds.", + "title": "Call Duration Max Secs" + }, + "description": "Maximum call duration in seconds." + }, + { + "name": "rating_max", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "Maximum overall rating (1-5).", + "title": "Rating Max" + }, + "description": "Maximum overall rating (1-5)." + }, + { + "name": "rating_min", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "Minimum overall rating (1-5).", + "title": "Rating Min" + }, + "description": "Minimum overall rating (1-5)." + }, + { + "name": "has_feedback_comment", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Filter conversations with user feedback comments.", + "title": "Has Feedback Comment" + }, + "description": "Filter conversations with user feedback comments." + }, + { + "name": "user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter conversations by the user ID who initiated them.", + "title": "User Id" + }, + "description": "Filter conversations by the user ID who initiated them." + }, + { + "name": "evaluation_params", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Evaluation filters. Repeat param. Format: criteria_id:result. Example: eval=value_framing:success", + "title": "Evaluation Params" + }, + "description": "Evaluation filters. Repeat param. Format: criteria_id:result. Example: eval=value_framing:success" + }, + { + "name": "data_collection_params", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Data collection filters. Repeat param. Format: id:op:value where op is one of eq|neq|gt|gte|lt|lte|in|exists|missing. For in, pipe-delimit values.", + "title": "Data Collection Params" + }, + "description": "Data collection filters. Repeat param. Format: id:op:value where op is one of eq|neq|gt|gte|lt|lte|in|exists|missing. For in, pipe-delimit values." + }, + { + "name": "tool_names", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Filter conversations by tool names used during the call.", + "title": "Tool Names" + }, + "description": "Filter conversations by tool names used during the call." + }, + { + "name": "tool_names_successful", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Filter conversations by tool names that had successful calls.", + "title": "Tool Names Successful" + }, + "description": "Filter conversations by tool names that had successful calls." + }, + { + "name": "tool_names_errored", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Filter conversations by tool names that had errored calls.", + "title": "Tool Names Errored" + }, + "description": "Filter conversations by tool names that had errored calls." + }, + { + "name": "main_languages", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Filter conversations by detected main language (language code).", + "title": "Main Languages" + }, + "description": "Filter conversations by detected main language (language code)." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many conversations to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many conversations to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "summary_mode", + "in": "query", + "required": false, + "schema": { + "enum": [ + "exclude", + "include" + ], + "type": "string", + "description": "Whether to include transcript summaries in the response.", + "default": "exclude", + "title": "Summary Mode" + }, + "description": "Whether to include transcript summaries in the response." + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Full-text or fuzzy search over transcript messages", + "deprecated": true, + "title": "Search" + }, + "description": "Full-text or fuzzy search over transcript messages", + "deprecated": true + }, + { + "name": "conversation_initiation_source", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationSource" + }, + { + "type": "null" + } + ], + "title": "Conversation Initiation Source" + } + }, + { + "name": "text_only", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Text Only" + } + }, + { + "name": "branch_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter conversations by branch ID.", + "title": "Branch Id" + }, + "description": "Filter conversations by branch ID." + }, + { + "name": "topic_ids", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Filter conversations by topic IDs assigned during topic discovery.", + "title": "Topic Ids" + }, + "description": "Filter conversations by topic IDs assigned during topic discovery." + }, + { + "name": "exclude_statuses", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "enum": [ + "initiated", + "in-progress", + "processing", + "done", + "failed" + ], + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Exclude conversations with the given statuses. Useful for hiding in-progress / processing conversations from list views.", + "title": "Exclude Statuses" + }, + "description": "Exclude conversations with the given statuses. Useful for hiding in-progress / processing conversations from list views." + }, + { + "name": "tag_ids", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Filter conversations by conversation tag IDs assigned via the conversation-tags endpoints.", + "title": "Tag Ids" + }, + "description": "Filter conversations by conversation tag IDs assigned via the conversation-tags endpoints." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConversationsPageResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/users": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Conversation Users", + "description": "Get distinct users from conversations with pagination.", + "operationId": "get_conversation_users_route", + "parameters": [ + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz", + "seng_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "title": "Agent Id" + }, + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource." + }, + { + "name": "branch_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter conversations by branch ID.", + "title": "Branch Id" + }, + "description": "Filter conversations by branch ID." + }, + { + "name": "call_start_before_unix", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Unix timestamp (in seconds) to filter conversations up to this start date.", + "title": "Call Start Before Unix" + }, + "description": "Unix timestamp (in seconds) to filter conversations up to this start date." + }, + { + "name": "call_start_after_unix", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Unix timestamp (in seconds) to filter conversations after to this start date.", + "title": "Call Start After Unix" + }, + "description": "Unix timestamp (in seconds) to filter conversations after to this start date." + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Search/filter by user ID (exact match).", + "title": "Search" + }, + "description": "Search/filter by user ID (exact match)." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many users to return at maximum. Defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many users to return at maximum. Defaults to 30." + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UsersSortBy", + "description": "The field to sort the results by. Defaults to last_contact_unix_secs.", + "default": "last_contact_unix_secs" + }, + "description": "The field to sort the results by. Defaults to last_contact_unix_secs." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConversationUsersPageResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "users" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/conversations/{conversation_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Conversation Details", + "description": "Get the details of a particular conversation", + "operationId": "get_conversation_history_route", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the conversation you're taking the action on.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Conversation Id" + }, + "description": "The id of the conversation you're taking the action on." + }, + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "enum": [ + "json", + "opentelemetry" + ], + "type": "string", + "description": "Response format. Defaults to 'json'. Set to 'opentelemetry' for an OTLP-compatible trace payload using the same structure as the post-call webhook.", + "default": "json", + "title": "Format" + }, + "description": "Response format. Defaults to 'json'. Set to 'opentelemetry' for an OTLP-compatible trace payload using the same structure as the post-call webhook." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConversationResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations" + ], + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Conversation", + "description": "Delete a particular conversation", + "operationId": "delete_conversation_route", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the conversation you're taking the action on.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Conversation Id" + }, + "description": "The id of the conversation you're taking the action on." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/conversations/{conversation_id}/sip-messages": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Sip Messages For A Conversation", + "description": "Get SIP messages associated with a conversation's phone call", + "operationId": "get_conversation_sip_messages", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the conversation you're taking the action on.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Conversation Id" + }, + "description": "The id of the conversation you're taking the action on." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 20, + "minimum": 1, + "default": 20, + "title": "Page Size" + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSIPLogMessagesResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations" + ], + "x-fern-sdk-method-name": "get_sip_messages" + } + }, + "/v1/convai/conversations/{conversation_id}/audio": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Conversation Audio", + "description": "Get the audio recording of a particular conversation", + "operationId": "get_conversation_audio_route", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the conversation you're taking the action on.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Conversation Id" + }, + "description": "The id of the conversation you're taking the action on." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "audio/mpeg": {} + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "audio" + ], + "x-fern-sdk-method-name": "get", + "x-fern-streaming": true + } + }, + "/v1/convai/conversations/{conversation_id}/feedback": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Send Conversation Feedback", + "description": "Send the feedback for the given conversation", + "operationId": "post_conversation_feedback_route", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of the conversation you're taking the action on.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Conversation Id" + }, + "description": "The id of the conversation you're taking the action on." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationFeedbackRequestModel" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "feedback" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/conversations/messages/text-search": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Text Search Conversation Messages", + "description": "Search through conversation transcript messages by full-text and fuzzy search", + "operationId": "text_search_conversation_messages_route", + "parameters": [ + { + "name": "text_query", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "The search query text for full-text and fuzzy matching", + "title": "Text Query" + }, + "description": "The search query text for full-text and fuzzy matching", + "examples": { + "default": { + "summary": "Keyword-style query", + "value": "refund policy" + } + } + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz", + "seng_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "title": "Agent Id" + }, + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource." + }, + { + "name": "call_successful", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluationSuccessResult" + }, + { + "type": "null" + } + ], + "description": "The result of the success evaluation", + "examples": [ + "success" + ], + "title": "Call Successful" + }, + "description": "The result of the success evaluation" + }, + { + "name": "call_start_before_unix", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Unix timestamp (in seconds) to filter conversations up to this start date.", + "title": "Call Start Before Unix" + }, + "description": "Unix timestamp (in seconds) to filter conversations up to this start date." + }, + { + "name": "call_start_after_unix", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Unix timestamp (in seconds) to filter conversations after to this start date.", + "title": "Call Start After Unix" + }, + "description": "Unix timestamp (in seconds) to filter conversations after to this start date." + }, + { + "name": "call_duration_min_secs", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Minimum call duration in seconds.", + "title": "Call Duration Min Secs" + }, + "description": "Minimum call duration in seconds." + }, + { + "name": "call_duration_max_secs", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum call duration in seconds.", + "title": "Call Duration Max Secs" + }, + "description": "Maximum call duration in seconds." + }, + { + "name": "rating_max", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "Maximum overall rating (1-5).", + "title": "Rating Max" + }, + "description": "Maximum overall rating (1-5)." + }, + { + "name": "rating_min", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "Minimum overall rating (1-5).", + "title": "Rating Min" + }, + "description": "Minimum overall rating (1-5)." + }, + { + "name": "has_feedback_comment", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Filter conversations with user feedback comments.", + "title": "Has Feedback Comment" + }, + "description": "Filter conversations with user feedback comments." + }, + { + "name": "user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter conversations by the user ID who initiated them.", + "title": "User Id" + }, + "description": "Filter conversations by the user ID who initiated them." + }, + { + "name": "evaluation_params", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Evaluation filters. Repeat param. Format: criteria_id:result. Example: eval=value_framing:success", + "title": "Evaluation Params" + }, + "description": "Evaluation filters. Repeat param. Format: criteria_id:result. Example: eval=value_framing:success" + }, + { + "name": "data_collection_params", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Data collection filters. Repeat param. Format: id:op:value where op is one of eq|neq|gt|gte|lt|lte|in|exists|missing. For in, pipe-delimit values.", + "title": "Data Collection Params" + }, + "description": "Data collection filters. Repeat param. Format: id:op:value where op is one of eq|neq|gt|gte|lt|lte|in|exists|missing. For in, pipe-delimit values." + }, + { + "name": "tool_names", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Filter conversations by tool names used during the call.", + "title": "Tool Names" + }, + "description": "Filter conversations by tool names used during the call." + }, + { + "name": "tool_names_successful", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Filter conversations by tool names that had successful calls.", + "title": "Tool Names Successful" + }, + "description": "Filter conversations by tool names that had successful calls." + }, + { + "name": "tool_names_errored", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Filter conversations by tool names that had errored calls.", + "title": "Tool Names Errored" + }, + "description": "Filter conversations by tool names that had errored calls." + }, + { + "name": "main_languages", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Filter conversations by detected main language (language code).", + "title": "Main Languages" + }, + "description": "Filter conversations by detected main language (language code)." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 50, + "minimum": 1, + "description": "Number of results per page. Max 50.", + "default": 20, + "title": "Page Size" + }, + "description": "Number of results per page. Max 50." + }, + { + "name": "summary_mode", + "in": "query", + "required": false, + "schema": { + "enum": [ + "exclude", + "include" + ], + "type": "string", + "description": "Whether to include transcript summaries in the response.", + "default": "exclude", + "title": "Summary Mode" + }, + "description": "Whether to include transcript summaries in the response." + }, + { + "name": "conversation_initiation_source", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationSource" + }, + { + "type": "null" + } + ], + "title": "Conversation Initiation Source" + } + }, + { + "name": "text_only", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Text Only" + } + }, + { + "name": "branch_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter conversations by branch ID.", + "title": "Branch Id" + }, + "description": "Filter conversations by branch ID." + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/MessageSearchSortBy", + "description": "Sort order for search results. 'search_score' sorts by search score, 'created_at' sorts by conversation start time.", + "default": "search_score" + }, + "description": "Sort order for search results. 'search_score' sorts by search score, 'created_at' sorts by conversation start time." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessagesSearchResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "messages" + ], + "x-fern-sdk-method-name": "text_search" + } + }, + "/v1/convai/conversations/messages/smart-search": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Smart Search Conversation Messages", + "description": "Search conversation transcripts by semantic similarity to surface relevant messages based on meaning and intent, rather than exact keyword matches", + "operationId": "smart_search_conversation_messages_route", + "parameters": [ + { + "name": "text_query", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "The search query text for semantic similarity matching", + "title": "Text Query" + }, + "description": "The search query text for semantic similarity matching", + "examples": { + "default": { + "summary": "Intent-style query", + "value": "Customer asking to cancel and get money back" + } + } + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz", + "seng_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "title": "Agent Id" + }, + "description": "Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 50, + "minimum": 1, + "description": "Number of results per page. Max 50.", + "default": 20, + "title": "Page Size" + }, + "description": "Number of results per page. Max 50." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessagesSearchResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "messages" + ], + "x-fern-sdk-method-name": "search" + } + }, + "/v1/convai/conversations/{conversation_id}/tags": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Assign Conversation Tags", + "description": "Assign one or more conversation tags to a conversation. Tags that are already assigned are ignored. Tags must belong to the same workspace.", + "operationId": "assign_conversation_tags_route", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignConversationTagsRequestModel", + "description": "Tag ids to assign to the conversation." + } + } + } + }, + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "tags" + ], + "x-fern-sdk-method-name": "assign" + } + }, + "/v1/convai/conversations/{conversation_id}/tags/{tag_id}": { + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Unassign Conversation Tag", + "description": "Remove a single conversation tag from a conversation.", + "operationId": "unassign_conversation_tag_route", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "tag_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Tag Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "tags" + ], + "x-fern-sdk-method-name": "unassign" + } + }, + "/v1/convai/tags": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "List Conversation Tags", + "description": "List conversation tags for the workspace, ordered by most recently created first.", + "operationId": "list_conversation_tags_route", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many conversation tags to return. Can not exceed 100.", + "default": 100, + "title": "Page Size" + }, + "description": "How many conversation tags to return. Can not exceed 100." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConversationTagsPageResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "tags" + ], + "x-fern-sdk-method-name": "list" + }, + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Conversation Tag", + "description": "Create a new conversation tag for the workspace.", + "operationId": "create_conversation_tag_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConversationTagRequestModel", + "description": "Conversation tag to create." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationTagResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "tags" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/tags/{tag_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Conversation Tag", + "description": "Get a conversation tag by ID.", + "operationId": "get_conversation_tag_route", + "parameters": [ + { + "name": "tag_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Tag Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationTagResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "tags" + ], + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Conversation Tag", + "description": "Update a conversation tag's title and/or description. Restricted to the tag owner or a workspace admin.", + "operationId": "update_conversation_tag_route", + "parameters": [ + { + "name": "tag_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Tag Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchConversationTagRequestModel", + "description": "Fields to update. Omit a field to leave it unchanged." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationTagResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "tags" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Conversation Tag", + "description": "Delete a conversation tag. Restricted to the tag owner or a workspace admin.", + "operationId": "delete_conversation_tag_route", + "parameters": [ + { + "name": "tag_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Tag Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "tags" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/phone-numbers": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Import Phone Number", + "description": "Import Phone Number from provider configuration (Twilio or SIP trunk)", + "operationId": "create_phone_number_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateTwilioPhoneNumberRequest" + }, + { + "$ref": "#/components/schemas/CreateSIPTrunkPhoneNumberRequestV2" + } + ], + "description": "Create Phone Request Information", + "title": "Phone Request" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePhoneNumberResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "phone_numbers" + ], + "x-fern-sdk-method-name": "create" + }, + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "List Phone Numbers", + "description": "Retrieve all Phone Numbers", + "operationId": "list_phone_numbers_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetPhoneNumberTwilioResponseModel" + }, + { + "$ref": "#/components/schemas/GetPhoneNumberSIPTrunkResponseModel" + } + ], + "discriminator": { + "propertyName": "provider", + "mapping": { + "twilio": "#/components/schemas/GetPhoneNumberTwilioResponseModel", + "sip_trunk": "#/components/schemas/GetPhoneNumberSIPTrunkResponseModel" + } + } + }, + "title": "Response List Phone Numbers V1 Convai Phone Numbers Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "phone_numbers" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/phone-numbers/{phone_number_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Phone Number", + "description": "Retrieve Phone Number details by ID", + "operationId": "get_phone_number_route", + "parameters": [ + { + "name": "phone_number_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "TeaqRRdTcIfIu2i7BYfT" + ], + "embed": true, + "title": "Phone Number Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetPhoneNumberTwilioResponseModel" + }, + { + "$ref": "#/components/schemas/GetPhoneNumberSIPTrunkResponseModel" + } + ], + "discriminator": { + "propertyName": "provider", + "mapping": { + "twilio": "#/components/schemas/GetPhoneNumberTwilioResponseModel", + "sip_trunk": "#/components/schemas/GetPhoneNumberSIPTrunkResponseModel" + } + }, + "title": "Response Get Phone Number V1 Convai Phone Numbers Phone Number Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "phone_numbers" + ], + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Phone Number", + "description": "Delete Phone Number by ID", + "operationId": "delete_phone_number_route", + "parameters": [ + { + "name": "phone_number_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "TeaqRRdTcIfIu2i7BYfT" + ], + "embed": true, + "title": "Phone Number Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "phone_numbers" + ], + "x-fern-sdk-method-name": "delete" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Phone Number", + "description": "Update assigned agent of a phone number", + "operationId": "update_phone_number_route", + "parameters": [ + { + "name": "phone_number_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "TeaqRRdTcIfIu2i7BYfT" + ], + "embed": true, + "title": "Phone Number Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePhoneNumberRequest", + "description": "Patch Phone Request Information" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetPhoneNumberTwilioResponseModel" + }, + { + "$ref": "#/components/schemas/GetPhoneNumberSIPTrunkResponseModel" + } + ], + "discriminator": { + "propertyName": "provider", + "mapping": { + "twilio": "#/components/schemas/GetPhoneNumberTwilioResponseModel", + "sip_trunk": "#/components/schemas/GetPhoneNumberSIPTrunkResponseModel" + } + }, + "title": "Response Update Phone Number V1 Convai Phone Numbers Phone Number Id Patch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "phone_numbers" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/convai/phone-numbers/{phone_number_id}/sip-messages": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Sip Messages For A Phone Number", + "description": "Get SIP messages for a phone number", + "operationId": "list_sip_messages", + "parameters": [ + { + "name": "phone_number_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "TeaqRRdTcIfIu2i7BYfT" + ], + "embed": true, + "title": "Phone Number Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 20, + "minimum": 1, + "default": 20, + "title": "Page Size" + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSIPLogMessagesResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "phone_numbers" + ], + "x-fern-sdk-method-name": "get_sip_messages" + } + }, + "/v1/convai/llm-usage/calculate": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Calculate Expected Llm Usage", + "description": "Returns a list of LLM models and the expected cost for using them based on the provided values.", + "operationId": "get_public_llm_expected_cost_calculation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LLMUsageCalculatorPublicRequestModel" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LLMUsageCalculatorResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "llm_usage" + ], + "x-fern-sdk-method-name": "calculate" + } + }, + "/v1/convai/llm/list": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "List Available Llms", + "description": "Returns a list of available LLM models that can be used with agents, including their capabilities and any deprecation status. The response is filtered based on the data residency of the deployment and any compliance requirements (e.g. HIPAA) of the workspace subscription.", + "operationId": "list_available_llms", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LLMListResponseModel-Input" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "llm" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/conversations/{conversation_id}/files": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Upload File", + "description": "Upload an image or PDF file for a conversation. Returns a unique file ID that can be used to reference the file in the conversation.", + "operationId": "upload_file_route", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Upload_file_v1_convai_conversations__conversation_id__files_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvAIFileUploadResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "files" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/conversations/{conversation_id}/files/{file_id}": { + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete File Upload", + "description": "Remove a file upload from a conversation. Only possible if the file hasn't already been used in the conversation.", + "operationId": "cancel_file_upload_route", + "parameters": [ + { + "name": "file_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "File Id" + } + }, + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvAIFileUploadResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "files" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/analytics/live-count": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Live Count", + "description": "Get the live count of the ongoing conversations.", + "operationId": "get_live_count", + "parameters": [ + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The id of an agent to restrict the analytics to.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Agent Id" + }, + "description": "The id of an agent to restrict the analytics to." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLiveCountResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "analytics", + "live_count" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/convai/knowledge-base/summaries": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Knowledge Base Summaries By Ids", + "description": "Gets multiple knowledge base document summaries by their IDs.", + "operationId": "get_agent_knowledge_base_summaries_route", + "parameters": [ + { + "name": "document_ids", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 100, + "description": "The ids of knowledge base documents.", + "examples": [ + [ + "21m00Tcm4TlvDq8ikWAM", + "31n11Udm5UmwEr9jkXBN" + ] + ], + "title": "Document Ids" + }, + "description": "The ids of knowledge base documents." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/KnowledgeBaseSummaryBatchSuccessfulResponseModel" + }, + { + "$ref": "#/components/schemas/BatchFailureResponseModel" + } + ], + "discriminator": { + "propertyName": "status", + "mapping": { + "success": "#/components/schemas/KnowledgeBaseSummaryBatchSuccessfulResponseModel", + "failure": "#/components/schemas/BatchFailureResponseModel" + } + } + }, + "title": "Response Get Knowledge Base Summaries By Ids V1 Convai Knowledge Base Summaries Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents", + "summaries" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/convai/knowledge-base": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Add To Knowledge Base", + "description": "Uploads a file or reference a webpage to use as part of the shared knowledge base", + "operationId": "add_documentation_to_knowledge_base", + "deprecated": true, + "parameters": [ + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "", + "title": "Agent Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Add_to_knowledge_base_v1_convai_knowledge_base_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddKnowledgeBaseResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "conversational_ai", + "x-fern-sdk-method-name": "add_to_knowledge_base" + }, + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Knowledge Base List", + "description": "Get a list of available knowledge base documents", + "operationId": "get_knowledge_base_list_route", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "If specified, the endpoint returns only such knowledge base documents whose names start with this string.", + "title": "Search" + }, + "description": "If specified, the endpoint returns only such knowledge base documents whose names start with this string." + }, + { + "name": "show_only_owned_documents", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "If set to true, the endpoint will return only documents owned by you (and not shared from somebody else). Deprecated: use created_by_user_id instead.", + "deprecated": true, + "default": false, + "title": "Show Only Owned Documents" + }, + "description": "If set to true, the endpoint will return only documents owned by you (and not shared from somebody else). Deprecated: use created_by_user_id instead.", + "deprecated": true + }, + { + "name": "created_by_user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter documents by creator user ID. When set, only documents created by this user are returned. Takes precedence over show_only_owned_documents. Use '@me' to refer to the authenticated user.", + "title": "Created By User Id" + }, + "description": "Filter documents by creator user ID. When set, only documents created by this user are returned. Takes precedence over show_only_owned_documents. Use '@me' to refer to the authenticated user." + }, + { + "name": "types", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentType" + } + }, + { + "type": "null" + } + ], + "description": "If present, the endpoint will return only documents of the given types.", + "title": "Types" + }, + "description": "If present, the endpoint will return only documents of the given types." + }, + { + "name": "parent_folder_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "If set, the endpoint will return only documents that are direct children of the given folder.", + "title": "Parent Folder Id" + }, + "description": "If set, the endpoint will return only documents that are direct children of the given folder." + }, + { + "name": "ancestor_folder_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "If set, the endpoint will return only documents that are descendants of the given folder.", + "title": "Ancestor Folder Id" + }, + "description": "If set, the endpoint will return only documents that are descendants of the given folder." + }, + { + "name": "folders_first", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether folders should be returned first in the list of documents.", + "default": false, + "title": "Folders First" + }, + "description": "Whether folders should be returned first in the list of documents." + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/SortDirection", + "description": "The direction to sort the results", + "default": "desc" + }, + "description": "The direction to sort the results" + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/KnowledgeBaseSortBy" + }, + { + "type": "null" + } + ], + "description": "The field to sort the results by", + "title": "Sort By" + }, + "description": "The field to sort the results by" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetKnowledgeBaseListResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/knowledge-base/url": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Url Document", + "description": "Create a knowledge base document generated by scraping the given webpage.", + "operationId": "create_url_document_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_URL_document_v1_convai_knowledge_base_url_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddKnowledgeBaseResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "create_from_url" + } + }, + "/v1/convai/knowledge-base/file": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create File Document", + "description": "Create a knowledge base document generated form the uploaded file.", + "operationId": "create_file_document_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Create_file_document_v1_convai_knowledge_base_file_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddKnowledgeBaseResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "create_from_file" + } + }, + "/v1/convai/knowledge-base/text": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Text Document", + "description": "Create a knowledge base document containing the provided text.", + "operationId": "create_text_document_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_text_document_v1_convai_knowledge_base_text_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddKnowledgeBaseResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "create_from_text" + } + }, + "/v1/convai/knowledge-base/folder": { + "post": { + "tags": [ + "Conversational AI" + ], + "summary": "Create Folder", + "description": "Create a folder used for grouping documents together.", + "operationId": "create_folder_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_folder_v1_convai_knowledge_base_folder_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddKnowledgeBaseResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "create_folder" + } + }, + "/v1/convai/knowledge-base/{documentation_id}": { + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Document", + "description": "Update the name and/or content of a document.", + "operationId": "update_document_route", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_document_v1_convai_knowledge_base__documentation_id__patch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetKnowledgeBaseURLResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseFileResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseTextResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseFolderResponseModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "url": "#/components/schemas/GetKnowledgeBaseURLResponseModel", + "file": "#/components/schemas/GetKnowledgeBaseFileResponseModel", + "text": "#/components/schemas/GetKnowledgeBaseTextResponseModel", + "folder": "#/components/schemas/GetKnowledgeBaseFolderResponseModel" + } + }, + "title": "Response Update Document V1 Convai Knowledge Base Documentation Id Patch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "update" + }, + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Documentation From Knowledge Base", + "description": "Get details about a specific documentation making up the agent's knowledge base", + "operationId": "get_documentation_from_knowledge_base", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "", + "title": "Agent Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetKnowledgeBaseURLResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseFileResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseTextResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseFolderResponseModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "url": "#/components/schemas/GetKnowledgeBaseURLResponseModel", + "file": "#/components/schemas/GetKnowledgeBaseFileResponseModel", + "text": "#/components/schemas/GetKnowledgeBaseTextResponseModel", + "folder": "#/components/schemas/GetKnowledgeBaseFolderResponseModel" + } + }, + "title": "Response Get Documentation From Knowledge Base V1 Convai Knowledge Base Documentation Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Knowledge Base Document Or Folder", + "description": "Delete a document or folder from the knowledge base.", + "operationId": "delete_knowledge_base_document", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "If set to true, the document or folder will be deleted regardless of whether it is used by any agents and it will be removed from the dependent agents. For non-empty folders, this will also delete all child documents and folders.", + "default": false, + "title": "Force" + }, + "description": "If set to true, the document or folder will be deleted regardless of whether it is used by any agents and it will be removed from the dependent agents. For non-empty folders, this will also delete all child documents and folders." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/knowledge-base/{documentation_id}/update-file": { + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update File Document", + "description": "Update the source file of a file document. The document name, content, and metadata are updated to reflect the new file. Any manual content edits will be overwritten.", + "operationId": "update_file_document_route", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Update_file_document_v1_convai_knowledge_base__documentation_id__update_file_patch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetKnowledgeBaseURLResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseFileResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseTextResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseFolderResponseModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "url": "#/components/schemas/GetKnowledgeBaseURLResponseModel", + "file": "#/components/schemas/GetKnowledgeBaseFileResponseModel", + "text": "#/components/schemas/GetKnowledgeBaseTextResponseModel", + "folder": "#/components/schemas/GetKnowledgeBaseFolderResponseModel" + } + }, + "title": "Response Update File Document V1 Convai Knowledge Base Documentation Id Update File Patch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "document" + ], + "x-fern-sdk-method-name": "update_file" + } + }, + "/v1/convai/knowledge-base/rag-index": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Compute Rag Indexes In Batch", + "description": "Retrieves and/or creates RAG indexes for multiple knowledge base documents in a single request. Maximum 100 items per request.", + "operationId": "get_or_create_rag_indexes", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Compute_RAG_indexes_in_batch_v1_convai_knowledge_base_rag_index_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/RAGIndexBatchSuccessfulResponseModel" + }, + { + "$ref": "#/components/schemas/BatchFailureResponseModel" + } + ], + "discriminator": { + "propertyName": "status", + "mapping": { + "success": "#/components/schemas/RAGIndexBatchSuccessfulResponseModel", + "failure": "#/components/schemas/BatchFailureResponseModel" + } + } + }, + "title": "Response Compute Rag Indexes In Batch V1 Convai Knowledge Base Rag Index Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base" + ], + "x-fern-sdk-method-name": "get_or_create_rag_indexes" + }, + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Rag Index Overview.", + "description": "Provides total size and other information of RAG indexes used by knowledgebase documents", + "operationId": "get_rag_index_overview", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RAGIndexOverviewResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "conversational_ai", + "x-fern-sdk-method-name": "rag_index_overview" + } + }, + "/v1/convai/knowledge-base/{documentation_id}/refresh": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Refresh Url Document Content", + "description": "Manually refresh a URL document by re-fetching its content from the source URL.", + "operationId": "refresh_url_document_route", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetKnowledgeBaseURLResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseFileResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseTextResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseFolderResponseModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "url": "#/components/schemas/GetKnowledgeBaseURLResponseModel", + "file": "#/components/schemas/GetKnowledgeBaseFileResponseModel", + "text": "#/components/schemas/GetKnowledgeBaseTextResponseModel", + "folder": "#/components/schemas/GetKnowledgeBaseFolderResponseModel" + } + }, + "title": "Response Refresh Url Document Content V1 Convai Knowledge Base Documentation Id Refresh Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "document" + ], + "x-fern-sdk-method-name": "refresh" + } + }, + "/v1/convai/knowledge-base/{documentation_id}/rag-index": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Compute Rag Index.", + "description": "In case the document is not RAG indexed, it triggers rag indexing task, otherwise it just returns the current status.", + "operationId": "rag_index_status", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RAGIndexRequestModel", + "description": "Payload for RAG index status endpoint." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RAGDocumentIndexResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "document" + ], + "x-fern-sdk-method-name": "compute_rag_index" + }, + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Rag Indexes Of The Specified Knowledgebase Document.", + "description": "Provides information about all RAG indexes of the specified knowledgebase document.", + "operationId": "get_rag_indexes", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RAGDocumentIndexesResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "conversational_ai", + "x-fern-sdk-method-name": "get_document_rag_indexes" + } + }, + "/v1/convai/knowledge-base/{documentation_id}/rag-index/{rag_index_id}": { + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Rag Index.", + "description": "Delete RAG index for the knowledgebase document.", + "operationId": "delete_rag_index", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "rag_index_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of RAG index of document from the knowledge base.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Rag Index Id" + }, + "description": "The id of RAG index of document from the knowledge base." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RAGDocumentIndexResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "conversational_ai", + "x-fern-sdk-method-name": "delete_document_rag_index" + } + }, + "/v1/convai/knowledge-base/search": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Search Knowledge Base Content", + "description": "Fuzzy text search over knowledge base document content", + "operationId": "search_knowledge_base_content_route", + "parameters": [ + { + "name": "query", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "The search query text", + "title": "Query" + }, + "description": "The search query text" + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "types", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentType" + } + }, + { + "type": "null" + } + ], + "description": "If present, the endpoint will return only documents of the given types.", + "title": "Types" + }, + "description": "If present, the endpoint will return only documents of the given types." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KnowledgeBaseContentSearchResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base" + ], + "x-fern-sdk-method-name": "search" + } + }, + "/v1/convai/knowledge-base/{documentation_id}/dependent-agents": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Dependent Agents List", + "description": "Get a list of agents depending on this knowledge base document", + "operationId": "get_knowledge_base_dependent_agents", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "dependent_type", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/KnowledgeBaseDependentType", + "description": "Type of dependent agents to return.", + "default": "all" + }, + "description": "Type of dependent agents to return." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetKnowledgeBaseDependentAgentsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "get_agents" + } + }, + "/v1/convai/knowledge-base/{documentation_id}/content": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Document Content", + "description": "Get the entire content of a document from the knowledge base", + "operationId": "get_knowledge_base_content", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Streaming document content", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "get_content", + "x-fern-sdk-streaming": true + } + }, + "/v1/convai/knowledge-base/{documentation_id}/source-file-url": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Document Source File Url", + "description": "Get a signed URL to download the original source file of a file-type document from the knowledge base", + "operationId": "get_knowledge_base_source_file_url", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KnowledgeBaseSourceFileUrlResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "get_source_file_url" + } + }, + "/v1/convai/knowledge-base/{documentation_id}/chunk/{chunk_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Documentation Chunk From Knowledge Base", + "description": "Get details about a specific documentation part used by RAG.", + "operationId": "get_documentation_chunk_from_knowledge_base", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "chunk_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document RAG chunk from the knowledge base.", + "examples": [ + 1 + ], + "embed": true, + "title": "Chunk Id" + }, + "description": "The id of a document RAG chunk from the knowledge base." + }, + { + "name": "embedding_model", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EmbeddingModelEnum" + }, + { + "type": "null" + } + ], + "description": "The embedding model used to retrieve the chunk.", + "examples": [ + "e5_mistral_7b_instruct", + "multilingual_e5_large_instruct" + ], + "title": "Embedding Model" + }, + "description": "The embedding model used to retrieve the chunk." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentChunkResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents", + "chunk" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/convai/knowledge-base/{documentation_id}/chunks": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get All Rag Chunks For A Document", + "description": "Get all RAG chunks for a specific knowledge base document.", + "operationId": "get_documentation_chunks_from_knowledge_base", + "parameters": [ + { + "name": "documentation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Documentation Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "embedding_model", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/EmbeddingModelEnum", + "description": "The embedding model used to retrieve the chunk.", + "examples": [ + "e5_mistral_7b_instruct", + "multilingual_e5_large_instruct" + ] + }, + "description": "The embedding model used to retrieve the chunk." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentChunksResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents", + "chunks" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/knowledge-base/{document_id}/move": { + "post": { + "tags": [ + "Conversational AI" + ], + "summary": "Move Entity To Folder", + "description": "Moves the entity from one folder to another.", + "operationId": "post_knowledge_base_move_route", + "parameters": [ + { + "name": "document_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of a document from the knowledge base. This is returned on document addition.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "embed": true, + "title": "Document Id" + }, + "description": "The id of a document from the knowledge base. This is returned on document addition." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Move_entity_to_folder_v1_convai_knowledge_base__document_id__move_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "move" + } + }, + "/v1/convai/knowledge-base/bulk-move": { + "post": { + "tags": [ + "Conversational AI" + ], + "summary": "Bulk Move Entities To Folder", + "description": "Moves multiple entities from one folder to another.", + "operationId": "post_knowledge_base_bulk_move_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Bulk_move_entities_to_folder_v1_convai_knowledge_base_bulk_move_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "knowledge_base", + "documents" + ], + "x-fern-sdk-method-name": "bulk_move" + } + }, + "/v1/convai/agents/{agent_id}/topics": { + "get": { + "tags": [ + "Agents Insights", + "Agents Platform" + ], + "summary": "Get Agent Conversation Topics", + "description": "Returns the latest topic discovery run results for a given agent.", + "operationId": "get_agent_topics_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the agent", + "title": "Agent Id" + }, + "description": "ID of the agent" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAgentTopicsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "topics" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/convai/tools": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Add Tool", + "description": "Add a new tool to the available tools in the workspace.", + "operationId": "add_tool_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolRequestModel", + "description": "A tool that an agent can provide to LLM." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tools" + ], + "x-fern-sdk-method-name": "create" + }, + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Tools", + "description": "Get all available tools in the workspace.", + "operationId": "get_tools_route", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "If specified, the endpoint returns only tools whose names start with this string.", + "title": "Search" + }, + "description": "If specified, the endpoint returns only tools whose names start with this string." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 100, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30.", + "title": "Page Size" + }, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "show_only_owned_documents", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "If set to true, the endpoint will return only tools owned by you (and not shared from somebody else). Deprecated: use created_by_user_id instead.", + "deprecated": true, + "default": false, + "title": "Show Only Owned Documents" + }, + "description": "If set to true, the endpoint will return only tools owned by you (and not shared from somebody else). Deprecated: use created_by_user_id instead.", + "deprecated": true + }, + { + "name": "created_by_user_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter tools by creator user ID. When set, only tools created by this user are returned. Takes precedence over show_only_owned_documents. Use '@me' to refer to the authenticated user.", + "title": "Created By User Id" + }, + "description": "Filter tools by creator user ID. When set, only tools created by this user are returned. Takes precedence over show_only_owned_documents. Use '@me' to refer to the authenticated user." + }, + { + "name": "types", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolTypeFilter" + } + }, + { + "type": "null" + } + ], + "description": "If present, the endpoint will return only tools of the given types.", + "title": "Types" + }, + "description": "If present, the endpoint will return only tools of the given types." + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/SortDirection", + "description": "The direction to sort the results", + "default": "desc" + }, + "description": "The direction to sort the results" + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolSortBy" + }, + { + "type": "null" + } + ], + "description": "The field to sort the results by", + "title": "Sort By" + }, + "description": "The field to sort the results by" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tools" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/tools/{tool_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Tool", + "description": "Get tool that is available in the workspace.", + "operationId": "get_tool_route", + "parameters": [ + { + "name": "tool_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the requested tool.", + "title": "Tool Id" + }, + "description": "ID of the requested tool." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tools" + ], + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Tool", + "description": "Update tool that is available in the workspace.", + "operationId": "update_tool_route", + "parameters": [ + { + "name": "tool_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the requested tool.", + "title": "Tool Id" + }, + "description": "ID of the requested tool." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolRequestModel", + "description": "A tool that an agent can provide to LLM." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tools" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Tool", + "description": "Delete tool from the workspace.", + "operationId": "delete_tool_route", + "parameters": [ + { + "name": "tool_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the requested tool.", + "title": "Tool Id" + }, + "description": "ID of the requested tool." + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "If set to true, the tool will be deleted regardless of whether it is used by any agents and it will be removed from the dependent agents and branches.", + "default": false, + "title": "Force" + }, + "description": "If set to true, the tool will be deleted regardless of whether it is used by any agents and it will be removed from the dependent agents and branches." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tools" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/tools/{tool_id}/dependent-agents": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Dependent Agents List", + "description": "Get a list of agents depending on this tool", + "operationId": "get_tool_dependent_agents_route", + "parameters": [ + { + "name": "tool_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the requested tool.", + "title": "Tool Id" + }, + "description": "ID of the requested tool." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetToolDependentAgentsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tools" + ], + "x-fern-sdk-method-name": "get_dependent_agents" + } + }, + "/v1/convai/tools/{tool_id}/executions": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Tool Executions", + "description": "Get paginated list of tool executions for a specific tool.", + "operationId": "get_tool_executions_route", + "parameters": [ + { + "name": "tool_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the requested tool.", + "title": "Tool Id" + }, + "description": "ID of the requested tool." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many documents to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "is_error", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Filter by error status. If not provided, returns all executions.", + "title": "Is Error" + }, + "description": "Filter by error status. If not provided, returns all executions." + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by agent ID.", + "title": "Agent Id" + }, + "description": "Filter by agent ID." + }, + { + "name": "branch_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by agent branch ID.", + "title": "Branch Id" + }, + "description": "Filter by agent branch ID." + }, + { + "name": "start_time", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Filter executions from this Unix timestamp (inclusive).", + "title": "Start Time" + }, + "description": "Filter executions from this Unix timestamp (inclusive)." + }, + { + "name": "end_time", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Filter executions until this Unix timestamp (inclusive).", + "title": "End Time" + }, + "description": "Filter executions until this Unix timestamp (inclusive)." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetToolExecutionsPageResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "tools", + "executions" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/convai/settings": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Convai Settings", + "description": "Retrieve Convai settings for the workspace", + "operationId": "get_settings_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConvAISettingsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "settings" + ], + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Convai Settings", + "description": "Update Convai settings for the workspace", + "operationId": "update_settings_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchConvAISettingsRequest", + "description": "Convai settings to update" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConvAISettingsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "settings" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/convai/settings/dashboard": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Convai Dashboard Settings", + "description": "Retrieve Convai dashboard settings for the workspace", + "operationId": "get_dashboard_settings_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConvAIDashboardSettingsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "dashboard", + "settings" + ], + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Convai Dashboard Settings", + "description": "Update Convai dashboard settings for the workspace", + "operationId": "update_dashboard_settings_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchConvAIDashboardSettingsRequest", + "description": "Convai dashboard settings to update" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConvAIDashboardSettingsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "dashboard", + "settings" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/convai/secrets": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Convai Workspace Secret", + "description": "Create a new secret for the workspace", + "operationId": "create_secret_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostWorkspaceSecretRequest", + "description": "Secret to create" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostWorkspaceSecretResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "secrets" + ], + "x-fern-sdk-method-name": "create" + }, + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Convai Workspace Secrets", + "description": "Get all workspace secrets for the user", + "operationId": "get_secrets_route", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 100, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "How many documents to return at maximum. Can not exceed 100. If not provided, returns all secrets.", + "title": "Page Size" + }, + "description": "How many documents to return at maximum. Can not exceed 100. If not provided, returns all secrets." + }, + { + "name": "dependency_limit", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 100, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "Maximum number of dependent resources (tools, agents, phone numbers) to return per secret. Can not exceed 100.", + "title": "Dependency Limit" + }, + "description": "Maximum number of dependent resources (tools, agents, phone numbers) to return per secret. Can not exceed 100." + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "If specified, returns only secrets whose names start with this string.", + "title": "Search" + }, + "description": "If specified, returns only secrets whose names start with this string." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetWorkspaceSecretsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "secrets" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/secrets/{secret_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Convai Workspace Secret", + "description": "Get a workspace secret by ID", + "operationId": "get_secret_route", + "parameters": [ + { + "name": "secret_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Secret Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvAIWorkspaceStoredSecretConfig" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "secrets" + ], + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Convai Workspace Secret", + "description": "Delete a workspace secret if it's not in use", + "operationId": "delete_secret_route", + "parameters": [ + { + "name": "secret_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Secret Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "secrets" + ], + "x-fern-sdk-method-name": "delete" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Convai Workspace Secret", + "description": "Update an existing secret for the workspace", + "operationId": "update_secret_route", + "parameters": [ + { + "name": "secret_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Secret Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchWorkspaceSecretRequest", + "description": "Secret data to update" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostWorkspaceSecretResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "secrets" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/convai/secrets/{secret_id}/dependencies/{resource_type}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Secret Dependencies By Type", + "description": "Get paginated list of resources that depend on a specific secret, filtered by resource type.", + "operationId": "get_secret_dependencies_route", + "parameters": [ + { + "name": "secret_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Secret Id" + } + }, + { + "name": "resource_type", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/SecretDependencyResourceType" + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many dependency items to return per page.", + "default": 20, + "title": "Page Size" + }, + "description": "How many dependency items to return per page." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSecretDependenciesResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "secrets" + ], + "x-fern-sdk-method-name": "get_dependencies" + } + }, + "/v1/convai/batch-calling/submit": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Submit A Batch Call Request.", + "description": "Submit a batch call request to schedule calls for multiple recipients.", + "operationId": "create_batch_call", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Submit_a_batch_call_request__v1_convai_batch_calling_submit_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchCallResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "batch_calls" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/batch-calling/workspace": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get All Batch Calls For A Workspace.", + "description": "Get all batch calls for the current workspace.", + "operationId": "get_workspace_batch_calls", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 100, + "title": "Limit" + } + }, + { + "name": "last_doc", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Doc" + } + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter batch calls to a single agent.", + "title": "Agent Id" + }, + "description": "Filter batch calls to a single agent." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceBatchCallsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "batch_calls" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/batch-calling/{batch_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get A Batch Call By Id.", + "description": "Get detailed information about a batch call including all recipients.", + "operationId": "get_batch_call", + "parameters": [ + { + "name": "batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Batch Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchCallDetailedResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "batch_calls" + ], + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete A Batch Call.", + "description": "Permanently delete a batch call and all recipient records. Conversations remain in history.", + "operationId": "delete_batch_call", + "parameters": [ + { + "name": "batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Batch Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "batch_calls" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/batch-calling/{batch_id}/cancel": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Cancel A Batch Call.", + "description": "Cancel a running batch call and set all recipients to cancelled status.", + "operationId": "cancel_batch_call", + "parameters": [ + { + "name": "batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Batch Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchCallResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "batch_calls" + ], + "x-fern-sdk-method-name": "cancel" + } + }, + "/v1/convai/batch-calling/{batch_id}/retry": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Retry A Batch Call.", + "description": "Retry a batch call, calling failed and no-response recipients again.", + "operationId": "retry_batch_call", + "parameters": [ + { + "name": "batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Batch Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchCallResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "batch_calls" + ], + "x-fern-sdk-method-name": "retry" + } + }, + "/v1/convai/sip-trunk/outbound-call": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Handle An Outbound Call Via Sip Trunk", + "description": "Handle an outbound call via SIP trunk", + "operationId": "handle_sip_trunk_outbound_call", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Handle_an_outbound_call_via_SIP_trunk_v1_convai_sip_trunk_outbound_call_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SIPTrunkOutboundCallResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "sip_trunk" + ], + "x-fern-sdk-method-name": "outbound_call" + } + }, + "/v1/convai/mcp-servers": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Mcp Server", + "description": "Create a new MCP server configuration in the workspace.", + "operationId": "create_mcp_server_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerRequestModel", + "description": "Configuration for an MCP Server." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers" + ], + "x-fern-sdk-method-name": "create" + }, + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "List Mcp Servers", + "description": "Retrieve all MCP server configurations available in the workspace.", + "operationId": "list_mcp_servers_route", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServersResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/mcp-servers/{mcp_server_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Mcp Server", + "description": "Retrieve a specific MCP server configuration from the workspace.", + "operationId": "get_mcp_route", + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers" + ], + "x-fern-sdk-method-name": "get" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Mcp Server", + "description": "Delete a specific MCP server configuration from the workspace.", + "operationId": "delete_mcp_server_route", + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers" + ], + "x-fern-sdk-method-name": "delete" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Mcp Server Configuration", + "description": "Update the configuration settings for an MCP server.", + "operationId": "update_mcp_server_config_route", + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerConfigUpdateRequestModel", + "description": "Configuration updates for an MCP Server." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/convai/mcp-servers/{mcp_server_id}/tools": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "List Mcp Server Tools", + "description": "Retrieve all tools available for a specific MCP server configuration.", + "operationId": "list_mcp_server_tools_route", + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListMCPToolsResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers", + "tools" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/mcp-servers/{mcp_server_id}/approval-policy": { + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Mcp Server Approval Policy", + "description": "Update the approval policy configuration for an MCP server. DEPRECATED: Use PATCH /mcp-servers/{id} endpoint instead.", + "operationId": "update_mcp_server_approval_policy_route", + "deprecated": true, + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPApprovalPolicyUpdateRequestModel", + "description": "Approval policy update for an MCP Server." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers", + "approval_policy" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/convai/mcp-servers/{mcp_server_id}/tool-approvals": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Mcp Server Tool Approval", + "description": "Add approval for a specific MCP tool when using per-tool approval mode.", + "operationId": "add_mcp_server_tool_approval_route", + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPToolAddApprovalRequestModel", + "description": "Tool approval details to add for an MCP Server." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers", + "tool_approvals" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/mcp-servers/{mcp_server_id}/tool-approvals/{tool_name}": { + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Mcp Server Tool Approval", + "description": "Remove approval for a specific MCP tool when using per-tool approval mode.", + "operationId": "remove_mcp_server_tool_approval_route", + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "tool_name", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Name of the MCP tool to remove approval for.", + "title": "Tool Name" + }, + "description": "Name of the MCP tool to remove approval for." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers", + "tool_approvals" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/mcp-servers/{mcp_server_id}/tool-configs": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Mcp Tool Configuration Override", + "description": "Create configuration overrides for a specific MCP tool.", + "operationId": "add_mcp_tool_config_override_route", + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPToolConfigOverrideCreateRequestModel", + "description": "Tool configuration override details to create." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerResponseModel" + } + } + } + }, + "409": { + "description": "Tool config override already exists" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers", + "tool_configs" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/mcp-servers/{mcp_server_id}/tool-configs/{tool_name}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Mcp Tool Configuration Override", + "description": "Retrieve configuration overrides for a specific MCP tool.", + "operationId": "get_mcp_tool_config_override_route", + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "tool_name", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Name of the MCP tool to retrieve config overrides for.", + "title": "Tool Name" + }, + "description": "Name of the MCP tool to retrieve config overrides for." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPToolConfigOverride-Output" + } + } + } + }, + "404": { + "description": "Tool config override not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers", + "tool_configs" + ], + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Mcp Tool Configuration Override", + "description": "Update configuration overrides for a specific MCP tool.", + "operationId": "update_mcp_tool_config_override_route", + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "tool_name", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Name of the MCP tool to update config overrides for.", + "title": "Tool Name" + }, + "description": "Name of the MCP tool to update config overrides for." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPToolConfigOverrideUpdateRequestModel", + "description": "Tool configuration override details to update." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerResponseModel" + } + } + } + }, + "404": { + "description": "Tool config override not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers", + "tool_configs" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Mcp Tool Configuration Override", + "description": "Remove configuration overrides for a specific MCP tool.", + "operationId": "remove_mcp_tool_config_override_route", + "parameters": [ + { + "name": "mcp_server_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the MCP Server.", + "title": "Mcp Server Id" + }, + "description": "ID of the MCP Server." + }, + { + "name": "tool_name", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Name of the MCP tool to remove config overrides for.", + "title": "Tool Name" + }, + "description": "Name of the MCP tool to remove config overrides for." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "mcp_servers", + "tool_configs" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/whatsapp-accounts/{phone_number_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Whatsapp Account", + "description": "Get a WhatsApp account", + "operationId": "get_whatsapp_account", + "parameters": [ + { + "name": "phone_number_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Phone Number Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetWhatsAppAccountResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "whatsapp_accounts" + ], + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Whatsapp Account", + "description": "Update a WhatsApp account", + "operationId": "update_whatsapp_account", + "parameters": [ + { + "name": "phone_number_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Phone Number Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWhatsAppAccountRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "whatsapp_accounts" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Whatsapp Account", + "description": "Delete a WhatsApp account", + "operationId": "delete_whatsapp_account", + "parameters": [ + { + "name": "phone_number_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Phone Number Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "whatsapp_accounts" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/whatsapp-accounts": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "List Whatsapp Accounts", + "description": "List all WhatsApp accounts", + "operationId": "list_whatsapp_accounts", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListWhatsAppAccountsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "whatsapp_accounts" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/agents/{agent_id}/branches": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create A New Branch", + "description": "Create a new branch from a given version of any branch", + "operationId": "create_branch_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_a_new_branch_v1_convai_agents__agent_id__branches_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentBranchResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "branches" + ], + "x-fern-sdk-method-name": "create" + }, + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "List Agent Branches", + "description": "Returns a list of branches an agent has", + "operationId": "get_branches_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether archived branches should be included", + "default": false, + "title": "Include Archived" + }, + "description": "Whether archived branches should be included" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "exclusiveMinimum": 1, + "description": "How many results at most should be returned", + "default": 100, + "title": "Limit" + }, + "description": "How many results at most should be returned" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponse_AgentBranchSummary_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "branches" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/agents/{agent_id}/branches/{branch_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Agent Branch", + "description": "Get information about a single agent branch", + "operationId": "get_branch_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "branch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the branch.", + "examples": [ + "agtbranch_0901k4aafjxxfxt93gd841r7tv5t" + ], + "title": "Branch Id" + }, + "description": "Unique identifier for the branch." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentBranchResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "branches" + ], + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Agent Branch", + "description": "Update agent branch properties such as archiving status and protection level", + "operationId": "update_branch_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "branch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the branch.", + "examples": [ + "agtbranch_0901k4aafjxxfxt93gd841r7tv5t" + ], + "title": "Branch Id" + }, + "description": "Unique identifier for the branch." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_agent_branch_v1_convai_agents__agent_id__branches__branch_id__patch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentBranchResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "branches" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/convai/agents/{agent_id}/versions/{version_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Agent Version Metadata", + "description": "Get metadata for a specific agent version", + "operationId": "get_version_metadata_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "version_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the version.", + "examples": [ + "agtvrsn_0901k4aafjxxfxt93gd841r7tv5t" + ], + "title": "Version Id" + }, + "description": "Unique identifier for the version." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersionMetadata" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "versions" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/convai/agents/{agent_id}/branches/{source_branch_id}/merge": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Merge A Branch Into A Target Branch", + "description": "Merge a branch into a target branch", + "operationId": "merge_branch_into_target", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "source_branch_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the source branch to merge from.", + "examples": [ + "agtbrch_8901k4t9z5defmb8vh3e9361y7nj" + ], + "embed": true, + "title": "Source Branch Id" + }, + "description": "Unique identifier for the source branch to merge from." + }, + { + "name": "target_branch_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the target branch to merge into.", + "examples": [ + "agtbrch_8901k4t9z5defmb8vh3e9361y7nj" + ], + "embed": true, + "title": "Target Branch Id" + }, + "description": "The ID of the target branch to merge into." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Merge_a_branch_into_a_target_branch_v1_convai_agents__agent_id__branches__source_branch_id__merge_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "branches" + ], + "x-fern-sdk-method-name": "merge" + } + }, + "/v1/convai/agents/{agent_id}/deployments": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Or Update Deployments", + "description": "Create a new deployment for an agent", + "operationId": "create_agent_deployment_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_or_update_deployments_v1_convai_agents__agent_id__deployments_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDeploymentResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "deployments" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/convai/agents/{agent_id}/drafts": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Agent Draft", + "description": "Create a new draft for an agent", + "operationId": "create_agent_draft_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "branch_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the agent branch to use", + "examples": [ + "agtbrch_8901k4t9z5defmb8vh3e9361y7nj" + ], + "embed": true, + "title": "Branch Id" + }, + "description": "The ID of the agent branch to use" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_agent_draft_v1_convai_agents__agent_id__drafts_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "drafts" + ], + "x-fern-sdk-method-name": "create" + }, + "delete": { + "tags": [ + "Agents Platform" + ], + "summary": "Delete Agent Draft", + "description": "Delete a draft for an agent", + "operationId": "delete_agent_draft_route", + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The id of an agent. This is returned on agent creation.", + "examples": [ + "agent_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "embed": true, + "title": "Agent Id" + }, + "description": "The id of an agent. This is returned on agent creation." + }, + { + "name": "branch_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the agent branch to use", + "examples": [ + "agtbrch_8901k4t9z5defmb8vh3e9361y7nj" + ], + "embed": true, + "title": "Branch Id" + }, + "description": "The ID of the agent branch to use" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "agents", + "drafts" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/speech-engine": { + "get": { + "tags": [ + "Speech Engine" + ], + "summary": "List Speech Engines", + "description": "Returns a paginated list of Speech Engine resources.", + "operationId": "list_speech_engines", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "description": "How many Speech Engines to return at maximum. Can not exceed 100, defaults to 30.", + "default": 30, + "title": "Page Size" + }, + "description": "How many Speech Engines to return at maximum. Can not exceed 100, defaults to 30." + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Search term to filter Speech Engines by name", + "title": "Search" + }, + "description": "Search term to filter Speech Engines by name" + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/SortDirection", + "description": "The direction to sort the results", + "default": "desc" + }, + "description": "The direction to sort the results" + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentSortBy" + }, + { + "type": "null" + } + ], + "description": "The field to sort the results by", + "title": "Sort By" + }, + "description": "The field to sort the results by" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Used for fetching next page. Cursor is returned in the response.", + "title": "Cursor" + }, + "description": "Used for fetching next page. Cursor is returned in the response." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListSpeechEnginesResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "speech_engine", + "x-fern-sdk-method-name": "list" + }, + "post": { + "tags": [ + "Speech Engine" + ], + "summary": "Create Speech Engine", + "description": "Create a new Speech Engine resource", + "operationId": "create_speech_engine", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSpeechEngineRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpeechEngineResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "speech_engine", + "x-fern-sdk-method-name": "create" + } + }, + "/v1/speech-engine/{speech_engine_id}": { + "get": { + "tags": [ + "Speech Engine" + ], + "summary": "Get Speech Engine", + "description": "Retrieve a Speech Engine resource", + "operationId": "get_speech_engine", + "parameters": [ + { + "name": "speech_engine_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The speech engine ID (accepts seng_ or agent_ prefix)", + "examples": [ + "seng_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "title": "Speech Engine Id" + }, + "description": "The speech engine ID (accepts seng_ or agent_ prefix)" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpeechEngineResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "speech_engine", + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Speech Engine" + ], + "summary": "Update Speech Engine", + "description": "Update a Speech Engine resource (partial update)", + "operationId": "update_speech_engine", + "parameters": [ + { + "name": "speech_engine_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The speech engine ID (accepts seng_ or agent_ prefix)", + "examples": [ + "seng_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "title": "Speech Engine Id" + }, + "description": "The speech engine ID (accepts seng_ or agent_ prefix)" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSpeechEngineRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpeechEngineResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "speech_engine", + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "Speech Engine" + ], + "summary": "Delete Speech Engine", + "description": "Delete a Speech Engine resource", + "operationId": "delete_speech_engine", + "parameters": [ + { + "name": "speech_engine_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The speech engine ID (accepts seng_ or agent_ prefix)", + "examples": [ + "seng_3701k3ttaq12ewp8b7qv5rfyszkz" + ], + "title": "Speech Engine Id" + }, + "description": "The speech engine ID (accepts seng_ or agent_ prefix)" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "speech_engine", + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/convai/conversations/{conversation_id}/analysis/run": { + "post": { + "tags": [ + "Agents Workspace Analytics" + ], + "summary": "Run Conversation Analysis", + "description": "Run the analysis for a conversation using the agent's current evaluation criteria and data collection settings.", + "operationId": "run_conversation_analysis", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the conversation", + "title": "Conversation Id" + }, + "description": "ID of the conversation" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConversationResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "conversational_ai", + "conversations", + "analysis" + ], + "x-fern-sdk-method-name": "run" + } + }, + "/v1/convai/environment-variables": { + "post": { + "tags": [ + "Agents Platform" + ], + "summary": "Create Environment Variable", + "description": "Create a new environment variable for the workspace", + "operationId": "create_environment_variable", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreateStringEnvironmentVariableRequest" + }, + { + "$ref": "#/components/schemas/CreateSecretEnvironmentVariableRequest" + }, + { + "$ref": "#/components/schemas/CreateAuthConnectionEnvironmentVariableRequest" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "string": "#/components/schemas/CreateStringEnvironmentVariableRequest", + "secret": "#/components/schemas/CreateSecretEnvironmentVariableRequest", + "auth_connection": "#/components/schemas/CreateAuthConnectionEnvironmentVariableRequest" + } + }, + "title": "Request" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableResponse" + } + } + } + }, + "400": { + "description": "Invalid parameters" + }, + "409": { + "description": "Environment variable with this label already exists" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "environment_variables", + "x-fern-sdk-method-name": "create" + }, + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "List Environment Variables", + "description": "List all environment variables for the workspace with optional filtering", + "operationId": "list_environment_variables", + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Pagination cursor from previous response", + "title": "Cursor" + }, + "description": "Pagination cursor from previous response" + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Number of items to return (1-100)", + "default": 100, + "title": "Page Size" + }, + "description": "Number of items to return (1-100)" + }, + { + "name": "label", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by exact label match", + "title": "Label" + }, + "description": "Filter by exact label match" + }, + { + "name": "environment", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter to only return variables that have this environment. When specified, the values dict in the response will only contain this environment.", + "title": "Environment" + }, + "description": "Filter to only return variables that have this environment. When specified, the values dict in the response will only contain this environment." + }, + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "string", + "secret", + "auth_connection" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by variable type", + "title": "Type" + }, + "description": "Filter by variable type" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariablesListResponse" + } + } + } + }, + "400": { + "description": "Invalid environment filter" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "environment_variables", + "x-fern-sdk-method-name": "list" + } + }, + "/v1/convai/environment-variables/{env_var_id}": { + "get": { + "tags": [ + "Agents Platform" + ], + "summary": "Get Environment Variable", + "description": "Get a specific environment variable by ID", + "operationId": "get_environment_variable", + "parameters": [ + { + "name": "env_var_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Env Var Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableResponse" + } + } + } + }, + "404": { + "description": "Environment variable not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "environment_variables", + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "Agents Platform" + ], + "summary": "Update Environment Variable", + "description": "Replace an environment variable's values. Use null to remove an environment (except production).", + "operationId": "update_environment_variable", + "parameters": [ + { + "name": "env_var_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Env Var Id" + } + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEnvironmentVariableRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableResponse" + } + } + } + }, + "400": { + "description": "Invalid parameters or type mismatch" + }, + "404": { + "description": "Environment variable not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "environment_variables", + "x-fern-sdk-method-name": "update" + } + }, + "/v1/music/plan": { + "post": { + "tags": [ + "music-generation" + ], + "summary": "Generate Composition Plan", + "description": "Generate a composition plan from a prompt.", + "operationId": "compose_plan", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Generate_composition_plan_v1_music_plan_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MusicPrompt" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "music", + "composition_plan" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/music": { + "post": { + "tags": [ + "music-generation" + ], + "summary": "Compose Music", + "description": "Compose a song from a prompt or a composition plan.", + "operationId": "generate", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Compose_music_v1_music_post" + } + } + } + }, + "responses": { + "200": { + "description": "The generated audio file in the format specified", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "headers": { + "song-id": { + "description": "Unique identifier for the generated song", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "music", + "x-fern-sdk-method-name": "compose" + } + }, + "/v1/music/detailed": { + "post": { + "tags": [ + "music-generation" + ], + "summary": "Compose Music With A Detailed Response", + "description": "Compose a song from a prompt or a composition plan.", + "operationId": "compose_detailed", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Compose_Music_with_a_detailed_response_v1_music_detailed_post" + } + } + } + }, + "responses": { + "200": { + "description": "Multipart/mixed response with JSON metadata and binary audio file", + "content": { + "multipart/mixed": { + "schema": { + "type": "string", + "format": "binary", + "description": "Raw multipart/mixed response data that clients must parse. Contains two parts separated by boundary: 1) application/json part with composition_plan and song_metadata 2) audio/* part with binary audio data and Content-Disposition header" + } + } + }, + "headers": { + "song-id": { + "description": "Unique identifier for the generated song", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "music", + "x-fern-sdk-method-name": "compose_detailed" + } + }, + "/v1/music/stream": { + "post": { + "tags": [ + "music-generation" + ], + "summary": "Stream Composed Music", + "description": "Stream a composed song from a prompt or a composition plan.", + "operationId": "stream_compose", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Stream_composed_music_v1_music_stream_post" + } + } + } + }, + "responses": { + "200": { + "description": "Streaming audio data in the format specified", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "headers": { + "song-id": { + "description": "Unique identifier for the generated song", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "music", + "x-fern-sdk-method-name": "stream", + "x-fern-streaming": true + } + }, + "/v1/music/upload": { + "post": { + "tags": [ + "music-generation" + ], + "summary": "Upload Music", + "description": "Upload a music file to be later used for inpainting. Only available to enterprise clients with access to the inpainting feature. Price for uploading is the same as the one for song generation. All uploaded content gets inspected for copyright infringement. If copyrighted content is detected, half of the request cost is still charged.", + "operationId": "upload_song", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Upload_music_v1_music_upload_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully uploaded music file with optional composition plan", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MusicUploadResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "music", + "x-fern-sdk-method-name": "upload" + } + }, + "/v1/music/stem-separation": { + "post": { + "tags": [ + "music-generation" + ], + "summary": "Stem Separation", + "description": "Separate an audio file into individual stems. This endpoint might have high latency, depending on the length of the audio file.", + "operationId": "separate_song_stems", + "parameters": [ + { + "name": "output_format", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AllowedOutputFormats", + "title": "Output format of the generated audio.", + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ], + "default": "mp3_44100_128" + }, + "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Stem_separation_v1_music_stem_separation_post" + } + } + } + }, + "responses": { + "200": { + "description": "ZIP archive containing separated audio stems. Each stem is provided as a separate audio file in the requested output format.", + "content": { + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + }, + "example": "Binary ZIP file containing files like: vocals.mp3, drums.mp3, bass.mp3, guitar.mp3, piano.mp3, other.mp3" + } + }, + "headers": { + "Content-Disposition": { + "description": "Attachment header with filename", + "schema": { + "type": "string", + "example": "attachment; filename=stems.zip" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": "music", + "x-fern-sdk-method-name": "separate_stems" + } + }, + "/v1/productions/orders": { + "post": { + "tags": [ + "productions" + ], + "summary": "Create Order", + "description": "Creates a new Productions order in the workspace. The order starts in the open state and can be configured with items before submission.", + "operationId": "public_create_order", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateOrderRequest" + }, + { + "type": "null" + } + ], + "title": "Request" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrderResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders" + ], + "x-fern-sdk-method-name": "create" + }, + "get": { + "tags": [ + "productions" + ], + "summary": "List Orders", + "description": "Lists Productions orders in the workspace. Supports filtering by status and date range, with pagination.", + "operationId": "public_list_orders", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "description": "Maximum number of orders to return per page.", + "default": 20, + "title": "Page Size" + }, + "description": "Maximum number of orders to return per page." + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "description": "Number of orders to skip for pagination.", + "default": 0, + "title": "Offset" + }, + "description": "Number of orders to skip for pagination." + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderRequestState" + } + }, + { + "type": "null" + } + ], + "description": "Filter orders by one or more statuses.", + "title": "Status" + }, + "description": "Filter orders by one or more statuses." + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "description": "Filter orders created on or after this date.", + "title": "Start Date" + }, + "description": "Filter orders created on or after this date." + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "description": "Filter orders created on or before this date.", + "title": "End Date" + }, + "description": "Filter orders created on or before this date." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOrdersResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/productions/orders/{order_id}": { + "get": { + "tags": [ + "productions" + ], + "summary": "Get Order", + "description": "Retrieves full details for a Productions order.\n\nQuote and pricing information may not be available immediately; if you wish to see the quote before submission, you may need to poll the order details until it is ready.", + "operationId": "public_get_order", + "parameters": [ + { + "name": "order_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the order." + }, + "description": "The ID of the order." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders" + ], + "x-fern-sdk-method-name": "get" + }, + "patch": { + "tags": [ + "productions" + ], + "summary": "Update Order", + "description": "Updates an open order.", + "operationId": "public_update_order", + "parameters": [ + { + "name": "order_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the order." + }, + "description": "The ID of the order." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_order_v1_productions_orders__order_id__patch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOrderResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/productions/orders/{order_id}/media": { + "post": { + "tags": [ + "productions" + ], + "summary": "Register Media", + "description": "Registers a media file with an order, either by uploading it directly or by providing a URL to fetch it from. Exactly one of `media` or `media_url` must be provided. The registered media can then be referenced when adding order items.", + "operationId": "public_register_media", + "parameters": [ + { + "name": "order_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the order to which this media will be attached." + }, + "description": "The ID of the order to which this media will be attached." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Register_media_v1_productions_orders__order_id__media_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterMediaResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders", + "media" + ], + "x-fern-sdk-method-name": "register" + } + }, + "/v1/productions/orders/{order_id}/media/{media_id}": { + "get": { + "tags": [ + "productions" + ], + "summary": "Get Media Info", + "description": "Retrieves metadata and a time-limited download URL for a previously uploaded media file.", + "operationId": "public_get_media_info", + "parameters": [ + { + "name": "order_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the order." + }, + "description": "The ID of the order." + }, + { + "name": "media_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/MediaId", + "description": "The ID of the media file." + }, + "description": "The ID of the media file." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderMediaResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders", + "media" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/productions/orders/{order_id}/items": { + "post": { + "tags": [ + "productions" + ], + "summary": "Upsert Order Item", + "description": "Adds or updates an order item on an open order. Returns the item ID and the quoted price.", + "operationId": "public_upsert_order_item", + "parameters": [ + { + "name": "order_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the order." + }, + "description": "The ID of the order." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Upsert_order_item_v1_productions_orders__order_id__items_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertOrderItemResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders", + "items" + ], + "x-fern-sdk-method-name": "upsert" + } + }, + "/v1/productions/orders/{order_id}/items/{item_id}": { + "delete": { + "tags": [ + "productions" + ], + "summary": "Remove Order Item", + "description": "Removes an order item from an open order.", + "operationId": "public_remove_order_item", + "parameters": [ + { + "name": "order_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the order." + }, + "description": "The ID of the order." + }, + { + "name": "item_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ItemId", + "description": "The ID of the order item." + }, + "description": "The ID of the order item." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveOrderItemResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders", + "items" + ], + "x-fern-sdk-method-name": "remove" + } + }, + "/v1/productions/orders/{order_id}/submit": { + "post": { + "tags": [ + "productions" + ], + "summary": "Submit Order", + "description": "Submits an open order for processing. The order must have at least one item. Once submitted, items can no longer be modified.\n\nUpon submission, the workspace will be charged for the order. The quote is based on information extracted from the uploaded media, such as its duration. The quote may not be available immediately; if you wish to see the quote before submission, you may need to poll the order details until the quote is ready.", + "operationId": "public_submit_order", + "parameters": [ + { + "name": "order_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the order." + }, + "description": "The ID of the order." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitOrderResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders" + ], + "x-fern-sdk-method-name": "submit" + } + }, + "/v1/productions/orders/{order_id}/deliverables": { + "get": { + "tags": [ + "productions" + ], + "summary": "Get Order Deliverables", + "description": "Retrieves the delivered files for a completed order. Returns an empty list if the order is not yet completed.", + "operationId": "public_get_order_deliverables", + "parameters": [ + { + "name": "order_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the order." + }, + "description": "The ID of the order." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderDeliverablesResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders", + "deliverables" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/productions/orders/languages/{order_item_kind}": { + "get": { + "tags": [ + "productions" + ], + "summary": "Get Available Languages", + "description": "Returns the available languages for a given order item kind.", + "operationId": "public_get_available_languages", + "parameters": [ + { + "name": "order_item_kind", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/OrderItemKind", + "description": "The kind of order item." + }, + "description": "The kind of order item." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LanguagesResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "productions", + "orders", + "languages" + ], + "x-fern-sdk-method-name": "list" + } + }, + "/v1/voices/pvc": { + "post": { + "tags": [ + "pvc-voices" + ], + "summary": "Create Pvc Voice", + "description": "Creates a new PVC voice with metadata but no samples", + "operationId": "create_pvc_voice", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_PVC_voice_v1_voices_pvc_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddVoiceResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/voices/pvc/{voice_id}": { + "post": { + "tags": [ + "pvc-voices" + ], + "summary": "Edit Pvc Voice", + "description": "Edit PVC voice metadata", + "operationId": "edit_pvc_voice", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Edit_PVC_voice_v1_voices_pvc__voice_id__post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddVoiceResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc" + ], + "x-fern-sdk-method-name": "update" + } + }, + "/v1/voices/pvc/{voice_id}/samples": { + "post": { + "tags": [ + "pvc-voices" + ], + "summary": "Add Samples To Pvc Voice", + "description": "Add audio samples to a PVC voice", + "operationId": "add_pvc_voice_samples", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Add_samples_to_PVC_voice_v1_voices_pvc__voice_id__samples_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SampleResponseModel" + }, + "title": "Response Add Samples To Pvc Voice V1 Voices Pvc Voice Id Samples Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "samples" + ], + "x-fern-sdk-method-name": "create" + } + }, + "/v1/voices/pvc/{voice_id}/samples/{sample_id}": { + "post": { + "tags": [ + "pvc-voices" + ], + "summary": "Update Pvc Voice Sample", + "description": "Update a PVC voice sample - apply noise removal, select speaker, change trim times or file name.", + "operationId": "edit_pvc_voice_sample", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "sample_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Sample ID to be used", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "Sample Id" + }, + "description": "Sample ID to be used" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Update_PVC_voice_sample_v1_voices_pvc__voice_id__samples__sample_id__post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddVoiceResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "samples" + ], + "x-fern-sdk-method-name": "update" + }, + "delete": { + "tags": [ + "pvc-voices" + ], + "summary": "Delete Pvc Voice Sample", + "description": "Delete a sample from a PVC voice.", + "operationId": "delete_pvc_voice_sample", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "sample_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Sample ID to be used", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "Sample Id" + }, + "description": "Sample ID to be used" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVoiceSampleResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "samples" + ], + "x-fern-sdk-method-name": "delete" + } + }, + "/v1/voices/pvc/{voice_id}/samples/{sample_id}/audio": { + "get": { + "tags": [ + "pvc-voices" + ], + "summary": "Retrieve Voice Sample Audio", + "description": "Retrieve the first 30 seconds of voice sample audio with or without noise removal.", + "operationId": "get_pvc_sample_audio", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "sample_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Sample ID to be used", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "Sample Id" + }, + "description": "Sample ID to be used" + }, + { + "name": "remove_background_noise", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.", + "examples": [ + true + ], + "embed": true, + "default": false, + "title": "Remove Background Noise" + }, + "description": "If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceSamplePreviewResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "samples", + "audio" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/voices/pvc/{voice_id}/samples/{sample_id}/waveform": { + "get": { + "tags": [ + "pvc-voices" + ], + "summary": "Retrieve Voice Sample Visual Waveform", + "description": "Retrieve the visual waveform of a voice sample.", + "operationId": "get_pvc_sample_visual_waveform", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "sample_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Sample ID to be used", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "Sample Id" + }, + "description": "Sample ID to be used" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceSampleVisualWaveformResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "samples", + "waveform" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/voices/pvc/{voice_id}/samples/{sample_id}/speakers": { + "get": { + "tags": [ + "pvc-voices" + ], + "summary": "Retrieve Speaker Separation Status", + "description": "Retrieve the status of the speaker separation process and the list of detected speakers if complete.", + "operationId": "get_pvc_sample_speakers", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "sample_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Sample ID to be used", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "Sample Id" + }, + "description": "Sample ID to be used" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpeakerSeparationResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "samples", + "speakers" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/voices/pvc/{voice_id}/samples/{sample_id}/separate-speakers": { + "post": { + "tags": [ + "pvc-voices" + ], + "summary": "Start Speaker Separation", + "description": "Start speaker separation process for a sample", + "operationId": "start_speaker_separation", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "sample_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Sample ID to be used", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "Sample Id" + }, + "description": "Sample ID to be used" + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartSpeakerSeparationResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "samples", + "speakers" + ], + "x-fern-sdk-method-name": "separate" + } + }, + "/v1/voices/pvc/{voice_id}/samples/{sample_id}/speakers/{speaker_id}/audio": { + "get": { + "tags": [ + "pvc-voices" + ], + "summary": "Retrieve Separated Speaker Audio", + "description": "Retrieve the separated audio for a specific speaker.", + "operationId": "get_speaker_audio", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "sample_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Sample ID to be used", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "Sample Id" + }, + "description": "Sample ID to be used" + }, + { + "name": "speaker_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Speaker ID to be used, you can use GET https://api.elevenlabs.io/v1/voices/{voice_id}/samples/{sample_id}/speakers to list all the available speakers for a sample.", + "examples": [ + "VW7YKqPnjY4h39yTbx2L" + ], + "title": "Speaker Id" + }, + "description": "Speaker ID to be used, you can use GET https://api.elevenlabs.io/v1/voices/{voice_id}/samples/{sample_id}/speakers to list all the available speakers for a sample." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpeakerAudioResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "samples", + "speakers", + "audio" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/v1/voices/pvc/{voice_id}/captcha": { + "get": { + "tags": [ + "pvc-voices" + ], + "summary": "Get Pvc Voice Captcha", + "description": "Get captcha for PVC voice verification.", + "operationId": "get_pvc_voice_captcha", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "responses": { + "200": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "verification", + "captcha" + ], + "x-fern-sdk-method-name": "get" + }, + "post": { + "tags": [ + "pvc-voices" + ], + "summary": "Verify Pvc Voice Captcha", + "description": "Submit captcha verification for PVC voice.", + "operationId": "verify_pvc_voice_captcha", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Verify_PVC_voice_captcha_v1_voices_pvc__voice_id__captcha_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerifyPVCVoiceCaptchaResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "verification", + "captcha" + ], + "x-fern-sdk-method-name": "verify" + } + }, + "/v1/voices/pvc/{voice_id}/train": { + "post": { + "tags": [ + "pvc-voices" + ], + "summary": "Run Pvc Training", + "description": "Start PVC training process for a voice.", + "operationId": "run_pvc_voice_training", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Run_PVC_training_v1_voices_pvc__voice_id__train_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartPVCVoiceTrainingResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc" + ], + "x-fern-sdk-method-name": "train" + } + }, + "/v1/voices/pvc/{voice_id}/verification": { + "post": { + "tags": [ + "pvc-voices" + ], + "summary": "Request Manual Verification", + "description": "Request manual verification for a PVC voice.", + "operationId": "request_pvc_manual_verification", + "parameters": [ + { + "name": "voice_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ], + "title": "Voice Id" + }, + "description": "Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices." + }, + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Request_manual_verification_v1_voices_pvc__voice_id__verification_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestPVCManualVerificationResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "voices", + "pvc", + "verification" + ], + "x-fern-sdk-method-name": "request" + } + }, + "/v1/workspace/analytics/query/usage-by-product-over-time": { + "post": { + "tags": [ + "access:all" + ], + "summary": "Get Workspace Usage", + "description": "Returns credit usage broken down by product type over time. The response is a tabular structure with columns, column_types, column_units, and rows.", + "operationId": "usage_by_product_over_time", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Get_Workspace_Usage_v1_workspace_analytics_query_usage_by_product_over_time_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceAnalyticsQueryResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "usage" + ], + "x-fern-sdk-method-name": "get_usage_by_product_over_time" + } + }, + "/v1/workspace/analytics/requests": { + "post": { + "tags": [ + "access:all" + ], + "summary": "List Api Requests", + "description": "Returns a list of API requests. Supports filtering by time range, column filters, and search terms. At least one of start_time or end_time must be provided. An optional sort parameter controls timestamp ordering. Results are ordered by timestamp. Descending if end_time is used, ascending if start_time is used. The response is a tabular structure with columns, column_types, column_units, and rows.", + "operationId": "requests_list", + "parameters": [ + { + "name": "xi-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "title": "Xi-Api-Key" + }, + "description": "Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_List_API_requests_v1_workspace_analytics_requests_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceAnalyticsQueryResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-sdk-group-name": [ + "workspace", + "analytics", + "requests" + ], + "x-fern-sdk-method-name": "get" + } + }, + "/docs": { + "get": { + "summary": "Redirect To Mintlify", + "operationId": "redirect_to_mintlify", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ASRConversationalConfig": { + "properties": { + "quality": { + "$ref": "#/components/schemas/ASRQuality", + "description": "The quality of the transcription", + "default": "high" + }, + "provider": { + "$ref": "#/components/schemas/ASRProvider", + "description": "The provider of the transcription service", + "default": "elevenlabs" + }, + "user_input_audio_format": { + "$ref": "#/components/schemas/ASRInputFormat", + "description": "The format of the audio to be transcribed", + "default": "pcm_16000" + }, + "keywords": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Keywords", + "description": "Keywords to boost prediction probability for", + "x-convai-client-override": true, + "x-convai-soft-override-disallowed": true + } + }, + "type": "object", + "title": "ASRConversationalConfig", + "example": { + "keywords": [ + "hello", + "world" + ], + "provider": "elevenlabs", + "quality": "high", + "user_input_audio_format": "pcm_16000" + } + }, + "ASRConversationalConfigOverride": { + "properties": { + "keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Keywords", + "description": "Keywords to boost prediction probability for", + "x-convai-client-override": true, + "x-convai-soft-override-disallowed": true + } + }, + "type": "object", + "title": "ASRConversationalConfigOverride", + "example": { + "keywords": [ + "hello", + "world" + ] + } + }, + "ASRConversationalConfigOverrideConfig": { + "properties": { + "keywords": { + "type": "boolean", + "title": "Keywords", + "description": "Whether to allow overriding the keywords field.", + "default": false + } + }, + "type": "object", + "title": "ASRConversationalConfigOverrideConfig" + }, + "ASRConversationalConfigWorkflowOverride": { + "properties": { + "quality": { + "anyOf": [ + { + "$ref": "#/components/schemas/ASRQuality" + }, + { + "type": "null" + } + ], + "description": "The quality of the transcription" + }, + "provider": { + "anyOf": [ + { + "$ref": "#/components/schemas/ASRProvider" + }, + { + "type": "null" + } + ], + "description": "The provider of the transcription service" + }, + "user_input_audio_format": { + "anyOf": [ + { + "$ref": "#/components/schemas/ASRInputFormat" + }, + { + "type": "null" + } + ], + "description": "The format of the audio to be transcribed" + }, + "keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Keywords", + "description": "Keywords to boost prediction probability for", + "x-convai-client-override": true, + "x-convai-soft-override-disallowed": true + } + }, + "type": "object", + "title": "ASRConversationalConfigWorkflowOverride", + "example": { + "keywords": [ + "hello", + "world" + ], + "provider": "elevenlabs", + "quality": "high", + "user_input_audio_format": "pcm_16000" + } + }, + "ASRInputFormat": { + "type": "string", + "enum": [ + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_44100", + "pcm_48000", + "ulaw_8000" + ], + "title": "ASRInputFormat", + "default": "pcm_16000" + }, + "ASRProvider": { + "type": "string", + "enum": [ + "elevenlabs", + "scribe_realtime" + ], + "title": "ASRProvider", + "default": "elevenlabs" + }, + "ASRQuality": { + "type": "string", + "enum": [ + "high" + ], + "title": "ASRQuality", + "default": "high" + }, + "ASTAdditionOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "add_operator", + "title": "Type", + "default": "add_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "left", + "right" + ], + "title": "ASTAdditionOperatorNode" + }, + "ASTAdditionOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "add_operator", + "title": "Type", + "default": "add_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "type", + "left", + "right" + ], + "title": "ASTAdditionOperatorNode" + }, + "ASTAndOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "and_operator", + "title": "Type", + "default": "and_operator" + }, + "children": { + "items": { + "$ref": "#/components/schemas/ASTNode-Input" + }, + "type": "array", + "minItems": 2, + "title": "Children", + "description": "Child nodes of the logical operator." + } + }, + "type": "object", + "required": [ + "children" + ], + "title": "ASTAndOperatorNode" + }, + "ASTAndOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "and_operator", + "title": "Type", + "default": "and_operator" + }, + "children": { + "items": { + "$ref": "#/components/schemas/ASTNode-Output" + }, + "type": "array", + "minItems": 2, + "title": "Children", + "description": "Child nodes of the logical operator." + } + }, + "type": "object", + "required": [ + "type", + "children" + ], + "title": "ASTAndOperatorNode" + }, + "ASTBooleanNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "boolean_literal", + "title": "Type", + "default": "boolean_literal" + }, + "value": { + "type": "boolean", + "title": "Value", + "description": "Value of this literal." + } + }, + "type": "object", + "required": [ + "value" + ], + "title": "ASTBooleanNode" + }, + "ASTBooleanNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "boolean_literal", + "title": "Type", + "default": "boolean_literal" + }, + "value": { + "type": "boolean", + "title": "Value", + "description": "Value of this literal." + } + }, + "type": "object", + "required": [ + "type", + "value" + ], + "title": "ASTBooleanNode" + }, + "ASTConditionalOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "conditional_operator", + "title": "Type", + "default": "conditional_operator" + }, + "condition": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Condition deciding which expression should be selected." + }, + "trueExpression": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Expression selected if the condition is true." + }, + "falseExpression": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Expression selected if the condition is false." + } + }, + "type": "object", + "required": [ + "condition", + "trueExpression", + "falseExpression" + ], + "title": "ASTConditionalOperatorNode" + }, + "ASTConditionalOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "conditional_operator", + "title": "Type", + "default": "conditional_operator" + }, + "condition": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Condition deciding which expression should be selected." + }, + "trueExpression": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Expression selected if the condition is true." + }, + "falseExpression": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Expression selected if the condition is false." + } + }, + "type": "object", + "required": [ + "type", + "condition", + "trueExpression", + "falseExpression" + ], + "title": "ASTConditionalOperatorNode" + }, + "ASTDivisionOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "div_operator", + "title": "Type", + "default": "div_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "left", + "right" + ], + "title": "ASTDivisionOperatorNode" + }, + "ASTDivisionOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "div_operator", + "title": "Type", + "default": "div_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "type", + "left", + "right" + ], + "title": "ASTDivisionOperatorNode" + }, + "ASTDynamicVariableNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "dynamic_variable", + "title": "Type", + "default": "dynamic_variable" + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the dynamic variable." + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "ASTDynamicVariableNode" + }, + "ASTDynamicVariableNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "dynamic_variable", + "title": "Type", + "default": "dynamic_variable" + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the dynamic variable." + } + }, + "type": "object", + "required": [ + "type", + "name" + ], + "title": "ASTDynamicVariableNode" + }, + "ASTEqualsOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "eq_operator", + "title": "Type", + "default": "eq_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "left", + "right" + ], + "title": "ASTEqualsOperatorNode" + }, + "ASTEqualsOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "eq_operator", + "title": "Type", + "default": "eq_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "type", + "left", + "right" + ], + "title": "ASTEqualsOperatorNode" + }, + "ASTGreaterThanOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "gt_operator", + "title": "Type", + "default": "gt_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "left", + "right" + ], + "title": "ASTGreaterThanOperatorNode" + }, + "ASTGreaterThanOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "gt_operator", + "title": "Type", + "default": "gt_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "type", + "left", + "right" + ], + "title": "ASTGreaterThanOperatorNode" + }, + "ASTGreaterThanOrEqualsOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "gte_operator", + "title": "Type", + "default": "gte_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "left", + "right" + ], + "title": "ASTGreaterThanOrEqualsOperatorNode" + }, + "ASTGreaterThanOrEqualsOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "gte_operator", + "title": "Type", + "default": "gte_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "type", + "left", + "right" + ], + "title": "ASTGreaterThanOrEqualsOperatorNode" + }, + "ASTLLMNode-Input": { + "oneOf": [ + { + "properties": { + "type": { + "type": "string", + "const": "llm", + "title": "Type", + "default": "llm" + }, + "value_schema": { + "$ref": "#/components/schemas/LLMLiteralJsonSchemaProperty", + "description": "JSON schema describing the value that the LLM should extract.", + "examples": [ + { + "description": "User's last message contains a question about our pricing.", + "type": "boolean" + }, + { + "description": "User provided their email address.", + "type": "boolean" + } + ] + } + }, + "type": "object", + "required": [ + "value_schema" + ], + "title": "ASTLLMNode" + }, + { + "properties": { + "type": { + "type": "string", + "const": "llm", + "title": "Type", + "default": "llm" + }, + "prompt": { + "type": "string", + "description": "The prompt to evaluate to a boolean value. Deprecated. Use a boolean schema instead.", + "deprecated": true + } + }, + "type": "object", + "required": [ + "prompt" + ], + "title": "ASTLLMNode" + } + ] + }, + "ASTLLMNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "llm", + "title": "Type", + "default": "llm" + }, + "value_schema": { + "$ref": "#/components/schemas/LLMLiteralJsonSchemaProperty", + "description": "JSON schema describing the value that the LLM should extract.", + "examples": [ + { + "description": "User's last message contains a question about our pricing.", + "type": "boolean" + }, + { + "description": "User provided their email address.", + "type": "boolean" + } + ] + }, + "prompt": { + "type": "string", + "description": "The prompt to evaluate to a boolean value. Deprecated. Use a boolean schema instead.", + "deprecated": true + } + }, + "type": "object", + "required": [ + "type", + "value_schema", + "prompt" + ], + "title": "ASTLLMNode" + }, + "ASTLessThanOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "lt_operator", + "title": "Type", + "default": "lt_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "left", + "right" + ], + "title": "ASTLessThanOperatorNode" + }, + "ASTLessThanOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "lt_operator", + "title": "Type", + "default": "lt_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "type", + "left", + "right" + ], + "title": "ASTLessThanOperatorNode" + }, + "ASTLessThanOrEqualsOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "lte_operator", + "title": "Type", + "default": "lte_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "left", + "right" + ], + "title": "ASTLessThanOrEqualsOperatorNode" + }, + "ASTLessThanOrEqualsOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "lte_operator", + "title": "Type", + "default": "lte_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "type", + "left", + "right" + ], + "title": "ASTLessThanOrEqualsOperatorNode" + }, + "ASTMultiplicationOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "mul_operator", + "title": "Type", + "default": "mul_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "left", + "right" + ], + "title": "ASTMultiplicationOperatorNode" + }, + "ASTMultiplicationOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "mul_operator", + "title": "Type", + "default": "mul_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "type", + "left", + "right" + ], + "title": "ASTMultiplicationOperatorNode" + }, + "ASTNode-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/ASTStringNode-Input", + "description": "String literal." + }, + { + "$ref": "#/components/schemas/ASTNumberNode-Input", + "description": "Number literal." + }, + { + "$ref": "#/components/schemas/ASTBooleanNode-Input", + "description": "Boolean literal." + }, + { + "$ref": "#/components/schemas/ASTNullNode-Input", + "description": "Null literal." + }, + { + "$ref": "#/components/schemas/ASTLLMNode-Input", + "description": "Value extracted by an LLM according to the given schema." + }, + { + "$ref": "#/components/schemas/ASTDynamicVariableNode-Input", + "description": "Reference to a dynamic variable." + }, + { + "$ref": "#/components/schemas/ASTOrOperatorNode-Input", + "description": "Evaluates to true if any child is true." + }, + { + "$ref": "#/components/schemas/ASTAndOperatorNode-Input", + "description": "Evaluates to true if all children are true." + }, + { + "$ref": "#/components/schemas/ASTEqualsOperatorNode-Input", + "description": "Evaluates to true if the left value equals the right." + }, + { + "$ref": "#/components/schemas/ASTNotEqualsOperatorNode-Input", + "description": "Evaluates to true if the left value does not equal the right." + }, + { + "$ref": "#/components/schemas/ASTGreaterThanOperatorNode-Input", + "description": "Evaluates to true if the left value is greater than the right." + }, + { + "$ref": "#/components/schemas/ASTLessThanOperatorNode-Input", + "description": "Evaluates to true if the left value is less than the right." + }, + { + "$ref": "#/components/schemas/ASTGreaterThanOrEqualsOperatorNode-Input", + "description": "Evaluates to true if the left value is greater than or equal to the right." + }, + { + "$ref": "#/components/schemas/ASTLessThanOrEqualsOperatorNode-Input", + "description": "Evaluates to true if the left value is less than or equal to the right." + }, + { + "$ref": "#/components/schemas/ASTAdditionOperatorNode-Input", + "description": "Adds the left and right values." + }, + { + "$ref": "#/components/schemas/ASTSubtractionOperatorNode-Input", + "description": "Subtracts the right value from the left." + }, + { + "$ref": "#/components/schemas/ASTMultiplicationOperatorNode-Input", + "description": "Multiplies the left value times the right." + }, + { + "$ref": "#/components/schemas/ASTDivisionOperatorNode-Input", + "description": "Divides the left value by the right." + }, + { + "$ref": "#/components/schemas/ASTConditionalOperatorNode-Input", + "description": "Selects one of two expressions based on whether the given condition evaluates to true." + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "add_operator": "#/components/schemas/ASTAdditionOperatorNode-Input", + "and_operator": "#/components/schemas/ASTAndOperatorNode-Input", + "boolean_literal": "#/components/schemas/ASTBooleanNode-Input", + "conditional_operator": "#/components/schemas/ASTConditionalOperatorNode-Input", + "div_operator": "#/components/schemas/ASTDivisionOperatorNode-Input", + "dynamic_variable": "#/components/schemas/ASTDynamicVariableNode-Input", + "eq_operator": "#/components/schemas/ASTEqualsOperatorNode-Input", + "gt_operator": "#/components/schemas/ASTGreaterThanOperatorNode-Input", + "gte_operator": "#/components/schemas/ASTGreaterThanOrEqualsOperatorNode-Input", + "llm": "#/components/schemas/ASTLLMNode-Input", + "lt_operator": "#/components/schemas/ASTLessThanOperatorNode-Input", + "lte_operator": "#/components/schemas/ASTLessThanOrEqualsOperatorNode-Input", + "mul_operator": "#/components/schemas/ASTMultiplicationOperatorNode-Input", + "neq_operator": "#/components/schemas/ASTNotEqualsOperatorNode-Input", + "null_literal": "#/components/schemas/ASTNullNode-Input", + "number_literal": "#/components/schemas/ASTNumberNode-Input", + "or_operator": "#/components/schemas/ASTOrOperatorNode-Input", + "string_literal": "#/components/schemas/ASTStringNode-Input", + "sub_operator": "#/components/schemas/ASTSubtractionOperatorNode-Input" + } + } + }, + "ASTNode-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/ASTStringNode-Output", + "description": "String literal." + }, + { + "$ref": "#/components/schemas/ASTNumberNode-Output", + "description": "Number literal." + }, + { + "$ref": "#/components/schemas/ASTBooleanNode-Output", + "description": "Boolean literal." + }, + { + "$ref": "#/components/schemas/ASTNullNode-Output", + "description": "Null literal." + }, + { + "$ref": "#/components/schemas/ASTLLMNode-Output", + "description": "Value extracted by an LLM according to the given schema." + }, + { + "$ref": "#/components/schemas/ASTDynamicVariableNode-Output", + "description": "Reference to a dynamic variable." + }, + { + "$ref": "#/components/schemas/ASTOrOperatorNode-Output", + "description": "Evaluates to true if any child is true." + }, + { + "$ref": "#/components/schemas/ASTAndOperatorNode-Output", + "description": "Evaluates to true if all children are true." + }, + { + "$ref": "#/components/schemas/ASTEqualsOperatorNode-Output", + "description": "Evaluates to true if the left value equals the right." + }, + { + "$ref": "#/components/schemas/ASTNotEqualsOperatorNode-Output", + "description": "Evaluates to true if the left value does not equal the right." + }, + { + "$ref": "#/components/schemas/ASTGreaterThanOperatorNode-Output", + "description": "Evaluates to true if the left value is greater than the right." + }, + { + "$ref": "#/components/schemas/ASTLessThanOperatorNode-Output", + "description": "Evaluates to true if the left value is less than the right." + }, + { + "$ref": "#/components/schemas/ASTGreaterThanOrEqualsOperatorNode-Output", + "description": "Evaluates to true if the left value is greater than or equal to the right." + }, + { + "$ref": "#/components/schemas/ASTLessThanOrEqualsOperatorNode-Output", + "description": "Evaluates to true if the left value is less than or equal to the right." + }, + { + "$ref": "#/components/schemas/ASTAdditionOperatorNode-Output", + "description": "Adds the left and right values." + }, + { + "$ref": "#/components/schemas/ASTSubtractionOperatorNode-Output", + "description": "Subtracts the right value from the left." + }, + { + "$ref": "#/components/schemas/ASTMultiplicationOperatorNode-Output", + "description": "Multiplies the left value times the right." + }, + { + "$ref": "#/components/schemas/ASTDivisionOperatorNode-Output", + "description": "Divides the left value by the right." + }, + { + "$ref": "#/components/schemas/ASTConditionalOperatorNode-Output", + "description": "Selects one of two expressions based on whether the given condition evaluates to true." + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "add_operator": "#/components/schemas/ASTAdditionOperatorNode-Output", + "and_operator": "#/components/schemas/ASTAndOperatorNode-Output", + "boolean_literal": "#/components/schemas/ASTBooleanNode-Output", + "conditional_operator": "#/components/schemas/ASTConditionalOperatorNode-Output", + "div_operator": "#/components/schemas/ASTDivisionOperatorNode-Output", + "dynamic_variable": "#/components/schemas/ASTDynamicVariableNode-Output", + "eq_operator": "#/components/schemas/ASTEqualsOperatorNode-Output", + "gt_operator": "#/components/schemas/ASTGreaterThanOperatorNode-Output", + "gte_operator": "#/components/schemas/ASTGreaterThanOrEqualsOperatorNode-Output", + "llm": "#/components/schemas/ASTLLMNode-Output", + "lt_operator": "#/components/schemas/ASTLessThanOperatorNode-Output", + "lte_operator": "#/components/schemas/ASTLessThanOrEqualsOperatorNode-Output", + "mul_operator": "#/components/schemas/ASTMultiplicationOperatorNode-Output", + "neq_operator": "#/components/schemas/ASTNotEqualsOperatorNode-Output", + "null_literal": "#/components/schemas/ASTNullNode-Output", + "number_literal": "#/components/schemas/ASTNumberNode-Output", + "or_operator": "#/components/schemas/ASTOrOperatorNode-Output", + "string_literal": "#/components/schemas/ASTStringNode-Output", + "sub_operator": "#/components/schemas/ASTSubtractionOperatorNode-Output" + } + } + }, + "ASTNotEqualsOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "neq_operator", + "title": "Type", + "default": "neq_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "left", + "right" + ], + "title": "ASTNotEqualsOperatorNode" + }, + "ASTNotEqualsOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "neq_operator", + "title": "Type", + "default": "neq_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "type", + "left", + "right" + ], + "title": "ASTNotEqualsOperatorNode" + }, + "ASTNullNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "null_literal", + "title": "Type", + "default": "null_literal" + } + }, + "type": "object", + "title": "ASTNullNode" + }, + "ASTNullNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "null_literal", + "title": "Type", + "default": "null_literal" + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "ASTNullNode" + }, + "ASTNumberNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "number_literal", + "title": "Type", + "default": "number_literal" + }, + "value": { + "type": "number", + "title": "Value", + "description": "Value of this literal." + } + }, + "type": "object", + "required": [ + "value" + ], + "title": "ASTNumberNode" + }, + "ASTNumberNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "number_literal", + "title": "Type", + "default": "number_literal" + }, + "value": { + "type": "number", + "title": "Value", + "description": "Value of this literal." + } + }, + "type": "object", + "required": [ + "type", + "value" + ], + "title": "ASTNumberNode" + }, + "ASTOrOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "or_operator", + "title": "Type", + "default": "or_operator" + }, + "children": { + "items": { + "$ref": "#/components/schemas/ASTNode-Input" + }, + "type": "array", + "minItems": 2, + "title": "Children", + "description": "Child nodes of the logical operator." + } + }, + "type": "object", + "required": [ + "children" + ], + "title": "ASTOrOperatorNode" + }, + "ASTOrOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "or_operator", + "title": "Type", + "default": "or_operator" + }, + "children": { + "items": { + "$ref": "#/components/schemas/ASTNode-Output" + }, + "type": "array", + "minItems": 2, + "title": "Children", + "description": "Child nodes of the logical operator." + } + }, + "type": "object", + "required": [ + "type", + "children" + ], + "title": "ASTOrOperatorNode" + }, + "ASTStringNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "string_literal", + "title": "Type", + "default": "string_literal" + }, + "value": { + "type": "string", + "title": "Value", + "description": "Value of this literal." + } + }, + "type": "object", + "required": [ + "value" + ], + "title": "ASTStringNode" + }, + "ASTStringNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "string_literal", + "title": "Type", + "default": "string_literal" + }, + "value": { + "type": "string", + "title": "Value", + "description": "Value of this literal." + } + }, + "type": "object", + "required": [ + "type", + "value" + ], + "title": "ASTStringNode" + }, + "ASTSubtractionOperatorNode-Input": { + "properties": { + "type": { + "type": "string", + "const": "sub_operator", + "title": "Type", + "default": "sub_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "left", + "right" + ], + "title": "ASTSubtractionOperatorNode" + }, + "ASTSubtractionOperatorNode-Output": { + "properties": { + "type": { + "type": "string", + "const": "sub_operator", + "title": "Type", + "default": "sub_operator" + }, + "left": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Left operand of the binary operator." + }, + "right": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Right operand of the binary operator." + } + }, + "type": "object", + "required": [ + "type", + "left", + "right" + ], + "title": "ASTSubtractionOperatorNode" + }, + "AccountChangeActivityId": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 99 + ], + "title": "AccountChangeActivityId", + "description": "OCSF Activity IDs for Account Change [3001] events.\n\nSpec: https://schema.ocsf.io/1.6.0/classes/account_change" + }, + "ActorModel": { + "properties": { + "user": { + "$ref": "#/components/schemas/UserModel", + "description": "User who performed the action" + }, + "app_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Name", + "description": "Client application or service name" + }, + "app_uid": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Uid", + "description": "Client application unique identifier" + }, + "session": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Session", + "description": "Session information" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "user" + ], + "title": "ActorModel", + "description": "OCSF Actor object - describes the entity that performed the action.\n\nSpec: https://schema.ocsf.io/1.6.0/objects/actor" + }, + "AddChapterResponseModel": { + "properties": { + "chapter": { + "$ref": "#/components/schemas/ChapterWithContentResponseModel" + } + }, + "type": "object", + "required": [ + "chapter" + ], + "title": "AddChapterResponseModel" + }, + "AddKnowledgeBaseResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseFolderPathSegmentSummaryResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The folder path segments leading to this entity, from root to parent folder." + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "AddKnowledgeBaseResponseModel" + }, + "AddProjectResponseModel": { + "properties": { + "project": { + "$ref": "#/components/schemas/ProjectResponseModel" + } + }, + "type": "object", + "required": [ + "project" + ], + "title": "AddProjectResponseModel" + }, + "AddPronunciationDictionaryResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the created pronunciation dictionary." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the created pronunciation dictionary." + }, + "created_by": { + "type": "string", + "title": "Created By", + "description": "The user ID of the creator of the pronunciation dictionary." + }, + "creation_time_unix": { + "type": "integer", + "title": "Creation Time Unix", + "description": "The creation time of the pronunciation dictionary in Unix timestamp." + }, + "version_id": { + "type": "string", + "title": "Version Id", + "description": "The ID of the created pronunciation dictionary version." + }, + "version_rules_num": { + "type": "integer", + "title": "Version Rules Num", + "description": "The number of rules in the version of the pronunciation dictionary." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of the pronunciation dictionary." + }, + "permission_on_resource": { + "anyOf": [ + { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ] + }, + { + "type": "null" + } + ], + "title": "Permission On Resource", + "description": "The permission on the resource of the pronunciation dictionary." + } + }, + "type": "object", + "required": [ + "id", + "name", + "created_by", + "creation_time_unix", + "version_id", + "version_rules_num", + "permission_on_resource" + ], + "title": "AddPronunciationDictionaryResponseModel", + "example": { + "created_by": "ar6633Es2kUjFXBdR1iVc9ztsXl1", + "creation_time_unix": 1714156800, + "description": "This is a test dictionary", + "id": "5xM3yVvZQKV0EfqQpLrJ", + "name": "My Dictionary", + "permission_on_resource": "admin", + "version_id": "5xM3yVvZQKV0EfqQpLrJ", + "version_rules_num": 5 + } + }, + "AddVoiceIVCResponseModel": { + "properties": { + "voice_id": { + "type": "string", + "title": "Voice Id", + "description": "The ID of the newly created voice." + }, + "requires_verification": { + "type": "boolean", + "title": "Requires Verification", + "description": "Whether the voice requires verification" + } + }, + "type": "object", + "required": [ + "voice_id", + "requires_verification" + ], + "title": "AddVoiceIVCResponseModel", + "example": { + "requires_verification": false, + "voice_id": "c38kUX8pkfYO2kHyqfFy" + } + }, + "AddVoiceResponseModel": { + "properties": { + "voice_id": { + "type": "string", + "title": "Voice Id", + "description": "The ID of the voice." + } + }, + "type": "object", + "required": [ + "voice_id" + ], + "title": "AddVoiceResponseModel", + "example": { + "voice_id": "b38kUX8pkfYO2kHyqfFy" + } + }, + "AddWorkspaceGroupMemberResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the workspace group member addition request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "AddWorkspaceGroupMemberResponseModel", + "example": { + "status": "ok" + } + }, + "AddWorkspaceInviteResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the workspace invite request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "AddWorkspaceInviteResponseModel", + "example": { + "status": "ok" + } + }, + "AdditionalFormatResponseModel": { + "properties": { + "requested_format": { + "type": "string", + "title": "Requested Format", + "description": "The requested format." + }, + "file_extension": { + "type": "string", + "title": "File Extension", + "description": "The file extension of the additional format." + }, + "content_type": { + "type": "string", + "title": "Content Type", + "description": "The content type of the additional format." + }, + "is_base64_encoded": { + "type": "boolean", + "title": "Is Base64 Encoded", + "description": "Whether the content is base64 encoded." + }, + "content": { + "type": "string", + "title": "Content", + "description": "The content of the additional format." + } + }, + "type": "object", + "required": [ + "requested_format", + "file_extension", + "content_type", + "is_base64_encoded", + "content" + ], + "title": "AdditionalFormatResponseModel" + }, + "AdditionalFormats": { + "items": { + "$ref": "#/components/schemas/ExportOptions" + }, + "type": "array", + "maxItems": 10, + "title": "AdditionalFormats" + }, + "AdhocAgentConfigOverrideForTestRequestModel": { + "properties": { + "conversation_config": { + "$ref": "#/components/schemas/ConversationalConfigAPIModel-Input" + }, + "platform_settings": { + "$ref": "#/components/schemas/AgentPlatformSettingsRequestModel" + }, + "workflow": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentWorkflowRequestModel" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "conversation_config", + "platform_settings" + ], + "title": "AdhocAgentConfigOverrideForTestRequestModel" + }, + "AgentAlertingMonitorConfig": { + "properties": { + "threshold": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Threshold", + "description": "Failure rate threshold at which this monitor can notify.", + "default": 0.5 + }, + "auto_resolve_after_inactive_minutes": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Auto Resolve After Inactive Minutes", + "description": "How many minutes an alert can stay inactive before it is auto-resolved." + } + }, + "type": "object", + "title": "AgentAlertingMonitorConfig" + }, + "AgentAlertingSettings": { + "properties": { + "monitor_configs": { + "additionalProperties": { + "$ref": "#/components/schemas/AgentAlertingMonitorConfig" + }, + "propertyNames": { + "$ref": "#/components/schemas/Monitor" + }, + "type": "object", + "title": "Monitor Configs", + "description": "Alerting configuration keyed by monitor." + }, + "auto_resolve_after_inactive_minutes": { + "type": "integer", + "minimum": 1, + "title": "Auto Resolve After Inactive Minutes", + "description": "How many minutes an alert can stay inactive before it is auto-resolved.", + "default": 15 + }, + "notifiers": { + "items": { + "$ref": "#/components/schemas/AgentAlertingWebhookNotifier" + }, + "type": "array", + "title": "Notifiers", + "description": "Delivery channels for alert lifecycle notifications. Currently supports webhook notifiers." + } + }, + "type": "object", + "title": "AgentAlertingSettings" + }, + "AgentAlertingWebhookNotifier": { + "properties": { + "type": { + "type": "string", + "const": "webhook", + "title": "Type", + "default": "webhook" + }, + "url": { + "type": "string", + "maxLength": 2048, + "title": "Url", + "description": "The URL to send alert lifecycle notifications to." + }, + "request_headers": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Request Headers", + "description": "Optional static request headers sent with each alert webhook call, for example to authenticate with the receiving endpoint." + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "AgentAlertingWebhookNotifier" + }, + "AgentBranchBasicInfo": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "AgentBranchBasicInfo" + }, + "AgentBranchResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "description": { + "type": "string", + "title": "Description" + }, + "created_at": { + "type": "integer", + "title": "Created At" + }, + "last_committed_at": { + "type": "integer", + "title": "Last Committed At" + }, + "is_archived": { + "type": "boolean", + "title": "Is Archived" + }, + "protection_status": { + "$ref": "#/components/schemas/BranchProtectionStatus", + "default": "writer_perms_required" + }, + "access_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + { + "type": "null" + } + ], + "description": "Access information for the branch" + }, + "current_live_percentage": { + "type": "number", + "title": "Current Live Percentage", + "description": "Percentage of traffic live on the branch", + "default": 0 + }, + "parent_branch": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentBranchBasicInfo" + }, + { + "type": "null" + } + ], + "description": "Parent branch of the branch" + }, + "most_recent_versions": { + "items": { + "$ref": "#/components/schemas/AgentVersionMetadata" + }, + "type": "array", + "title": "Most Recent Versions", + "description": "Most recent versions on the branch" + } + }, + "type": "object", + "required": [ + "id", + "name", + "agent_id", + "description", + "created_at", + "last_committed_at", + "is_archived" + ], + "title": "AgentBranchResponse" + }, + "AgentBranchSummary": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "description": { + "type": "string", + "title": "Description" + }, + "created_at": { + "type": "integer", + "title": "Created At" + }, + "last_committed_at": { + "type": "integer", + "title": "Last Committed At" + }, + "is_archived": { + "type": "boolean", + "title": "Is Archived" + }, + "protection_status": { + "$ref": "#/components/schemas/BranchProtectionStatus", + "default": "writer_perms_required" + }, + "access_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + { + "type": "null" + } + ], + "description": "Access information for the branch" + }, + "current_live_percentage": { + "type": "number", + "title": "Current Live Percentage", + "description": "Percentage of traffic live on the branch", + "default": 0 + }, + "parent_branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Branch Id", + "description": "ID of the parent branch" + }, + "draft_exists": { + "type": "boolean", + "title": "Draft Exists", + "description": "Whether a draft exists for the branch", + "default": false + } + }, + "type": "object", + "required": [ + "id", + "name", + "agent_id", + "description", + "created_at", + "last_committed_at", + "is_archived" + ], + "title": "AgentBranchSummary" + }, + "AgentCallLimits": { + "properties": { + "agent_concurrency_limit": { + "type": "integer", + "title": "Agent Concurrency Limit", + "description": "The maximum number of concurrent conversations. -1 indicates that there is no maximum", + "default": -1 + }, + "daily_limit": { + "type": "integer", + "title": "Daily Limit", + "description": "The maximum number of conversations per day", + "default": 100000 + }, + "bursting_enabled": { + "type": "boolean", + "title": "Bursting Enabled", + "description": "Whether to enable bursting. If true, exceeding workspace concurrency limit will be allowed up to 3 times the limit. Calls will be charged at double rate when exceeding the limit.", + "default": true + } + }, + "type": "object", + "title": "AgentCallLimits", + "example": { + "agent_concurrency_limit": -1, + "bursting_enabled": true, + "daily_limit": 100000 + } + }, + "AgentConfigAPIModel-Input": { + "properties": { + "first_message": { + "type": "string", + "title": "First Message", + "description": "If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion.", + "default": "", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "language": { + "type": "string", + "title": "Language", + "description": "Language of the agent - used for ASR and TTS", + "default": "en", + "x-convai-client-override": true + }, + "hinglish_mode": { + "type": "boolean", + "title": "Hinglish Mode", + "description": "When enabled and language is Hindi, the agent will respond in Hinglish", + "default": false + }, + "dynamic_variables": { + "$ref": "#/components/schemas/DynamicVariablesConfig-Input", + "description": "Configuration for dynamic variables" + }, + "disable_first_message_interruptions": { + "type": "boolean", + "title": "Disable First Message Interruptions", + "description": "If true, the user will not be able to interrupt the agent while the first message is being delivered.", + "default": false + }, + "max_conversation_duration_message": { + "type": "string", + "title": "Max Conversation Duration Message", + "description": "If non-empty, the message the agent will send when max conversation duration is reached.", + "default": "", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "text_behavior_overrides": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/BehaviorOverride" + }, + "propertyNames": { + "$ref": "#/components/schemas/ConversationInitiationSource" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Text Behavior Overrides", + "description": "Per-channel response behavior overrides for text conversations. Built-in channel defaults apply when unset." + }, + "prompt": { + "$ref": "#/components/schemas/PromptAgentAPIModel-Input", + "description": "The prompt for the agent" + } + }, + "type": "object", + "title": "AgentConfigAPIModel", + "example": { + "disable_first_message_interruptions": false, + "first_message": "Hello, how can I help you today?", + "language": "en" + } + }, + "AgentConfigAPIModel-Output": { + "properties": { + "first_message": { + "type": "string", + "title": "First Message", + "description": "If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion.", + "default": "", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "language": { + "type": "string", + "title": "Language", + "description": "Language of the agent - used for ASR and TTS", + "default": "en", + "x-convai-client-override": true + }, + "hinglish_mode": { + "type": "boolean", + "title": "Hinglish Mode", + "description": "When enabled and language is Hindi, the agent will respond in Hinglish", + "default": false + }, + "dynamic_variables": { + "$ref": "#/components/schemas/DynamicVariablesConfig-Output", + "description": "Configuration for dynamic variables" + }, + "disable_first_message_interruptions": { + "type": "boolean", + "title": "Disable First Message Interruptions", + "description": "If true, the user will not be able to interrupt the agent while the first message is being delivered.", + "default": false + }, + "max_conversation_duration_message": { + "type": "string", + "title": "Max Conversation Duration Message", + "description": "If non-empty, the message the agent will send when max conversation duration is reached.", + "default": "", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "text_behavior_overrides": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/BehaviorOverride" + }, + "propertyNames": { + "$ref": "#/components/schemas/ConversationInitiationSource" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Text Behavior Overrides", + "description": "Per-channel response behavior overrides for text conversations. Built-in channel defaults apply when unset." + }, + "prompt": { + "$ref": "#/components/schemas/PromptAgentAPIModel-Output", + "description": "The prompt for the agent" + } + }, + "type": "object", + "title": "AgentConfigAPIModel", + "example": { + "disable_first_message_interruptions": false, + "first_message": "Hello, how can I help you today?", + "language": "en" + } + }, + "AgentConfigAPIModelWorkflowOverride-Input": { + "properties": { + "first_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Message", + "description": "If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion.", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "Language of the agent - used for ASR and TTS", + "x-convai-client-override": true + }, + "hinglish_mode": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Hinglish Mode", + "description": "When enabled and language is Hindi, the agent will respond in Hinglish" + }, + "dynamic_variables": { + "anyOf": [ + { + "$ref": "#/components/schemas/DynamicVariablesConfigWorkflowOverride-Input" + }, + { + "type": "null" + } + ], + "description": "Configuration for dynamic variables" + }, + "disable_first_message_interruptions": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable First Message Interruptions", + "description": "If true, the user will not be able to interrupt the agent while the first message is being delivered." + }, + "max_conversation_duration_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Max Conversation Duration Message", + "description": "If non-empty, the message the agent will send when max conversation duration is reached.", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "text_behavior_overrides": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/BehaviorOverride" + }, + "propertyNames": { + "$ref": "#/components/schemas/ConversationInitiationSource" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Text Behavior Overrides", + "description": "Per-channel response behavior overrides for text conversations. Built-in channel defaults apply when unset." + }, + "prompt": { + "anyOf": [ + { + "$ref": "#/components/schemas/PromptAgentAPIModelWorkflowOverride-Input" + }, + { + "type": "null" + } + ], + "description": "The prompt for the agent" + } + }, + "type": "object", + "title": "AgentConfigAPIModelWorkflowOverride", + "example": { + "disable_first_message_interruptions": false, + "dynamic_variables": { + "dynamic_variable_placeholders": { + "user_name": "John Doe" + } + }, + "first_message": "Hello, how can I help you today?", + "language": "en", + "prompt": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "max_tokens": -1, + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "temperature": 0, + "tool_ids": [], + "tools": [] + } + } + }, + "AgentConfigAPIModelWorkflowOverride-Output": { + "properties": { + "first_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Message", + "description": "If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion.", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "Language of the agent - used for ASR and TTS", + "x-convai-client-override": true + }, + "hinglish_mode": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Hinglish Mode", + "description": "When enabled and language is Hindi, the agent will respond in Hinglish" + }, + "dynamic_variables": { + "anyOf": [ + { + "$ref": "#/components/schemas/DynamicVariablesConfigWorkflowOverride-Output" + }, + { + "type": "null" + } + ], + "description": "Configuration for dynamic variables" + }, + "disable_first_message_interruptions": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable First Message Interruptions", + "description": "If true, the user will not be able to interrupt the agent while the first message is being delivered." + }, + "max_conversation_duration_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Max Conversation Duration Message", + "description": "If non-empty, the message the agent will send when max conversation duration is reached.", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "text_behavior_overrides": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/BehaviorOverride" + }, + "propertyNames": { + "$ref": "#/components/schemas/ConversationInitiationSource" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Text Behavior Overrides", + "description": "Per-channel response behavior overrides for text conversations. Built-in channel defaults apply when unset." + }, + "prompt": { + "anyOf": [ + { + "$ref": "#/components/schemas/PromptAgentAPIModelWorkflowOverride-Output" + }, + { + "type": "null" + } + ], + "description": "The prompt for the agent" + } + }, + "type": "object", + "title": "AgentConfigAPIModelWorkflowOverride", + "example": { + "disable_first_message_interruptions": false, + "dynamic_variables": { + "dynamic_variable_placeholders": { + "user_name": "John Doe" + } + }, + "first_message": "Hello, how can I help you today?", + "language": "en", + "prompt": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "max_tokens": -1, + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "temperature": 0, + "tool_ids": [], + "tools": [] + } + } + }, + "AgentConfigOverride-Input": { + "properties": { + "first_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Message", + "description": "If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion.", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "Language of the agent - used for ASR and TTS", + "x-convai-client-override": true + }, + "max_conversation_duration_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Max Conversation Duration Message", + "description": "If non-empty, the message the agent will send when max conversation duration is reached.", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "prompt": { + "anyOf": [ + { + "$ref": "#/components/schemas/PromptAgentAPIModelOverride-Input" + }, + { + "type": "null" + } + ], + "description": "The prompt for the agent" + } + }, + "type": "object", + "title": "AgentConfigOverride", + "example": { + "first_message": "Hello, how can I help you today?", + "language": "en", + "prompt": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "tool_ids": [] + } + } + }, + "AgentConfigOverride-Output": { + "properties": { + "first_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Message", + "description": "If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion.", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "Language of the agent - used for ASR and TTS", + "x-convai-client-override": true + }, + "max_conversation_duration_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Max Conversation Duration Message", + "description": "If non-empty, the message the agent will send when max conversation duration is reached.", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "prompt": { + "anyOf": [ + { + "$ref": "#/components/schemas/PromptAgentAPIModelOverride-Output" + }, + { + "type": "null" + } + ], + "description": "The prompt for the agent" + } + }, + "type": "object", + "title": "AgentConfigOverride", + "example": { + "first_message": "Hello, how can I help you today?", + "language": "en", + "prompt": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "tool_ids": [] + } + } + }, + "AgentConfigOverrideConfig": { + "properties": { + "first_message": { + "type": "boolean", + "title": "First Message", + "description": "Whether to allow overriding the first_message field.", + "default": false + }, + "language": { + "type": "boolean", + "title": "Language", + "description": "Whether to allow overriding the language field.", + "default": false + }, + "max_conversation_duration_message": { + "type": "boolean", + "title": "Max Conversation Duration Message", + "description": "Whether to allow overriding the max_conversation_duration_message field.", + "default": false + }, + "prompt": { + "$ref": "#/components/schemas/PromptAgentAPIModelOverrideConfig", + "description": "Configures overrides for nested fields." + } + }, + "type": "object", + "title": "AgentConfigOverrideConfig" + }, + "AgentDefinitionSource": { + "type": "string", + "enum": [ + "cli", + "ui", + "api", + "template", + "unknown" + ], + "title": "AgentDefinitionSource", + "default": "unknown" + }, + "AgentDeploymentPercentageStrategy": { + "properties": { + "type": { + "type": "string", + "const": "percentage", + "title": "Type", + "default": "percentage" + }, + "traffic_percentage": { + "type": "number", + "maximum": 100, + "minimum": 0, + "title": "Traffic Percentage", + "description": "Traffic percentage to deploy", + "examples": [ + 0.5 + ] + } + }, + "type": "object", + "required": [ + "traffic_percentage" + ], + "title": "AgentDeploymentPercentageStrategy" + }, + "AgentDeploymentRequest": { + "properties": { + "requests": { + "items": { + "$ref": "#/components/schemas/AgentDeploymentRequestItem" + }, + "type": "array", + "title": "Requests", + "description": "List of deployment requests", + "examples": [ + [ + { + "branch_id": "agtbrch_8901k4t9z5defmb8vh3e9361y7nj", + "deployment_strategy": { + "traffic_percentage": 0.5, + "type": "percentage" + } + } + ] + ] + } + }, + "type": "object", + "required": [ + "requests" + ], + "title": "AgentDeploymentRequest" + }, + "AgentDeploymentRequestItem": { + "properties": { + "branch_id": { + "type": "string", + "title": "Branch Id", + "description": "ID of the branch to deploy", + "examples": [ + "agtbrch_8901k4t9z5defmb8vh3e9361y7nj" + ] + }, + "deployment_strategy": { + "title": "Deployment Strategy", + "discriminator": { + "propertyName": "type", + "mapping": { + "percentage": "#/components/schemas/AgentDeploymentPercentageStrategy" + } + }, + "$ref": "#/components/schemas/AgentDeploymentPercentageStrategy" + } + }, + "type": "object", + "required": [ + "branch_id", + "deployment_strategy" + ], + "title": "AgentDeploymentRequestItem" + }, + "AgentDeploymentResponse": { + "properties": { + "traffic_percentage_branch_id_map": { + "additionalProperties": { + "type": "number" + }, + "type": "object", + "title": "Traffic Percentage Branch Id Map", + "description": "Map of branch IDs to traffic percentages", + "examples": [ + { + "agtbrch_8901k4t9z5defmb8vh3e9361y7nj": 0.5 + } + ] + } + }, + "type": "object", + "title": "AgentDeploymentResponse" + }, + "AgentFailureResponseExample": { + "properties": { + "response": { + "type": "string", + "title": "Response" + }, + "type": { + "type": "string", + "const": "failure", + "title": "Type" + } + }, + "type": "object", + "required": [ + "response", + "type" + ], + "title": "AgentFailureResponseExample" + }, + "AgentMetadata": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + }, + "workflow_node_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workflow Node Id" + }, + "version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id" + } + }, + "type": "object", + "required": [ + "agent_id" + ], + "title": "AgentMetadata" + }, + "AgentMetadataDBModel": { + "properties": { + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs" + }, + "updated_at_unix_secs": { + "type": "integer", + "title": "Updated At Unix Secs" + }, + "created_from": { + "$ref": "#/components/schemas/AgentDefinitionSource", + "default": "unknown" + }, + "last_updated_from": { + "$ref": "#/components/schemas/AgentDefinitionSource", + "default": "unknown" + } + }, + "type": "object", + "required": [ + "created_at_unix_secs", + "updated_at_unix_secs" + ], + "title": "AgentMetadataDBModel" + }, + "AgentMetadataResponseModel": { + "properties": { + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs", + "description": "The creation time of the agent in unix seconds" + }, + "updated_at_unix_secs": { + "type": "integer", + "title": "Updated At Unix Secs", + "description": "The last update time of the agent in unix seconds" + } + }, + "type": "object", + "required": [ + "created_at_unix_secs", + "updated_at_unix_secs" + ], + "title": "AgentMetadataResponseModel" + }, + "AgentPlatformSettingsRequestModel": { + "properties": { + "evaluation": { + "$ref": "#/components/schemas/EvaluationSettings-Input", + "description": "Settings for evaluation" + }, + "widget": { + "$ref": "#/components/schemas/WidgetConfig-Input", + "description": "Configuration for the widget" + }, + "data_collection": { + "additionalProperties": { + "$ref": "#/components/schemas/AnalysisProperty" + }, + "type": "object", + "title": "Data Collection", + "description": "Data collection settings" + }, + "data_collection_scopes": { + "additionalProperties": { + "$ref": "#/components/schemas/AnalysisScope" + }, + "type": "object", + "title": "Data Collection Scopes", + "description": "Scope per data collection item ID. Missing keys default to conversation scope." + }, + "overrides": { + "$ref": "#/components/schemas/ConversationInitiationClientDataConfig-Input", + "description": "Additional overrides for the agent during conversation initiation" + }, + "workspace_overrides": { + "$ref": "#/components/schemas/AgentWorkspaceOverrides-Input", + "description": "Workspace overrides for the agent" + }, + "testing": { + "$ref": "#/components/schemas/AgentTestingSettings", + "description": "Testing configuration for the agent" + }, + "archived": { + "type": "boolean", + "title": "Archived", + "description": "Whether the agent is archived", + "default": false + }, + "guardrails": { + "title": "Guardrails", + "description": "Guardrails configuration for the agent", + "discriminator": { + "propertyName": "version", + "mapping": { + "1": "#/components/schemas/GuardrailsV1-Input" + } + }, + "$ref": "#/components/schemas/GuardrailsV1-Input" + }, + "summary_language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Summary Language", + "description": "Language for all conversation analysis outputs (summaries, titles, evaluation rationales, data collection rationales). If not set, the language will be inferred from the conversation. Must be one of the supported conversation languages." + }, + "auth": { + "$ref": "#/components/schemas/AuthSettings", + "description": "Settings for authentication" + }, + "call_limits": { + "$ref": "#/components/schemas/AgentCallLimits", + "description": "Call limits for the agent" + }, + "privacy": { + "$ref": "#/components/schemas/PrivacyConfig-Input", + "description": "Privacy settings for the agent" + }, + "trust_context": { + "$ref": "#/components/schemas/AgentTrustContext", + "description": "The trust context in which the agent operates.", + "default": "unknown" + }, + "analysis_llm": { + "$ref": "#/components/schemas/LLM", + "description": "Default LLM model for post-call analysis (evaluation and data collection)", + "default": "gemini-2.5-flash" + }, + "alerting": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentAlertingSettings" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "AgentPlatformSettingsRequestModel" + }, + "AgentPlatformSettingsResponseModel": { + "properties": { + "evaluation": { + "$ref": "#/components/schemas/EvaluationSettings-Output", + "description": "Settings for evaluation" + }, + "widget": { + "$ref": "#/components/schemas/WidgetConfig-Output", + "description": "Configuration for the widget" + }, + "data_collection": { + "additionalProperties": { + "$ref": "#/components/schemas/AnalysisProperty" + }, + "type": "object", + "title": "Data Collection", + "description": "Data collection settings" + }, + "data_collection_scopes": { + "additionalProperties": { + "$ref": "#/components/schemas/AnalysisScope" + }, + "type": "object", + "title": "Data Collection Scopes", + "description": "Scope per data collection item ID. Missing keys default to conversation scope." + }, + "overrides": { + "$ref": "#/components/schemas/ConversationInitiationClientDataConfig-Output", + "description": "Additional overrides for the agent during conversation initiation" + }, + "workspace_overrides": { + "$ref": "#/components/schemas/AgentWorkspaceOverrides-Output", + "description": "Workspace overrides for the agent" + }, + "testing": { + "$ref": "#/components/schemas/AgentTestingSettings", + "description": "Testing configuration for the agent" + }, + "archived": { + "type": "boolean", + "title": "Archived", + "description": "Whether the agent is archived", + "default": false + }, + "guardrails": { + "title": "Guardrails", + "description": "Guardrails configuration for the agent", + "discriminator": { + "propertyName": "version", + "mapping": { + "1": "#/components/schemas/GuardrailsV1-Output" + } + }, + "$ref": "#/components/schemas/GuardrailsV1-Output" + }, + "summary_language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Summary Language", + "description": "Language for all conversation analysis outputs (summaries, titles, evaluation rationales, data collection rationales). If not set, the language will be inferred from the conversation. Must be one of the supported conversation languages." + }, + "auth": { + "$ref": "#/components/schemas/AuthSettings", + "description": "Settings for authentication" + }, + "call_limits": { + "$ref": "#/components/schemas/AgentCallLimits", + "description": "Call limits for the agent" + }, + "privacy": { + "$ref": "#/components/schemas/PrivacyConfig-Output", + "description": "Privacy settings for the agent" + }, + "trust_context": { + "$ref": "#/components/schemas/AgentTrustContext", + "description": "The trust context in which the agent operates.", + "default": "unknown" + }, + "analysis_llm": { + "$ref": "#/components/schemas/LLM", + "description": "Default LLM model for post-call analysis (evaluation and data collection)", + "default": "gemini-2.5-flash" + }, + "alerting": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentAlertingSettings" + }, + { + "type": "null" + } + ] + }, + "safety": { + "$ref": "#/components/schemas/SafetyResponseModel" + } + }, + "type": "object", + "title": "AgentPlatformSettingsResponseModel" + }, + "AgentSimulatedChatTestResponseModel": { + "properties": { + "simulated_conversation": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptResponseModel" + }, + "type": "array", + "title": "Simulated Conversation" + }, + "analysis": { + "$ref": "#/components/schemas/ConversationHistoryAnalysisCommonModel" + } + }, + "type": "object", + "required": [ + "simulated_conversation", + "analysis" + ], + "title": "AgentSimulatedChatTestResponseModel" + }, + "AgentSortBy": { + "type": "string", + "enum": [ + "name", + "created_at", + "call_count_7d" + ], + "title": "AgentSortBy" + }, + "AgentSuccessfulResponseExample": { + "properties": { + "response": { + "type": "string", + "title": "Response" + }, + "type": { + "type": "string", + "const": "success", + "title": "Type" + } + }, + "type": "object", + "required": [ + "response", + "type" + ], + "title": "AgentSuccessfulResponseExample" + }, + "AgentSummaryBatchSuccessfulResponseModel": { + "properties": { + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "data": { + "$ref": "#/components/schemas/AgentSummaryResponseModel" + } + }, + "type": "object", + "required": [ + "status", + "data" + ], + "title": "AgentSummaryBatchSuccessfulResponseModel" + }, + "AgentSummaryResponseModel": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "The ID of the agent" + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the agent" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tags", + "description": "Agent tags used to categorize the agent" + }, + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs", + "description": "The creation time of the agent in unix seconds" + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo", + "description": "The access information of the agent" + }, + "last_call_time_unix_secs": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Last Call Time Unix Secs", + "description": "The time of the most recent call in unix seconds, null if no calls have been made" + }, + "archived": { + "type": "boolean", + "title": "Archived", + "description": "Whether the agent is archived", + "default": false + } + }, + "type": "object", + "required": [ + "agent_id", + "name", + "tags", + "created_at_unix_secs", + "access_info" + ], + "title": "AgentSummaryResponseModel", + "example": { + "access_info": { + "creator_email": "john@example.com", + "creator_name": "John Doe", + "is_creator": true, + "role": "admin" + }, + "agent_id": "J3Pbu5gP6NNKBscdCdwB", + "archived": false, + "created_at_unix_secs": 1716153600, + "last_call_time_unix_secs": 1716240000, + "name": "My Agent", + "tags": [ + "Customer Support", + "Technical Help", + "Eleven" + ] + } + }, + "AgentTestEntityType": { + "type": "string", + "enum": [ + "test", + "folder" + ], + "title": "AgentTestEntityType", + "default": "test" + }, + "AgentTestFolderPathSegmentResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name", + "default": "" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "AgentTestFolderPathSegmentResponseModel" + }, + "AgentTestingSettings": { + "properties": { + "attached_tests": { + "items": { + "$ref": "#/components/schemas/AttachedTestModel" + }, + "type": "array", + "maxItems": 1000, + "minItems": 0, + "title": "Attached Tests", + "description": "List of test IDs that should be run for this agent" + } + }, + "type": "object", + "title": "AgentTestingSettings", + "description": "Settings for agent testing configuration.", + "example": { + "attached_tests": [ + { + "environment": "staging", + "test_id": "test_123", + "workflow_node_id": "node_abc" + }, + { + "test_id": "test_456" + } + ], + "referenced_tests_ids": [ + "test_123", + "test_456" + ] + } + }, + "AgentTopicResponseModel": { + "properties": { + "topic_id": { + "type": "string", + "title": "Topic Id" + }, + "label": { + "type": "string", + "title": "Label" + }, + "description": { + "type": "string", + "title": "Description" + }, + "conversation_count": { + "type": "integer", + "title": "Conversation Count" + }, + "parent_topic_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Topic Id" + }, + "x_2d": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "X 2D" + }, + "y_2d": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Y 2D" + } + }, + "type": "object", + "required": [ + "topic_id", + "label", + "description", + "conversation_count" + ], + "title": "AgentTopicResponseModel" + }, + "AgentTransfer": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "condition": { + "type": "string", + "title": "Condition" + }, + "delay_ms": { + "type": "integer", + "title": "Delay Ms", + "default": 0 + }, + "transfer_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Transfer Message" + }, + "enable_transferred_agent_first_message": { + "type": "boolean", + "title": "Enable Transferred Agent First Message", + "default": false + }, + "is_workflow_node_transfer": { + "type": "boolean", + "title": "Is Workflow Node Transfer", + "default": false + } + }, + "type": "object", + "required": [ + "agent_id", + "condition" + ], + "title": "AgentTransfer" + }, + "AgentTrustContext": { + "type": "string", + "enum": [ + "unknown", + "low", + "high" + ], + "title": "AgentTrustContext", + "description": "The trust context in which the agent operates.\n\nUNKNOWN: not yet classified (existing agents created before this feature).\nLOW: serves untrusted external participants (e.g. customer support, sales) —\n outputs should be vetted and tool access scoped.\nHIGH: serves the owner (e.g. personal assistant) — full tool access is appropriate.", + "default": "unknown" + }, + "AgentVersionMetadata": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "branch_id": { + "type": "string", + "title": "Branch Id" + }, + "version_description": { + "type": "string", + "title": "Version Description" + }, + "seq_no_in_branch": { + "type": "integer", + "title": "Seq No In Branch" + }, + "time_committed_secs": { + "type": "integer", + "title": "Time Committed Secs" + }, + "parents": { + "$ref": "#/components/schemas/AgentVersionParents" + }, + "access_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "id", + "agent_id", + "branch_id", + "version_description", + "seq_no_in_branch", + "time_committed_secs", + "parents" + ], + "title": "AgentVersionMetadata" + }, + "AgentVersionParents": { + "properties": { + "in_branch_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "In Branch Parent Id" + }, + "out_of_branch_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Out Of Branch Parent Id" + }, + "merged_into_branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Merged Into Branch Id" + }, + "merged_from_branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Merged From Branch Id" + }, + "merged_from_version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Merged From Version Id" + } + }, + "type": "object", + "title": "AgentVersionParents" + }, + "AgentWorkflowRequestModel": { + "properties": { + "edges": { + "additionalProperties": { + "$ref": "#/components/schemas/WorkflowEdgeModel-Input" + }, + "type": "object", + "title": "Edges" + }, + "nodes": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowStartNodeModel-Input", + "description": "Entry point of the workflow." + }, + { + "$ref": "#/components/schemas/WorkflowEndNodeModel-Input", + "description": "Terminates the conversation upon reaching this node." + }, + { + "$ref": "#/components/schemas/WorkflowPhoneNumberNodeModel-Input", + "description": "Transfers the conversation to a phone number." + }, + { + "$ref": "#/components/schemas/WorkflowOverrideAgentNodeModel-Input", + "description": "A subagent conducting the conversation until one of the exit conditions is met. Each subagent can override the base settings, changing the prompt, knowledge base, and more." + }, + { + "$ref": "#/components/schemas/WorkflowStandaloneAgentNodeModel-Input", + "description": "Transfer the conversation to a standalone agent." + }, + { + "$ref": "#/components/schemas/WorkflowToolNodeModel-Input", + "description": "Executes one or more tools in parallel." + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "end": "#/components/schemas/WorkflowEndNodeModel-Input", + "override_agent": "#/components/schemas/WorkflowOverrideAgentNodeModel-Input", + "phone_number": "#/components/schemas/WorkflowPhoneNumberNodeModel-Input", + "standalone_agent": "#/components/schemas/WorkflowStandaloneAgentNodeModel-Input", + "start": "#/components/schemas/WorkflowStartNodeModel-Input", + "tool": "#/components/schemas/WorkflowToolNodeModel-Input" + } + } + }, + "type": "object", + "minProperties": 1, + "title": "Nodes" + }, + "prevent_subagent_loops": { + "type": "boolean", + "title": "Prevent Subagent Loops", + "description": "Whether to prevent loops in the workflow execution.", + "default": false + } + }, + "type": "object", + "title": "AgentWorkflowRequestModel", + "example": { + "edges": { + "entry_to_tool_a": { + "forward_condition": { + "condition": "Tool A condition" + }, + "source": "entry_node", + "target": "tool_node_a" + }, + "start_to_entry": { + "forward_condition": {}, + "source": "start_node", + "target": "entry_node" + }, + "tool_a_to_failure": { + "forward_condition": { + "successful": false + }, + "source": "tool_node_a", + "target": "failure_node" + }, + "tool_a_to_tool_b": { + "forward_condition": { + "successful": true + }, + "source": "tool_node_a", + "target": "tool_node_b" + }, + "tool_b_to_agent_transfer": { + "forward_condition": {}, + "source": "tool_node_b", + "target": "success_transfer" + }, + "tool_b_to_conversation": { + "forward_condition": { + "condition": "Conversation condition" + }, + "source": "tool_node_b", + "target": "success_conversation" + }, + "tool_b_to_end": { + "forward_condition": { + "condition": "End condition" + }, + "source": "tool_node_b", + "target": "success_end" + }, + "tool_b_to_phone": { + "forward_condition": { + "expression": { + "children": [ + { + "name": "force_phone_transfer" + }, + { + "prompt": "Phone condition", + "value_schema": { + "description": "Phone condition", + "type": "boolean" + } + }, + { + "left": { + "name": "mode" + }, + "right": { + "value": "dev" + } + } + ] + } + }, + "source": "tool_node_b", + "target": "success_phone" + } + }, + "nodes": { + "entry_node": { + "conversation_config": {}, + "edge_order": [ + "entry_to_tool_a" + ], + "label": "Entry" + }, + "failure_node": { + "conversation_config": {}, + "label": "Failure" + }, + "start_node": { + "edge_order": [ + "start_to_entry" + ] + }, + "success_conversation": { + "conversation_config": {}, + "label": "Success A" + }, + "success_end": {}, + "success_phone": { + "transfer_destination": { + "phone_number": "+1234567890" + } + }, + "success_transfer": { + "agent_id": "success_transfer_agent" + }, + "tool_node_a": { + "edge_order": [ + "tool_a_to_failure", + "tool_a_to_tool_b" + ], + "tools": [ + { + "tool_id": "tool_a" + }, + { + "tool_id": "tool_b" + } + ] + }, + "tool_node_b": { + "edge_order": [ + "tool_b_to_conversation", + "tool_b_to_end", + "tool_b_to_phone", + "tool_b_to_agent_transfer" + ], + "tools": [ + { + "tool_id": "tool_a" + } + ] + } + } + } + }, + "AgentWorkflowResponseModel": { + "properties": { + "edges": { + "additionalProperties": { + "$ref": "#/components/schemas/WorkflowEdgeModel-Output" + }, + "type": "object", + "title": "Edges" + }, + "nodes": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowStartNodeModel-Output", + "description": "Entry point of the workflow." + }, + { + "$ref": "#/components/schemas/WorkflowEndNodeModel-Output", + "description": "Terminates the conversation upon reaching this node." + }, + { + "$ref": "#/components/schemas/WorkflowPhoneNumberNodeModel-Output", + "description": "Transfers the conversation to a phone number." + }, + { + "$ref": "#/components/schemas/WorkflowOverrideAgentNodeModel-Output", + "description": "A subagent conducting the conversation until one of the exit conditions is met. Each subagent can override the base settings, changing the prompt, knowledge base, and more." + }, + { + "$ref": "#/components/schemas/WorkflowStandaloneAgentNodeModel-Output", + "description": "Transfer the conversation to a standalone agent." + }, + { + "$ref": "#/components/schemas/WorkflowToolNodeModel-Output", + "description": "Executes one or more tools in parallel." + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "end": "#/components/schemas/WorkflowEndNodeModel-Output", + "override_agent": "#/components/schemas/WorkflowOverrideAgentNodeModel-Output", + "phone_number": "#/components/schemas/WorkflowPhoneNumberNodeModel-Output", + "standalone_agent": "#/components/schemas/WorkflowStandaloneAgentNodeModel-Output", + "start": "#/components/schemas/WorkflowStartNodeModel-Output", + "tool": "#/components/schemas/WorkflowToolNodeModel-Output" + } + } + }, + "type": "object", + "minProperties": 1, + "title": "Nodes" + }, + "prevent_subagent_loops": { + "type": "boolean", + "title": "Prevent Subagent Loops", + "description": "Whether to prevent loops in the workflow execution.", + "default": false + } + }, + "type": "object", + "required": [ + "edges", + "nodes", + "prevent_subagent_loops" + ], + "title": "AgentWorkflowResponseModel", + "example": { + "edges": { + "entry_to_tool_a": { + "forward_condition": { + "condition": "Tool A condition", + "type": "llm" + }, + "source": "entry_node", + "target": "tool_node_a" + }, + "start_to_entry": { + "forward_condition": { + "type": "unconditional" + }, + "source": "start_node", + "target": "entry_node" + }, + "tool_a_to_failure": { + "forward_condition": { + "successful": false, + "type": "result" + }, + "source": "tool_node_a", + "target": "failure_node" + }, + "tool_a_to_tool_b": { + "forward_condition": { + "successful": true, + "type": "result" + }, + "source": "tool_node_a", + "target": "tool_node_b" + }, + "tool_b_to_agent_transfer": { + "forward_condition": { + "type": "unconditional" + }, + "source": "tool_node_b", + "target": "success_transfer" + }, + "tool_b_to_conversation": { + "forward_condition": { + "condition": "Conversation condition", + "type": "llm" + }, + "source": "tool_node_b", + "target": "success_conversation" + }, + "tool_b_to_end": { + "forward_condition": { + "condition": "End condition", + "type": "llm" + }, + "source": "tool_node_b", + "target": "success_end" + }, + "tool_b_to_phone": { + "forward_condition": { + "expression": { + "children": [ + { + "name": "force_phone_transfer", + "type": "dynamic_variable" + }, + { + "prompt": "Phone condition", + "type": "llm", + "value_schema": { + "description": "Phone condition", + "type": "boolean" + } + }, + { + "left": { + "name": "mode", + "type": "dynamic_variable" + }, + "right": { + "type": "string_literal", + "value": "dev" + }, + "type": "eq_operator" + } + ], + "type": "or_operator" + }, + "type": "expression" + }, + "source": "tool_node_b", + "target": "success_phone" + } + }, + "nodes": { + "entry_node": { + "additional_knowledge_base": [], + "additional_prompt": "", + "additional_tool_ids": [], + "auto_advance_after_first_response": false, + "conversation_config": {}, + "edge_order": [ + "entry_to_tool_a" + ], + "label": "Entry", + "position": { + "x": 0, + "y": 0 + }, + "type": "override_agent" + }, + "failure_node": { + "additional_knowledge_base": [], + "additional_prompt": "", + "additional_tool_ids": [], + "auto_advance_after_first_response": false, + "conversation_config": {}, + "edge_order": [], + "label": "Failure", + "position": { + "x": 0, + "y": 0 + }, + "type": "override_agent" + }, + "start_node": { + "edge_order": [ + "start_to_entry" + ], + "position": { + "x": 0, + "y": 0 + }, + "type": "start" + }, + "success_conversation": { + "additional_knowledge_base": [], + "additional_prompt": "", + "additional_tool_ids": [], + "auto_advance_after_first_response": false, + "conversation_config": {}, + "edge_order": [], + "label": "Success A", + "position": { + "x": 0, + "y": 0 + }, + "type": "override_agent" + }, + "success_end": { + "edge_order": [], + "position": { + "x": 0, + "y": 0 + }, + "type": "end" + }, + "success_phone": { + "custom_sip_headers": [], + "edge_order": [], + "position": { + "x": 0, + "y": 0 + }, + "transfer_destination": { + "phone_number": "+1234567890", + "type": "phone" + }, + "transfer_type": "conference", + "type": "phone_number" + }, + "success_transfer": { + "agent_id": "success_transfer_agent", + "delay_ms": 0, + "edge_order": [], + "enable_transferred_agent_first_message": false, + "position": { + "x": 0, + "y": 0 + }, + "type": "standalone_agent" + }, + "tool_node_a": { + "edge_order": [ + "tool_a_to_failure", + "tool_a_to_tool_b" + ], + "position": { + "x": 0, + "y": 0 + }, + "tools": [ + { + "tool_id": "tool_a" + }, + { + "tool_id": "tool_b" + } + ], + "type": "tool" + }, + "tool_node_b": { + "edge_order": [ + "tool_b_to_conversation", + "tool_b_to_end", + "tool_b_to_phone", + "tool_b_to_agent_transfer" + ], + "position": { + "x": 0, + "y": 0 + }, + "tools": [ + { + "tool_id": "tool_a" + } + ], + "type": "tool" + } + }, + "prevent_subagent_loops": false + } + }, + "AgentWorkspaceOverrides-Input": { + "properties": { + "conversation_initiation_client_data_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataWebhook" + }, + { + "type": "null" + } + ], + "description": "The webhook to send conversation initiation client data to" + }, + "webhooks": { + "$ref": "#/components/schemas/ConvAIWebhooks" + } + }, + "type": "object", + "title": "AgentWorkspaceOverrides" + }, + "AgentWorkspaceOverrides-Output": { + "properties": { + "conversation_initiation_client_data_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataWebhook" + }, + { + "type": "null" + } + ], + "description": "The webhook to send conversation initiation client data to" + }, + "webhooks": { + "$ref": "#/components/schemas/ConvAIWebhooks" + } + }, + "type": "object", + "title": "AgentWorkspaceOverrides" + }, + "AllowedOutputFormats": { + "type": "string", + "enum": [ + "mp3_22050_32", + "mp3_24000_48", + "mp3_44100_32", + "mp3_44100_64", + "mp3_44100_96", + "mp3_44100_128", + "mp3_44100_192", + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_32000", + "pcm_44100", + "pcm_48000", + "ulaw_8000", + "alaw_8000", + "opus_48000_32", + "opus_48000_64", + "opus_48000_96", + "opus_48000_128", + "opus_48000_192" + ] + }, + "AllowlistItem": { + "properties": { + "hostname": { + "type": "string", + "title": "Hostname", + "description": "The hostname of the allowed origin" + } + }, + "type": "object", + "required": [ + "hostname" + ], + "title": "AllowlistItem" + }, + "AnalysisProperty": { + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "integer", + "number" + ], + "title": "Type" + }, + "description": { + "type": "string", + "title": "Description", + "description": "The description of the property. When set, the LLM will provide the value based on this description. Mutually exclusive with dynamic_variable, is_system_provided, and constant_value.", + "default": "" + }, + "enum": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Enum", + "description": "List of allowed string values for string type parameters" + }, + "is_system_provided": { + "type": "boolean", + "title": "Is System Provided", + "description": "If true, the value will be populated by the system at runtime. Used by API Integration Webhook tools for templating. Mutually exclusive with description, dynamic_variable, and constant_value.", + "default": false + }, + "dynamic_variable": { + "type": "string", + "title": "Dynamic Variable", + "description": "The name of the dynamic variable to use for this property's value. Mutually exclusive with description, is_system_provided, and constant_value.", + "default": "" + }, + "constant_value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "title": "Constant Value", + "description": "A constant value to use for this property. Mutually exclusive with description, dynamic_variable, and is_system_provided.", + "default": "" + }, + "llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "LLM model to use for this analysis item. If not set, uses agent's analysis_llm default." + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "AnalysisProperty", + "description": "Data collection property with optional per-item LLM override for post-call analysis.\n\nTODO: migrate to composition (value_schema: LiteralJsonSchemaProperty + llm) instead of\ninheritance, so this generalizes cleanly to object/array schemas in the future.", + "example": { + "constant_value": "", + "description": "My property", + "dynamic_variable": "", + "is_system_provided": false, + "type": "string" + } + }, + "AnalysisScope": { + "type": "string", + "enum": [ + "conversation", + "agent" + ], + "title": "AnalysisScope", + "default": "conversation" + }, + "ApiIntegrationOAuth2AuthCodeResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "api_integration_oauth2_auth_code", + "title": "Auth Type", + "default": "api_integration_oauth2_auth_code" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "token_url": { + "type": "string", + "title": "Token Url" + }, + "scopes": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Scopes" + }, + "scope_separator": { + "type": "string", + "enum": [ + " ", + "," + ], + "title": "Scope Separator", + "description": "Separator for scopes", + "default": " " + }, + "expires_at": { + "type": "string", + "title": "Expires At", + "description": "ISO 8601 timestamp of when the access token expires" + }, + "integration_id": { + "type": "string", + "title": "Integration Id" + }, + "credential_id": { + "type": "string", + "title": "Credential Id" + }, + "status": { + "$ref": "#/components/schemas/OAuthConnectionStatus", + "description": "Current health status of the OAuth connection", + "default": "active" + }, + "status_detail": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status Detail", + "description": "Human-readable detail about the current status, e.g. the error message on refresh failure" + }, + "status_updated_at": { + "type": "string", + "title": "Status Updated At", + "description": "ISO 8601 timestamp of the last status change" + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "name", + "provider", + "token_url", + "expires_at", + "integration_id", + "credential_id", + "id" + ], + "title": "ApiIntegrationOAuth2AuthCodeResponse", + "description": "Response model for integration-managed OAuth2 Auth Code auth connections" + }, + "ApiIntegrationOAuth2CustomAppResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "api_integration_oauth2_custom_app", + "title": "Auth Type", + "default": "api_integration_oauth2_custom_app" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "token_url": { + "type": "string", + "title": "Token Url" + }, + "scopes": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Scopes" + }, + "scope_separator": { + "type": "string", + "enum": [ + " ", + "," + ], + "title": "Scope Separator", + "description": "Separator for scopes", + "default": " " + }, + "expires_at": { + "type": "string", + "title": "Expires At", + "description": "ISO 8601 timestamp of when the access token expires" + }, + "integration_id": { + "type": "string", + "title": "Integration Id" + }, + "credential_id": { + "type": "string", + "title": "Credential Id" + }, + "status": { + "$ref": "#/components/schemas/OAuthConnectionStatus", + "description": "Current health status of the OAuth connection", + "default": "active" + }, + "status_detail": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status Detail", + "description": "Human-readable detail about the current status, e.g. the error message on refresh failure" + }, + "status_updated_at": { + "type": "string", + "title": "Status Updated At", + "description": "ISO 8601 timestamp of the last status change" + }, + "client_id": { + "type": "string", + "title": "Client Id", + "description": "OAuth client ID (rendered from template if credential uses templated credentials, None for legacy connections)" + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "name", + "provider", + "token_url", + "expires_at", + "integration_id", + "credential_id", + "client_id", + "id" + ], + "title": "ApiIntegrationOAuth2CustomAppResponse", + "description": "Response model for user-owned OAuth2 Custom App auth connections" + }, + "ApiIntegrationWebhookOverrides": { + "properties": { + "schema_overrides": { + "anyOf": [ + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConstantSchemaOverride" + }, + { + "$ref": "#/components/schemas/DynamicVariableSchemaOverride" + }, + { + "$ref": "#/components/schemas/LLMSchemaOverride" + } + ], + "discriminator": { + "propertyName": "source", + "mapping": { + "constant": "#/components/schemas/ConstantSchemaOverride", + "dynamic_variable": "#/components/schemas/DynamicVariableSchemaOverride", + "llm": "#/components/schemas/LLMSchemaOverride" + } + } + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Schema Overrides" + }, + "request_headers": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAIDynamicVariable" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Request Headers" + }, + "response_filter_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResponseFilterMode" + }, + { + "type": "null" + } + ] + }, + "response_filters": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Response Filters" + } + }, + "type": "object", + "title": "ApiIntegrationWebhookOverrides", + "description": "A whitelist of fields that can be overridden by users when\nconfiguring an API Integration Webhook Tool." + }, + "ApiIntegrationWebhookToolConfig-Input": { + "properties": { + "type": { + "type": "string", + "const": "api_integration_webhook", + "title": "Type", + "default": "api_integration_webhook" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does." + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 120, + "minimum": 5, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive).", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "dynamic_variables": { + "$ref": "#/components/schemas/DynamicVariablesConfig-Input", + "description": "Configuration for dynamic variables" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + }, + "tool_version": { + "type": "string", + "title": "Tool Version", + "description": "The version of the API integration tool", + "default": "1.0.0" + }, + "api_integration_id": { + "type": "string", + "title": "Api Integration Id" + }, + "api_integration_connection_id": { + "type": "string", + "title": "Api Integration Connection Id" + }, + "api_schema_overrides": { + "anyOf": [ + { + "$ref": "#/components/schemas/ApiIntegrationWebhookOverrides" + }, + { + "type": "null" + } + ], + "description": "User overrides applied on top of the base api_schema" + } + }, + "type": "object", + "required": [ + "name", + "description", + "api_integration_id", + "api_integration_connection_id" + ], + "title": "ApiIntegrationWebhookToolConfig" + }, + "ApiIntegrationWebhookToolConfig-Output": { + "properties": { + "type": { + "type": "string", + "const": "api_integration_webhook", + "title": "Type", + "default": "api_integration_webhook" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does." + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 120, + "minimum": 5, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive).", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "dynamic_variables": { + "$ref": "#/components/schemas/DynamicVariablesConfig-Output", + "description": "Configuration for dynamic variables" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + }, + "tool_version": { + "type": "string", + "title": "Tool Version", + "description": "The version of the API integration tool", + "default": "1.0.0" + }, + "api_integration_id": { + "type": "string", + "title": "Api Integration Id" + }, + "api_integration_connection_id": { + "type": "string", + "title": "Api Integration Connection Id" + }, + "api_schema_overrides": { + "anyOf": [ + { + "$ref": "#/components/schemas/ApiIntegrationWebhookOverrides" + }, + { + "type": "null" + } + ], + "description": "User overrides applied on top of the base api_schema" + } + }, + "type": "object", + "required": [ + "type", + "name", + "description", + "response_timeout_secs", + "disable_interruptions", + "force_pre_tool_speech", + "pre_tool_speech", + "assignments", + "tool_call_sound", + "tool_call_sound_behavior", + "tool_error_handling_mode", + "dynamic_variables", + "execution_mode", + "tool_version", + "api_integration_id", + "api_integration_connection_id", + "api_schema_overrides" + ], + "title": "ApiIntegrationWebhookToolConfig" + }, + "ArrayJsonSchemaProperty-Input": { + "properties": { + "type": { + "type": "string", + "const": "array", + "title": "Type", + "default": "array" + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + }, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/LiteralJsonSchemaProperty" + }, + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Input" + }, + { + "$ref": "#/components/schemas/ArrayJsonSchemaProperty-Input" + } + ], + "title": "Items", + "description": "Schema for array elements.", + "default": { + "type": "string", + "description": "Array element", + "is_system_provided": false, + "dynamic_variable": "", + "constant_value": "" + } + }, + "dynamic_variable": { + "type": "string", + "title": "Dynamic Variable", + "description": "When set, the entire array is populated from this dynamic variable at runtime. Mutually exclusive with description (LLM-provided array) and constant_value.", + "default": "" + }, + "constant_value": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Constant Value", + "description": "When set, the entire array uses this constant value at runtime. Mutually exclusive with description (LLM-provided array) and dynamic_variable." + } + }, + "additionalProperties": false, + "type": "object", + "title": "ArrayJsonSchemaProperty" + }, + "ArrayJsonSchemaProperty-Output": { + "properties": { + "type": { + "type": "string", + "const": "array", + "title": "Type", + "default": "array" + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + }, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/LiteralJsonSchemaProperty" + }, + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Output" + }, + { + "$ref": "#/components/schemas/ArrayJsonSchemaProperty-Output" + } + ], + "title": "Items", + "description": "Schema for array elements.", + "default": { + "type": "string", + "description": "Array element", + "is_system_provided": false, + "dynamic_variable": "", + "constant_value": "" + } + }, + "dynamic_variable": { + "type": "string", + "title": "Dynamic Variable", + "description": "When set, the entire array is populated from this dynamic variable at runtime. Mutually exclusive with description (LLM-provided array) and constant_value.", + "default": "" + }, + "constant_value": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Constant Value", + "description": "When set, the entire array uses this constant value at runtime. Mutually exclusive with description (LLM-provided array) and dynamic_variable." + } + }, + "additionalProperties": false, + "type": "object", + "title": "ArrayJsonSchemaProperty" + }, + "AssetTranscription": { + "properties": { + "status": { + "type": "string", + "enum": [ + "processing", + "completed", + "failed" + ], + "title": "Status" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/AssetTranscriptionData" + }, + { + "type": "null" + } + ] + }, + "updated_at_ms": { + "type": "integer", + "title": "Updated At Ms" + } + }, + "type": "object", + "required": [ + "status", + "data" + ], + "title": "AssetTranscription" + }, + "AssetTranscriptionData": { + "properties": { + "language_code": { + "type": "string", + "title": "Language Code" + }, + "text": { + "type": "string", + "title": "Text" + }, + "words": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Words" + }, + "word_start_times_ms": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Word Start Times Ms" + }, + "word_end_times_ms": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Word End Times Ms" + }, + "word_speaker_ids": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "array", + "title": "Word Speaker Ids" + } + }, + "type": "object", + "required": [ + "language_code", + "text", + "words", + "word_start_times_ms", + "word_end_times_ms", + "word_speaker_ids" + ], + "title": "AssetTranscriptionData" + }, + "AssignConversationTagsRequestModel": { + "properties": { + "tag_ids": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 50, + "minItems": 1, + "title": "Tag Ids", + "description": "Tag IDs to add to the conversation. Re-assigning an existing tag is a no-op." + } + }, + "type": "object", + "required": [ + "tag_ids" + ], + "title": "AssignConversationTagsRequestModel" + }, + "AsyncConversationMetadata": { + "properties": { + "delivery_status": { + "type": "string", + "enum": [ + "pending", + "success", + "failed" + ], + "title": "Delivery Status" + }, + "delivery_timestamp": { + "type": "integer", + "title": "Delivery Timestamp" + }, + "delivery_error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Delivery Error" + }, + "external_system": { + "type": "string", + "title": "External System" + }, + "external_id": { + "type": "string", + "title": "External Id" + }, + "external_link": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "External Link" + }, + "retry_count": { + "type": "integer", + "title": "Retry Count", + "default": 0 + }, + "last_retry_timestamp": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Last Retry Timestamp" + }, + "last_processed_external_message_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Processed External Message Id" + } + }, + "type": "object", + "required": [ + "delivery_status", + "delivery_timestamp", + "external_system", + "external_id" + ], + "title": "AsyncConversationMetadata", + "description": "Metadata for async conversation delivery (Zendesk, Slack, etc.)." + }, + "AttachedTestModel": { + "properties": { + "test_id": { + "type": "string", + "title": "Test Id" + }, + "workflow_node_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workflow Node Id" + } + }, + "type": "object", + "required": [ + "test_id" + ], + "title": "AttachedTestModel" + }, + "AudioAnalysis": { + "properties": { + "status": { + "type": "string", + "enum": [ + "processing", + "completed", + "failed" + ], + "title": "Status" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/AudioAnalysisResult" + }, + { + "type": "null" + } + ] + }, + "updated_at_ms": { + "type": "integer", + "title": "Updated At Ms" + } + }, + "type": "object", + "required": [ + "status", + "data" + ], + "title": "AudioAnalysis" + }, + "AudioAnalysisResult": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "description": { + "type": "string", + "title": "Description" + }, + "content_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type" + }, + "overall_pacing": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Overall Pacing" + }, + "segments": { + "items": { + "$ref": "#/components/schemas/AudioSegment" + }, + "type": "array", + "title": "Segments" + }, + "key_moments": { + "items": { + "$ref": "#/components/schemas/AudioKeyMoment" + }, + "type": "array", + "title": "Key Moments" + } + }, + "type": "object", + "required": [ + "title", + "description" + ], + "title": "AudioAnalysisResult" + }, + "AudioIsolationHistoryItemResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "created_at_unix": { + "type": "integer", + "title": "Created At Unix" + }, + "format": { + "type": "string", + "title": "Format" + }, + "duration_seconds": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Duration Seconds" + }, + "download_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Download Url" + }, + "icon_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Icon Url" + }, + "source_video_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Video Url" + }, + "supports_video": { + "type": "boolean", + "title": "Supports Video" + }, + "processing": { + "type": "boolean", + "title": "Processing" + }, + "video_processing_failed": { + "type": "boolean", + "title": "Video Processing Failed" + }, + "preview_b64": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Preview B64" + } + }, + "type": "object", + "required": [ + "id", + "title", + "created_at_unix", + "format", + "duration_seconds", + "download_url", + "icon_url", + "source_video_url", + "supports_video", + "processing", + "video_processing_failed", + "preview_b64" + ], + "title": "AudioIsolationHistoryItemResponseModel" + }, + "AudioKeyMoment": { + "properties": { + "timestamp_ms": { + "type": "integer", + "title": "Timestamp Ms" + }, + "type": { + "type": "string", + "title": "Type" + }, + "description": { + "type": "string", + "title": "Description" + } + }, + "type": "object", + "required": [ + "timestamp_ms", + "type", + "description" + ], + "title": "AudioKeyMoment" + }, + "AudioNativeCreateProjectResponseModel": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the created Audio Native project." + }, + "converting": { + "type": "boolean", + "title": "Converting", + "description": "Whether the project is currently being converted." + }, + "html_snippet": { + "type": "string", + "title": "Html Snippet", + "description": "The HTML snippet to embed the Audio Native player." + } + }, + "type": "object", + "required": [ + "project_id", + "converting", + "html_snippet" + ], + "title": "AudioNativeCreateProjectResponseModel", + "example": { + "converting": false, + "html_snippet": "
", + "project_id": "JBFqnCBsd6RMkjVDRZzb" + } + }, + "AudioNativeEditContentResponseModel": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the project." + }, + "converting": { + "type": "boolean", + "title": "Converting", + "description": "Whether the project is currently being converted." + }, + "publishing": { + "type": "boolean", + "title": "Publishing", + "description": "Whether the project is currently being published." + }, + "html_snippet": { + "type": "string", + "title": "Html Snippet", + "description": "The HTML snippet to embed the Audio Native player." + } + }, + "type": "object", + "required": [ + "project_id", + "converting", + "publishing", + "html_snippet" + ], + "title": "AudioNativeEditContentResponseModel", + "example": { + "converting": false, + "html_snippet": "
", + "project_id": "JBFqnCBsd6RMkjVDRZzb", + "publishing": false + } + }, + "AudioNativeProjectSettingsResponseModel": { + "properties": { + "title": { + "type": "string", + "title": "Title", + "description": "The title of the project." + }, + "image": { + "type": "string", + "title": "Image", + "description": "The image of the project." + }, + "author": { + "type": "string", + "title": "Author", + "description": "The author of the project." + }, + "small": { + "type": "boolean", + "title": "Small", + "description": "Whether the project is small." + }, + "text_color": { + "type": "string", + "title": "Text Color", + "description": "The text color of the project." + }, + "background_color": { + "type": "string", + "title": "Background Color", + "description": "The background color of the project." + }, + "sessionization": { + "type": "integer", + "title": "Sessionization", + "description": "The sessionization of the project. Specifies for how many minutes to persist the session across page reloads." + }, + "audio_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Audio Path", + "description": "The path of the audio file." + }, + "audio_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Audio Url", + "description": "The URL of the audio file." + }, + "status": { + "type": "string", + "enum": [ + "processing", + "ready" + ], + "title": "Status", + "description": "Current state of the project", + "default": "ready" + } + }, + "type": "object", + "required": [ + "title", + "image", + "author", + "small", + "text_color", + "background_color", + "sessionization" + ], + "title": "AudioNativeProjectSettingsResponseModel", + "example": { + "audio_path": "audio/my_project.mp3", + "audio_url": "https://example.com/audio/my_project.mp3", + "author": "John Doe", + "background_color": "#FFFFFF", + "image": "https://example.com/image.jpg", + "sessionization": 1, + "small": false, + "status": "ready", + "text_color": "#000000", + "title": "My Project" + } + }, + "AudioSegment": { + "properties": { + "start_ms": { + "type": "integer", + "title": "Start Ms" + }, + "end_ms": { + "type": "integer", + "title": "End Ms" + }, + "description": { + "type": "string", + "title": "Description" + }, + "segment_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Segment Type" + }, + "has_speech": { + "type": "boolean", + "title": "Has Speech", + "default": false + }, + "has_music": { + "type": "boolean", + "title": "Has Music", + "default": false + }, + "pacing": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Pacing" + } + }, + "type": "object", + "required": [ + "start_ms", + "end_ms", + "description" + ], + "title": "AudioSegment" + }, + "AudioWithTimestampsAndVoiceSegmentsResponseModel": { + "properties": { + "audio_base64": { + "type": "string", + "title": "Audio Base64", + "description": "Base64 encoded audio data" + }, + "alignment": { + "anyOf": [ + { + "$ref": "#/components/schemas/CharacterAlignmentResponseModel" + }, + { + "type": "null" + } + ], + "description": "Timestamp information for each character in the original text" + }, + "normalized_alignment": { + "anyOf": [ + { + "$ref": "#/components/schemas/CharacterAlignmentResponseModel" + }, + { + "type": "null" + } + ], + "description": "Timestamp information for each character in the normalized text" + }, + "voice_segments": { + "items": { + "$ref": "#/components/schemas/VoiceSegment" + }, + "type": "array", + "title": "Voice Segments", + "description": "Voice segments for the audio" + } + }, + "type": "object", + "required": [ + "audio_base64", + "voice_segments" + ], + "title": "AudioWithTimestampsAndVoiceSegmentsResponseModel", + "example": { + "alignment": { + "character_end_times_seconds": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.6, + 0.7 + ], + "character_start_times_seconds": [ + 0, + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.6 + ], + "characters": [ + "H", + "e", + "l", + "l", + "o", + "H", + "i" + ] + }, + "audio_base64": "base64_encoded_audio_string", + "normalized_alignment": { + "character_end_times_seconds": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.6, + 0.7 + ], + "character_start_times_seconds": [ + 0, + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.6 + ], + "characters": [ + "H", + "e", + "l", + "l", + "o", + "H", + "i" + ] + }, + "voice_segments": [ + { + "character_end_index": 5, + "character_start_index": 0, + "dialogue_input_index": 0, + "end_time_seconds": 0.5, + "start_time_seconds": 0, + "voice_id": "21m00Tcm4TlvDq8ikWAM" + }, + { + "character_end_index": 7, + "character_start_index": 5, + "dialogue_input_index": 1, + "end_time_seconds": 0.7, + "start_time_seconds": 0.5, + "voice_id": "VEDscrYI8uIMttlO2Ztu" + } + ] + } + }, + "AudioWithTimestampsResponseModel": { + "properties": { + "audio_base64": { + "type": "string", + "title": "Audio Base64", + "description": "Base64 encoded audio data" + }, + "alignment": { + "anyOf": [ + { + "$ref": "#/components/schemas/CharacterAlignmentResponseModel" + }, + { + "type": "null" + } + ], + "description": "Timestamp information for each character in the original text" + }, + "normalized_alignment": { + "anyOf": [ + { + "$ref": "#/components/schemas/CharacterAlignmentResponseModel" + }, + { + "type": "null" + } + ], + "description": "Timestamp information for each character in the normalized text" + } + }, + "type": "object", + "required": [ + "audio_base64" + ], + "title": "AudioWithTimestampsResponseModel", + "example": { + "alignment": { + "character_end_times_seconds": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5 + ], + "character_start_times_seconds": [ + 0, + 0.1, + 0.2, + 0.3, + 0.4 + ], + "characters": [ + "H", + "e", + "l", + "l", + "o" + ] + }, + "audio_base64": "base64_encoded_audio_string", + "normalized_alignment": { + "character_end_times_seconds": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5 + ], + "character_start_times_seconds": [ + 0, + 0.1, + 0.2, + 0.3, + 0.4 + ], + "characters": [ + "H", + "e", + "l", + "l", + "o" + ] + } + } + }, + "AuthConnectionDependencies": { + "properties": { + "tools": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableToolIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownToolIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableToolIdentifier", + "unknown": "#/components/schemas/DependentUnknownToolIdentifier" + } + } + }, + "type": "array", + "title": "Tools", + "default": [] + }, + "mcp_servers": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableMCPServerIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownMCPServerIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableMCPServerIdentifier", + "unknown": "#/components/schemas/DependentUnknownMCPServerIdentifier" + } + } + }, + "type": "array", + "title": "Mcp Servers", + "default": [] + }, + "integration_connections": { + "items": { + "$ref": "#/components/schemas/DependentIntegrationConnectionIdentifier" + }, + "type": "array", + "title": "Integration Connections", + "default": [] + } + }, + "type": "object", + "title": "AuthConnectionDependencies", + "description": "Dependencies that use an auth connection" + }, + "AuthConnectionLocator": { + "properties": { + "auth_connection_id": { + "type": "string", + "title": "Auth Connection Id" + } + }, + "type": "object", + "required": [ + "auth_connection_id" + ], + "title": "AuthConnectionLocator", + "description": "Used to reference an auth connection from the workspace's auth connection store." + }, + "AuthSettings": { + "properties": { + "enable_auth": { + "type": "boolean", + "title": "Enable Auth", + "description": "If set to true, starting a conversation with an agent will require a signed token", + "default": false + }, + "allowlist": { + "items": { + "$ref": "#/components/schemas/AllowlistItem" + }, + "type": "array", + "title": "Allowlist", + "description": "A list of hosts that are allowed to start conversations with the agent" + }, + "require_origin_header": { + "type": "boolean", + "title": "Require Origin Header", + "description": "When enabled, connections with no origin header will be rejected. If the allowlist is empty, this option has no effect.", + "default": false + }, + "shareable_token": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Shareable Token", + "description": "A shareable token that can be used to start a conversation with the agent" + } + }, + "type": "object", + "title": "AuthSettings", + "example": { + "allowlist": [ + { + "hostname": "https://example.com" + } + ], + "enable_auth": true, + "require_origin_header": true, + "shareable_token": "1234567890" + } + }, + "AuthenticationActivityId": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 99 + ], + "title": "AuthenticationActivityId", + "description": "OCSF Activity IDs for Authentication [3002] events.\n\nSpec: https://schema.ocsf.io/1.6.0/classes/authentication" + }, + "AuthorizationMethod": { + "type": "string", + "enum": [ + "invalid", + "public", + "authorization_header", + "signed_url", + "shareable_link", + "livekit_token", + "livekit_token_website", + "genesys_api_key", + "whatsapp", + "sms" + ], + "title": "AuthorizationMethod", + "default": "public" + }, + "AutoSyncInfo": { + "properties": { + "minimum_frequency_days": { + "type": "integer", + "maximum": 180, + "minimum": 1, + "title": "Minimum Frequency Days", + "description": "Maximum number of days between automatic syncs", + "default": 7 + }, + "auto_remove": { + "type": "boolean", + "title": "Auto Remove", + "description": "Whether to remove the document if the URL becomes unavailable", + "default": false + }, + "consec_failures": { + "type": "integer", + "minimum": 0, + "title": "Consec Failures", + "description": "Number of consecutive sync failures", + "default": 0 + }, + "next_refresh_by": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Next Refresh By", + "description": "Unix timestamp for the next scheduled sync or None (in case of folders)" + } + }, + "type": "object", + "title": "AutoSyncInfo" + }, + "BackgroundMusicConfig": { + "properties": { + "source_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/BackgroundMusicSourceType" + }, + { + "type": "null" + } + ], + "description": "The type of background music source." + }, + "source_id": { + "anyOf": [ + { + "$ref": "#/components/schemas/BackgroundMusicPresetId" + }, + { + "type": "null" + } + ], + "description": "Identifier for the music source." + }, + "volume": { + "type": "number", + "maximum": 1, + "minimum": 0.01, + "title": "Volume", + "description": "Volume level for background music (0.01 to 1.0).", + "default": 0.6 + }, + "crossfade_loop": { + "type": "boolean", + "title": "Crossfade Loop", + "description": "Apply a crossfade at the loop boundary to avoid audible pops when the music loops.", + "default": false + } + }, + "type": "object", + "title": "BackgroundMusicConfig" + }, + "BackgroundMusicConfigWorkflowOverride": { + "properties": { + "source_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/BackgroundMusicSourceType" + }, + { + "type": "null" + } + ], + "description": "The type of background music source." + }, + "source_id": { + "anyOf": [ + { + "$ref": "#/components/schemas/BackgroundMusicPresetId" + }, + { + "type": "null" + } + ], + "description": "Identifier for the music source." + }, + "volume": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Volume", + "description": "Volume level for background music (0.01 to 1.0)." + }, + "crossfade_loop": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Crossfade Loop", + "description": "Apply a crossfade at the loop boundary to avoid audible pops when the music loops." + } + }, + "type": "object", + "title": "BackgroundMusicConfigWorkflowOverride" + }, + "BackgroundMusicPresetId": { + "type": "string", + "enum": [ + "office2", + "office1", + "restaurant", + "city", + "typing", + "elevator1", + "elevator2", + "elevator3", + "elevator4" + ], + "title": "BackgroundMusicPresetId", + "description": "Predefined background music preset identifiers." + }, + "BackgroundMusicSourceType": { + "type": "string", + "enum": [ + "preset" + ], + "title": "BackgroundMusicSourceType", + "description": "The type of background music source." + }, + "BackupLLMDefault": { + "properties": { + "preference": { + "type": "string", + "const": "default", + "title": "Preference", + "default": "default" + } + }, + "type": "object", + "title": "BackupLLMDefault" + }, + "BackupLLMDisabled": { + "properties": { + "preference": { + "type": "string", + "const": "disabled", + "title": "Preference", + "default": "disabled" + } + }, + "type": "object", + "title": "BackupLLMDisabled" + }, + "BackupLLMOverride": { + "properties": { + "preference": { + "type": "string", + "const": "override", + "title": "Preference", + "default": "override" + }, + "order": { + "items": { + "$ref": "#/components/schemas/LLM" + }, + "type": "array", + "title": "Order" + } + }, + "type": "object", + "required": [ + "order" + ], + "title": "BackupLLMOverride" + }, + "BaseTurnConfig": { + "properties": { + "turn_timeout": { + "type": "number", + "title": "Turn Timeout", + "description": "Maximum wait time for the user's reply before re-engaging the user", + "default": 7 + }, + "initial_wait_time": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Initial Wait Time", + "description": "How long the agent will wait for the user to start the conversation if the first message is empty. If not set, uses the regular turn_timeout." + }, + "silence_end_call_timeout": { + "type": "number", + "title": "Silence End Call Timeout", + "description": "Maximum wait time since the user last spoke before terminating the call", + "default": -1 + }, + "mode": { + "$ref": "#/components/schemas/TurnMode", + "description": "The mode of turn detection", + "default": "turn", + "x-fern-ignore": true + }, + "turn_eagerness": { + "$ref": "#/components/schemas/TurnEagerness", + "description": "Controls how eager the agent is to respond. Low = less eager (waits longer), Standard = default eagerness, High = more eager (responds sooner)", + "default": "normal" + }, + "spelling_patience": { + "$ref": "#/components/schemas/SpellingPatience", + "description": "Controls if the agent should be more patient when user is spelling numbers and named entities. Auto = model based, Off = never wait extra", + "default": "auto" + }, + "speculative_turn": { + "type": "boolean", + "title": "Speculative Turn", + "description": "When enabled, starts generating LLM responses during silence before full turn confidence is reached, reducing perceived latency. May increase LLM costs.", + "default": false + }, + "retranscribe_on_turn_timeout": { + "type": "boolean", + "title": "Retranscribe On Turn Timeout", + "description": "When enabled, if VAD detects no speech, attempts to re-transcribe accumulated audio at turn timeout. Disables silence discount billing for affected turns.", + "default": false + } + }, + "type": "object", + "title": "BaseTurnConfig", + "example": { + "interruption_ignore_terms": [], + "mode": "turn", + "retranscribe_on_turn_timeout": false, + "silence_end_call_timeout": -1, + "speculative_turn": false, + "spelling_patience": "auto", + "turn_eagerness": "normal", + "turn_timeout": 7 + } + }, + "BasicAuthResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "basic_auth", + "title": "Auth Type", + "default": "basic_auth" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "username": { + "type": "string", + "title": "Username" + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "name", + "provider", + "username", + "id" + ], + "title": "BasicAuthResponse", + "description": "Response model for basic auth" + }, + "BatchCallDetailedResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "phone_number_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Phone Number Id" + }, + "phone_provider": { + "anyOf": [ + { + "$ref": "#/components/schemas/TelephonyProvider" + }, + { + "type": "null" + } + ] + }, + "whatsapp_params": { + "anyOf": [ + { + "$ref": "#/components/schemas/BatchCallWhatsAppParams" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string", + "title": "Name" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + }, + "environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment" + }, + "created_at_unix": { + "type": "integer", + "title": "Created At Unix" + }, + "scheduled_time_unix": { + "type": "integer", + "title": "Scheduled Time Unix" + }, + "timezone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Timezone" + }, + "total_calls_dispatched": { + "type": "integer", + "title": "Total Calls Dispatched", + "default": 0 + }, + "total_calls_scheduled": { + "type": "integer", + "title": "Total Calls Scheduled", + "default": 0 + }, + "total_calls_finished": { + "type": "integer", + "title": "Total Calls Finished", + "default": 0 + }, + "last_updated_at_unix": { + "type": "integer", + "title": "Last Updated At Unix" + }, + "status": { + "$ref": "#/components/schemas/BatchCallStatus" + }, + "retry_count": { + "type": "integer", + "title": "Retry Count", + "default": 0 + }, + "telephony_call_config": { + "$ref": "#/components/schemas/TelephonyCallConfig" + }, + "target_concurrency_limit": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Target Concurrency Limit", + "description": "Maximum number of simultaneous calls for this batch. When set, dispatch is governed by this limit rather than workspace/agent capacity percentages." + }, + "agent_name": { + "type": "string", + "title": "Agent Name" + }, + "branch_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Name" + }, + "recipients": { + "items": { + "$ref": "#/components/schemas/OutboundCallRecipientResponseModel" + }, + "type": "array", + "title": "Recipients" + } + }, + "type": "object", + "required": [ + "id", + "phone_number_id", + "phone_provider", + "whatsapp_params", + "name", + "agent_id", + "branch_id", + "environment", + "created_at_unix", + "scheduled_time_unix", + "timezone", + "total_calls_dispatched", + "total_calls_scheduled", + "total_calls_finished", + "last_updated_at_unix", + "status", + "retry_count", + "telephony_call_config", + "target_concurrency_limit", + "agent_name", + "branch_name", + "recipients" + ], + "title": "BatchCallDetailedResponse", + "description": "Detailed response model for a batch call including all recipients." + }, + "BatchCallRecipientStatus": { + "type": "string", + "enum": [ + "pending", + "dispatched", + "initiated", + "in_progress", + "completed", + "failed", + "cancelled", + "voicemail" + ], + "title": "BatchCallRecipientStatus" + }, + "BatchCallResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "phone_number_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Phone Number Id" + }, + "phone_provider": { + "anyOf": [ + { + "$ref": "#/components/schemas/TelephonyProvider" + }, + { + "type": "null" + } + ] + }, + "whatsapp_params": { + "anyOf": [ + { + "$ref": "#/components/schemas/BatchCallWhatsAppParams" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string", + "title": "Name" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + }, + "environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment" + }, + "created_at_unix": { + "type": "integer", + "title": "Created At Unix" + }, + "scheduled_time_unix": { + "type": "integer", + "title": "Scheduled Time Unix" + }, + "timezone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Timezone" + }, + "total_calls_dispatched": { + "type": "integer", + "title": "Total Calls Dispatched", + "default": 0 + }, + "total_calls_scheduled": { + "type": "integer", + "title": "Total Calls Scheduled", + "default": 0 + }, + "total_calls_finished": { + "type": "integer", + "title": "Total Calls Finished", + "default": 0 + }, + "last_updated_at_unix": { + "type": "integer", + "title": "Last Updated At Unix" + }, + "status": { + "$ref": "#/components/schemas/BatchCallStatus" + }, + "retry_count": { + "type": "integer", + "title": "Retry Count", + "default": 0 + }, + "telephony_call_config": { + "$ref": "#/components/schemas/TelephonyCallConfig" + }, + "target_concurrency_limit": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Target Concurrency Limit", + "description": "Maximum number of simultaneous calls for this batch. When set, dispatch is governed by this limit rather than workspace/agent capacity percentages." + }, + "agent_name": { + "type": "string", + "title": "Agent Name" + }, + "branch_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Name" + } + }, + "type": "object", + "required": [ + "id", + "phone_number_id", + "phone_provider", + "whatsapp_params", + "name", + "agent_id", + "branch_id", + "environment", + "created_at_unix", + "scheduled_time_unix", + "timezone", + "total_calls_dispatched", + "total_calls_scheduled", + "total_calls_finished", + "last_updated_at_unix", + "status", + "retry_count", + "telephony_call_config", + "target_concurrency_limit", + "agent_name", + "branch_name" + ], + "title": "BatchCallResponse" + }, + "BatchCallStatus": { + "type": "string", + "enum": [ + "pending", + "in_progress", + "completed", + "failed", + "cancelled" + ], + "title": "BatchCallStatus" + }, + "BatchCallWhatsAppParams": { + "properties": { + "whatsapp_phone_number_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Whatsapp Phone Number Id" + }, + "whatsapp_call_permission_request_template_name": { + "type": "string", + "title": "Whatsapp Call Permission Request Template Name" + }, + "whatsapp_call_permission_request_template_language_code": { + "type": "string", + "title": "Whatsapp Call Permission Request Template Language Code" + } + }, + "type": "object", + "required": [ + "whatsapp_call_permission_request_template_name", + "whatsapp_call_permission_request_template_language_code" + ], + "title": "BatchCallWhatsAppParams" + }, + "BatchFailureResponseModel": { + "properties": { + "status": { + "type": "string", + "const": "failure", + "title": "Status", + "default": "failure" + }, + "error_code": { + "type": "integer", + "title": "Error Code" + }, + "error_status": { + "type": "string", + "title": "Error Status" + }, + "error_message": { + "type": "string", + "title": "Error Message" + } + }, + "type": "object", + "required": [ + "status", + "error_code", + "error_status", + "error_message" + ], + "title": "BatchFailureResponseModel" + }, + "BearerAuthResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "bearer_auth", + "title": "Auth Type", + "default": "bearer_auth" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "name", + "provider", + "id" + ], + "title": "BearerAuthResponse", + "description": "Response model for bearer auth" + }, + "BehaviorOverride": { + "properties": { + "verbosity": { + "anyOf": [ + { + "$ref": "#/components/schemas/Verbosity" + }, + { + "type": "null" + } + ], + "description": "Verbosity override. Underlying default applies when unset." + }, + "output_format": { + "anyOf": [ + { + "$ref": "#/components/schemas/OutputFormat" + }, + { + "type": "null" + } + ], + "description": "Output format override. Underlying default applies when unset." + }, + "interaction_budget": { + "anyOf": [ + { + "$ref": "#/components/schemas/InteractionBudget" + }, + { + "type": "null" + } + ], + "description": "Interaction budget override. Underlying default applies when unset." + } + }, + "type": "object", + "title": "BehaviorOverride" + }, + "BillingPeriod": { + "type": "string", + "enum": [ + "monthly_period", + "3_month_period", + "6_month_period", + "annual_period" + ], + "title": "BillingPeriod" + }, + "Body_Add_a_language_to_the_resource_v1_dubbing_resource__dubbing_id__language_post": { + "properties": { + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "The Target language." + } + }, + "type": "object", + "required": [ + "language" + ], + "title": "Body_Add_a_language_to_the_resource_v1_dubbing_resource__dubbing_id__language_post" + }, + "Body_Add_a_pronunciation_dictionary_v1_pronunciation_dictionaries_add_from_file_post": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the pronunciation dictionary, used for identification only.", + "examples": [ + "My Dictionary" + ] + }, + "file": { + "anyOf": [ + { + "type": "string", + "format": "binary" + }, + { + "type": "null" + } + ], + "title": "File", + "description": "A lexicon .pls file which we will use to initialize the project with." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "A description of the pronunciation dictionary, used for identification only.", + "examples": [ + "Contains pronunciation's of our character names" + ] + }, + "workspace_access": { + "anyOf": [ + { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ] + }, + { + "type": "null" + } + ], + "title": "Workspace Access", + "description": "Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access.", + "examples": [ + "viewer" + ] + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Body_Add_a_pronunciation_dictionary_v1_pronunciation_dictionaries_add_from_file_post" + }, + "Body_Add_a_pronunciation_dictionary_v1_pronunciation_dictionaries_add_from_rules_post": { + "properties": { + "rules": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/PronunciationDictionaryAliasRuleRequestModel" + }, + { + "$ref": "#/components/schemas/PronunciationDictionaryPhonemeRuleRequestModel" + } + ] + }, + "type": "array", + "title": "Rules", + "description": "List of pronunciation rules. Rule can be either:\n an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', }\n or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' }", + "examples": [ + "\n [\n {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b' },\n {'string_to_replace': 'c', 'type': 'phoneme', 'phoneme': 'd', 'alphabet': 'ipa' }\n ]" + ] + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the pronunciation dictionary, used for identification only.", + "examples": [ + "My Dictionary" + ] + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "A description of the pronunciation dictionary, used for identification only.", + "examples": [ + "Contains pronunciation's of our character names" + ] + }, + "workspace_access": { + "anyOf": [ + { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ] + }, + { + "type": "null" + } + ], + "title": "Workspace Access", + "description": "Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access.", + "examples": [ + "viewer" + ] + } + }, + "type": "object", + "required": [ + "rules", + "name" + ], + "title": "Body_Add_a_pronunciation_dictionary_v1_pronunciation_dictionaries_add_from_rules_post" + }, + "Body_Add_member_to_user_group_v1_workspace_groups__group_id__members_post": { + "properties": { + "email": { + "type": "string", + "title": "Email", + "description": "The email of the target workspace member." + } + }, + "type": "object", + "required": [ + "email" + ], + "title": "Body_Add_member_to_user_group_v1_workspace_groups__group_id__members_post" + }, + "Body_Add_rules_to_the_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__add_rules_post": { + "properties": { + "rules": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/PronunciationDictionaryAliasRuleRequestModel" + }, + { + "$ref": "#/components/schemas/PronunciationDictionaryPhonemeRuleRequestModel" + } + ] + }, + "type": "array", + "title": "Rules", + "description": "List of pronunciation rules. Rule can be either:\n an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', }\n or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' }", + "examples": [ + "\n [\n {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b' },\n {'string_to_replace': 'c', 'type': 'phoneme', 'phoneme': 'd', 'alphabet': 'ipa' }\n ]" + ] + } + }, + "type": "object", + "required": [ + "rules" + ], + "title": "Body_Add_rules_to_the_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__add_rules_post" + }, + "Body_Add_samples_to_PVC_voice_v1_voices_pvc__voice_id__samples_post": { + "properties": { + "files": { + "items": { + "type": "string", + "format": "binary" + }, + "type": "array", + "title": "Files", + "description": "Audio files used to create the voice." + }, + "remove_background_noise": { + "type": "boolean", + "title": "Remove Background Noise", + "description": "If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.", + "default": false, + "examples": [ + true + ] + } + }, + "type": "object", + "required": [ + "files" + ], + "title": "Body_Add_samples_to_PVC_voice_v1_voices_pvc__voice_id__samples_post" + }, + "Body_Add_shared_voice_v1_voices_add__public_user_id___voice_id__post": { + "properties": { + "new_name": { + "type": "string", + "title": "New Name", + "description": "The name that identifies this voice. This will be displayed in the dropdown of the website.", + "examples": [ + "John Smith" + ] + }, + "bookmarked": { + "type": "boolean", + "title": "Bookmarked", + "default": true + } + }, + "type": "object", + "required": [ + "new_name" + ], + "title": "Body_Add_shared_voice_v1_voices_add__public_user_id___voice_id__post" + }, + "Body_Add_to_knowledge_base_v1_convai_knowledge_base_post": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "A custom, human-readable name for the document." + }, + "url": { + "type": "string", + "title": "Url", + "description": "URL to a page of documentation that the agent will have access to in order to interact with users." + }, + "file": { + "type": "string", + "format": "binary", + "title": "File", + "description": "Documentation that the agent will have access to in order to interact with users." + } + }, + "type": "object", + "title": "Body_Add_to_knowledge_base_v1_convai_knowledge_base_post" + }, + "Body_Add_voice_v1_voices_add_post": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name that identifies this voice. This will be displayed in the dropdown of the website.", + "examples": [ + "John Smith" + ] + }, + "files": { + "items": { + "type": "string", + "format": "binary" + }, + "type": "array", + "title": "Files", + "description": "A list of file paths to audio recordings intended for voice cloning." + }, + "remove_background_noise": { + "type": "boolean", + "title": "Remove Background Noise", + "description": "If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.", + "default": false, + "examples": [ + true + ] + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "A description of the voice.", + "examples": [ + "An old American male voice with a slight hoarseness in his throat. Perfect for news." + ] + }, + "labels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Labels", + "description": "Labels for the voice. Keys can be language, accent, gender, or age.", + "examples": [ + "{\"language\": \"en\", \"accent\": \"en-US\", \"gender\": \"male\", \"age\": \"middle-aged\"}" + ] + } + }, + "type": "object", + "required": [ + "name", + "files" + ], + "title": "Body_Add_voice_v1_voices_add_post" + }, + "Body_Audio_Isolation_Stream_v1_audio_isolation_stream_post": { + "properties": { + "audio": { + "type": "string", + "format": "binary", + "title": "Audio", + "description": "The audio file from which vocals/speech will be isolated from." + }, + "file_format": { + "anyOf": [ + { + "type": "string", + "enum": [ + "pcm_s16le_16", + "other" + ] + }, + { + "type": "null" + } + ], + "title": "File Format", + "description": "The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform.", + "default": "other", + "examples": [ + "pcm_s16le_16", + "other" + ] + } + }, + "type": "object", + "required": [ + "audio" + ], + "title": "Body_Audio_Isolation_Stream_v1_audio_isolation_stream_post" + }, + "Body_Audio_Isolation_v1_audio_isolation_post": { + "properties": { + "audio": { + "type": "string", + "format": "binary", + "title": "Audio", + "description": "The audio file from which vocals/speech will be isolated from." + }, + "file_format": { + "anyOf": [ + { + "type": "string", + "enum": [ + "pcm_s16le_16", + "other" + ] + }, + { + "type": "null" + } + ], + "title": "File Format", + "description": "The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform.", + "default": "other", + "examples": [ + "pcm_s16le_16", + "other" + ] + }, + "preview_b64": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Preview B64", + "description": "Optional preview image base64 for tracking this generation." + } + }, + "type": "object", + "required": [ + "audio" + ], + "title": "Body_Audio_Isolation_v1_audio_isolation_post" + }, + "Body_Bulk_move_entities_to_folder_v1_convai_knowledge_base_bulk_move_post": { + "properties": { + "document_ids": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 20, + "minItems": 1, + "uniqueItems": true, + "title": "Document Ids", + "description": "The ids of documents or folders from the knowledge base.", + "examples": [ + [ + "21m00Tcm4TlvDq8ikWAM", + "31m00Tcm4TlvDq8ikWBM" + ] + ] + }, + "move_to": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Move To", + "description": "The folder to move the entities to. If not set, the entities will be moved to the root folder." + } + }, + "type": "object", + "required": [ + "document_ids" + ], + "title": "Body_Bulk_move_entities_to_folder_v1_convai_knowledge_base_bulk_move_post" + }, + "Body_Bulk_move_tests_to_folder_v1_convai_agent_testing_bulk_move_post": { + "properties": { + "entity_ids": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "uniqueItems": true, + "title": "Entity Ids", + "description": "The IDs of tests or folders to move." + }, + "move_to": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Move To", + "description": "The folder to move the entities to. If not set, the entities will be moved to the root folder." + } + }, + "type": "object", + "required": [ + "entity_ids" + ], + "title": "Body_Bulk_move_tests_to_folder_v1_convai_agent_testing_bulk_move_post" + }, + "Body_Compose_Music_with_a_detailed_response_v1_music_detailed_post": { + "properties": { + "prompt": { + "anyOf": [ + { + "type": "string", + "maxLength": 4100 + }, + { + "type": "null" + } + ], + "title": "Prompt", + "description": "A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`." + }, + "generation_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicGenerationMode" + }, + { + "type": "null" + } + ], + "description": "Optional generation mode hint for prompt-based music generation. Can only be used with `prompt`.", + "x-fern-ignore": true + }, + "music_prompt": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicPrompt" + }, + { + "type": "null" + } + ], + "description": "A music prompt. Deprecated. Use `composition_plan` instead.", + "deprecated": true, + "x-fern-ignore": true + }, + "lyrics_text": { + "anyOf": [ + { + "type": "string", + "maxLength": 4000 + }, + { + "type": "null" + } + ], + "title": "Lyrics Text", + "description": "The lyrics text to use for the generation.", + "x-fern-ignore": true + }, + "composition_plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicPrompt" + }, + { + "type": "null" + } + ], + "description": "A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`." + }, + "music_length_ms": { + "anyOf": [ + { + "type": "integer", + "maximum": 600000, + "minimum": 3000 + }, + { + "type": "null" + } + ], + "title": "Music Length Ms", + "description": "The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt." + }, + "model_id": { + "type": "string", + "enum": [ + "music_v1" + ], + "title": "Model Id", + "description": "The model to use for the generation.", + "default": "music_v1" + }, + "seed": { + "anyOf": [ + { + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt." + }, + "force_instrumental": { + "type": "boolean", + "title": "Force Instrumental", + "description": "If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`.", + "default": false + }, + "finetune_id": { + "anyOf": [ + { + "type": "string", + "maxLength": 100 + }, + { + "type": "null" + } + ], + "title": "Finetune Id", + "description": "The ID of the finetune to use for the generation", + "x-fern-ignore": true + }, + "finetune_strength": { + "type": "number", + "maximum": 2, + "exclusiveMinimum": 0, + "title": "Finetune Strength", + "description": "How strongly the finetune influences the generation. Defaults to 1.0 (full strength). Lower values soften the influence of the finetune, leaving more room for prompt-level steering. Only meaningful when `finetune_id` is also provided.", + "default": 1, + "x-fern-ignore": true + }, + "use_phonetic_names": { + "type": "boolean", + "title": "Use Phonetic Names", + "description": "If true, proper names in the prompt will be phonetically spelled in the lyrics for better pronunciation by the music model. The original names will be restored in word timestamps.", + "default": false, + "x-fern-ignore": true + }, + "respect_sections_durations": { + "type": "boolean", + "title": "Respect Sections Durations", + "description": "Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan.", + "default": true + }, + "store_for_inpainting": { + "type": "boolean", + "title": "Store For Inpainting", + "description": "Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting feature.", + "default": false + }, + "with_timestamps": { + "type": "boolean", + "title": "With Timestamps", + "description": "Whether to return the timestamps of the words in the generated song.", + "default": false + }, + "sign_with_c2pa": { + "type": "boolean", + "title": "Sign With C2Pa", + "description": "Whether to sign the generated song with C2PA. Applicable only for mp3 files.", + "default": false + }, + "model_style_prefix": { + "type": "string", + "enum": [ + "music", + "sfx" + ], + "title": "Model Style Prefix", + "default": "music", + "x-fern-ignore": true + } + }, + "type": "object", + "title": "Body_Compose_Music_with_a_detailed_response_v1_music_detailed_post" + }, + "Body_Compose_music_v1_music_post": { + "properties": { + "prompt": { + "anyOf": [ + { + "type": "string", + "maxLength": 4100 + }, + { + "type": "null" + } + ], + "title": "Prompt", + "description": "A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`." + }, + "generation_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicGenerationMode" + }, + { + "type": "null" + } + ], + "description": "Optional generation mode hint for prompt-based music generation. Can only be used with `prompt`.", + "x-fern-ignore": true + }, + "music_prompt": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicPrompt" + }, + { + "type": "null" + } + ], + "description": "A music prompt. Deprecated. Use `composition_plan` instead.", + "deprecated": true, + "x-fern-ignore": true + }, + "lyrics_text": { + "anyOf": [ + { + "type": "string", + "maxLength": 4000 + }, + { + "type": "null" + } + ], + "title": "Lyrics Text", + "description": "The lyrics text to use for the generation.", + "x-fern-ignore": true + }, + "composition_plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicPrompt" + }, + { + "type": "null" + } + ], + "description": "A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`." + }, + "music_length_ms": { + "anyOf": [ + { + "type": "integer", + "maximum": 600000, + "minimum": 3000 + }, + { + "type": "null" + } + ], + "title": "Music Length Ms", + "description": "The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt." + }, + "model_id": { + "type": "string", + "enum": [ + "music_v1" + ], + "title": "Model Id", + "description": "The model to use for the generation.", + "default": "music_v1" + }, + "seed": { + "anyOf": [ + { + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt." + }, + "force_instrumental": { + "type": "boolean", + "title": "Force Instrumental", + "description": "If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`.", + "default": false + }, + "finetune_id": { + "anyOf": [ + { + "type": "string", + "maxLength": 100 + }, + { + "type": "null" + } + ], + "title": "Finetune Id", + "description": "The ID of the finetune to use for the generation", + "x-fern-ignore": true + }, + "finetune_strength": { + "type": "number", + "maximum": 2, + "exclusiveMinimum": 0, + "title": "Finetune Strength", + "description": "How strongly the finetune influences the generation. Defaults to 1.0 (full strength). Lower values soften the influence of the finetune, leaving more room for prompt-level steering. Only meaningful when `finetune_id` is also provided.", + "default": 1, + "x-fern-ignore": true + }, + "use_phonetic_names": { + "type": "boolean", + "title": "Use Phonetic Names", + "description": "If true, proper names in the prompt will be phonetically spelled in the lyrics for better pronunciation by the music model. The original names will be restored in word timestamps.", + "default": false, + "x-fern-ignore": true + }, + "respect_sections_durations": { + "type": "boolean", + "title": "Respect Sections Durations", + "description": "Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan.", + "default": true + }, + "store_for_inpainting": { + "type": "boolean", + "title": "Store For Inpainting", + "description": "Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting feature.", + "default": false + }, + "sign_with_c2pa": { + "type": "boolean", + "title": "Sign With C2Pa", + "description": "Whether to sign the generated song with C2PA. Applicable only for mp3 files.", + "default": false + } + }, + "type": "object", + "title": "Body_Compose_music_v1_music_post" + }, + "Body_Compute_RAG_indexes_in_batch_v1_convai_knowledge_base_rag_index_post": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/GetOrCreateRAGIndexRequestModel" + }, + "type": "array", + "maxItems": 100, + "minItems": 1, + "title": "Items", + "description": "List of requested RAG indexes. Minimum 1, maximum 100 items." + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "Body_Compute_RAG_indexes_in_batch_v1_convai_knowledge_base_rag_index_post" + }, + "Body_Create_Agent_v1_convai_agents_create_post": { + "properties": { + "conversation_config": { + "$ref": "#/components/schemas/ConversationalConfigAPIModel-Input", + "description": "Conversation configuration for an agent" + }, + "platform_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentPlatformSettingsRequestModel" + }, + { + "type": "null" + } + ], + "description": "Platform settings for the agent are all settings that aren't related to the conversation orchestration and content." + }, + "workflow": { + "$ref": "#/components/schemas/AgentWorkflowRequestModel", + "description": "Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools." + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "A name to make the agent easier to find", + "examples": [ + "My agent" + ], + "optional": true + }, + "tags": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tags", + "description": "Tags to help classify and filter the agent", + "examples": [ + [ + "Customer Support", + "Technical Help", + "Eleven" + ] + ], + "optional": true + } + }, + "type": "object", + "required": [ + "conversation_config" + ], + "title": "Body_Create_Agent_v1_convai_agents_create_post" + }, + "Body_Create_PVC_voice_v1_voices_pvc_post": { + "properties": { + "name": { + "type": "string", + "maxLength": 100, + "title": "Name", + "description": "The name that identifies this voice. This will be displayed in the dropdown of the website.", + "examples": [ + "John Smith" + ] + }, + "language": { + "type": "string", + "title": "Language", + "description": "Language used in the samples.", + "examples": [ + "en" + ] + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 500 + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Description to use for the created voice.", + "examples": [ + "An old American male voice with a slight hoarseness in his throat. Perfect for news." + ] + }, + "labels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Labels", + "description": "Labels for the voice. Keys can be language, accent, gender, or age.", + "examples": [ + "{\"language\": \"en\", \"accent\": \"en-US\", \"gender\": \"male\", \"age\": \"middle-aged\"}" + ] + } + }, + "type": "object", + "required": [ + "name", + "language" + ], + "title": "Body_Create_PVC_voice_v1_voices_pvc_post" + }, + "Body_Create_Pronunciation_Dictionaries_v1_studio_projects__project_id__pronunciation_dictionaries_post": { + "properties": { + "pronunciation_dictionary_locators": { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryVersionLocatorDBModel" + }, + "type": "array", + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators=\"{\\\"pronunciation_dictionary_id\\\":\\\"Vmd4Zor6fplcA7WrINey\\\",\\\"version_id\\\":\\\"hRPaxjlTdR7wFMhV4w0b\\\"}\"' --form 'pronunciation_dictionary_locators=\"{\\\"pronunciation_dictionary_id\\\":\\\"JzWtcGQMJ6bnlWwyMo7e\\\",\\\"version_id\\\":\\\"lbmwxiLu4q6txYxgdZqn\\\"}\"'.", + "examples": [ + [ + "{\"pronunciation_dictionary_id\": \"21m00Tcm4TlvDq8ikWAM\", \"version_id\": \"BdF0s0aZ3oFoKnDYdTox\"}" + ] + ] + }, + "invalidate_affected_text": { + "type": "boolean", + "title": "Invalidate Affected Text", + "description": "This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does.", + "default": true, + "examples": [ + false + ] + } + }, + "type": "object", + "required": [ + "pronunciation_dictionary_locators" + ], + "title": "Body_Create_Pronunciation_Dictionaries_v1_studio_projects__project_id__pronunciation_dictionaries_post" + }, + "Body_Create_Studio_project_v1_studio_projects_post": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the Studio project, used for identification only.", + "examples": [ + "Project 1" + ] + }, + "default_title_voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Default Title Voice Id", + "description": "The voice_id that corresponds to the default voice used for new titles.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ] + }, + "default_paragraph_voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Default Paragraph Voice Id", + "description": "The voice_id that corresponds to the default voice used for new paragraphs.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ] + }, + "default_model_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Default Model Id", + "description": "The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models.", + "examples": [ + "eleven_multilingual_v2" + ] + }, + "from_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "From Url", + "description": "An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.", + "examples": [ + "https://blog.elevenlabs.io/the_first_ai_that_can_laugh/" + ] + }, + "from_document": { + "anyOf": [ + { + "type": "string", + "format": "binary" + }, + { + "type": "null" + } + ], + "title": "From Document", + "description": "An optional .epub, .pdf, .txt or similar file can be provided. If provided, we will initialize the Studio project with its content. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank." + }, + "from_content_json": { + "type": "string", + "title": "From Content Json", + "description": "\n An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.\n\n Example:\n [{\"name\": \"Chapter A\", \"blocks\": [{\"sub_type\": \"p\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"A\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"B\", \"type\": \"tts_node\"}]}, {\"sub_type\": \"h1\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"C\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"D\", \"type\": \"tts_node\"}]}]}, {\"name\": \"Chapter B\", \"blocks\": [{\"sub_type\": \"p\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"E\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"F\", \"type\": \"tts_node\"}]}, {\"sub_type\": \"h2\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"G\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"H\", \"type\": \"tts_node\"}]}]}]\n ", + "examples": [ + "[{\"name\": \"Chapter A\", \"blocks\": [{\"sub_type\": \"p\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"A\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"B\", \"type\": \"tts_node\"}]}, {\"sub_type\": \"h1\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"C\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"D\", \"type\": \"tts_node\"}]}]}, {\"name\": \"Chapter B\", \"blocks\": [{\"sub_type\": \"p\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"E\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"F\", \"type\": \"tts_node\"}]}, {\"sub_type\": \"h2\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"G\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"H\", \"type\": \"tts_node\"}]}]}]" + ] + }, + "quality_preset": { + "$ref": "#/components/schemas/QualityPresetType", + "title": "Quality of the generated audio.", + "description": "Output quality of the generated audio. Must be one of:\n'standard' - standard output format, 128kbps with 44.1kHz sample rate.\n'high' - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.\n'ultra' - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.\n'ultra_lossless' - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.\n", + "default": "standard", + "examples": [ + "standard" + ] + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download.", + "examples": [ + "Romeo and Juliet" + ] + }, + "author": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Author", + "description": "An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download.", + "examples": [ + "William Shakespeare" + ] + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "An optional description of the Studio project.", + "examples": [ + "A tragic love story between two young lovers." + ] + }, + "genres": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Genres", + "description": "An optional list of genres associated with the Studio project.", + "examples": [ + [ + "Romance", + "Drama" + ] + ] + }, + "target_audience": { + "anyOf": [ + { + "type": "string", + "enum": [ + "children", + "young adult", + "adult", + "all ages" + ] + }, + { + "type": "null" + } + ], + "title": "Target Audience", + "description": "An optional target audience of the Studio project.", + "examples": [ + "adult" + ] + }, + "language": { + "anyOf": [ + { + "type": "string", + "maxLength": 2, + "minLength": 2 + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "An optional language of the Studio project. Two-letter language code (ISO 639-1).", + "examples": [ + "en" + ] + }, + "content_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type", + "description": "An optional content type of the Studio project.", + "examples": [ + "Book" + ] + }, + "original_publication_date": { + "anyOf": [ + { + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}$|^\\d{4}$" + }, + { + "type": "null" + } + ], + "title": "Original Publication Date", + "description": "An optional original publication date of the Studio project, in the format YYYY-MM-DD or YYYY.", + "examples": [ + "1597-01-01" + ] + }, + "mature_content": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Mature Content", + "description": "An optional specification of whether this Studio project contains mature content.", + "default": false, + "examples": [ + false + ] + }, + "isbn_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Isbn Number", + "description": "An optional ISBN number of the Studio project you want to create, this will be added as metadata to the mp3 file on Studio project or chapter download.", + "examples": [ + "0-306-40615-2" + ] + }, + "acx_volume_normalization": { + "type": "boolean", + "title": "Acx Volume Normalization", + "description": "[Deprecated] When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements", + "default": false, + "examples": [ + false + ] + }, + "volume_normalization": { + "type": "boolean", + "title": "Volume Normalization", + "description": "When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements", + "default": false, + "examples": [ + false + ] + }, + "pronunciation_dictionary_locators": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators=\"{\\\"pronunciation_dictionary_id\\\":\\\"Vmd4Zor6fplcA7WrINey\\\",\\\"version_id\\\":\\\"hRPaxjlTdR7wFMhV4w0b\\\"}\"' --form 'pronunciation_dictionary_locators=\"{\\\"pronunciation_dictionary_id\\\":\\\"JzWtcGQMJ6bnlWwyMo7e\\\",\\\"version_id\\\":\\\"lbmwxiLu4q6txYxgdZqn\\\"}\"'.", + "examples": [ + [ + "{\"pronunciation_dictionary_id\": \"21m00Tcm4TlvDq8ikWAM\", \"version_id\": \"BdF0s0aZ3oFoKnDYdTox\"}" + ] + ] + }, + "callback_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Callback Url", + "description": "\n A url that will be called by our service when the Studio project is converted. Request will contain a json blob containing the status of the conversion\n Messages:\n 1. When project was converted successfully:\n {\n type: \"project_conversion_status\",\n event_timestamp: 1234567890,\n data: {\n request_id: \"1234567890\",\n project_id: \"21m00Tcm4TlvDq8ikWAM\",\n conversion_status: \"success\",\n project_snapshot_id: \"22m00Tcm4TlvDq8ikMAT\",\n error_details: None,\n }\n }\n 2. When project conversion failed:\n {\n type: \"project_conversion_status\",\n event_timestamp: 1234567890,\n data: {\n request_id: \"1234567890\",\n project_id: \"21m00Tcm4TlvDq8ikWAM\",\n conversion_status: \"error\",\n project_snapshot_id: None,\n error_details: \"Error details if conversion failed\"\n }\n }\n\n 3. When chapter was converted successfully:\n {\n type: \"chapter_conversion_status\",\n event_timestamp: 1234567890,\n data: {\n request_id: \"1234567890\",\n project_id: \"21m00Tcm4TlvDq8ikWAM\",\n chapter_id: \"22m00Tcm4TlvDq8ikMAT\",\n conversion_status: \"success\",\n chapter_snapshot_id: \"23m00Tcm4TlvDq8ikMAV\",\n error_details: None,\n }\n }\n 4. When chapter conversion failed:\n {\n type: \"chapter_conversion_status\",\n event_timestamp: 1234567890,\n data: {\n request_id: \"1234567890\",\n project_id: \"21m00Tcm4TlvDq8ikWAM\",\n chapter_id: \"22m00Tcm4TlvDq8ikMAT\",\n conversion_status: \"error\",\n chapter_snapshot_id: None,\n error_details: \"Error details if conversion failed\"\n }\n }\n ", + "examples": [ + [ + "https://www.test.com/my-api/projects-status" + ] + ] + }, + "fiction": { + "anyOf": [ + { + "type": "string", + "enum": [ + "fiction", + "non-fiction" + ] + }, + { + "type": "null" + } + ], + "title": "Fiction", + "description": "An optional specification of whether the content of this Studio project is fiction.", + "examples": [ + "fiction" + ] + }, + "apply_text_normalization": { + "anyOf": [ + { + "type": "string", + "enum": [ + "auto", + "on", + "off", + "apply_english" + ] + }, + { + "type": "null" + } + ], + "title": "Apply Text Normalization", + "description": "\n This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'.\n When set to 'auto', the system will automatically decide whether to apply text normalization\n (e.g., spelling out numbers). With 'on', text normalization will always be applied, while\n with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English.\n " + }, + "auto_convert": { + "type": "boolean", + "title": "Auto Convert", + "description": "Whether to auto convert the Studio project to audio or not.", + "default": false + }, + "auto_assign_voices": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Auto Assign Voices", + "description": "[Alpha Feature] Whether automatically assign voices to phrases in the create Project.", + "default": false + }, + "source_type": { + "anyOf": [ + { + "type": "string", + "enum": [ + "blank", + "book", + "article", + "genfm", + "video", + "screenplay" + ] + }, + { + "type": "null" + } + ], + "title": "Source Type", + "description": "The type of Studio project to create.", + "examples": [ + "book" + ] + }, + "voice_settings": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Voice Settings", + "description": " Optional voice settings overrides for the project, encoded as a list of JSON strings.\n\n Example:\n [\"{\\\"voice_id\\\": \\\"21m00Tcm4TlvDq8ikWAM\\\", \\\"stability\\\": 0.7, \\\"similarity_boost\\\": 0.8, \\\"style\\\": 0.5, \\\"speed\\\": 1.0, \\\"use_speaker_boost\\\": true}\"]\n ", + "examples": [ + [ + "{\"voice_id\": \"21m00Tcm4TlvDq8ikWAM\", \"stability\": 0.7, \"similarity_boost\": 0.8, \"style\": 0.5, \"speed\": 1.0, \"use_speaker_boost\": true}" + ] + ] + }, + "create_publishing_read": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Create Publishing Read", + "description": "If true, creates a corresponding read for direct publishing in draft state", + "default": false + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Body_Create_Studio_project_v1_studio_projects_post" + }, + "Body_Create_URL_document_v1_convai_knowledge_base_url_post": { + "properties": { + "url": { + "type": "string", + "title": "Url", + "description": "URL to a page of documentation that the agent will have access to in order to interact with users." + }, + "name": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "A custom, human-readable name for the document." + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "If set, the created document or folder will be placed inside the given folder." + }, + "enable_auto_sync": { + "type": "boolean", + "title": "Enable Auto Sync", + "description": "Whether to enable auto-sync for this URL document.", + "default": false + }, + "auto_remove": { + "type": "boolean", + "title": "Auto Remove", + "description": "Whether to automatically remove the document if the URL becomes unavailable. Only applicable when auto-sync is enabled.", + "default": false + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "Body_Create_URL_document_v1_convai_knowledge_base_url_post" + }, + "Body_Create_a_new_branch_v1_convai_agents__agent_id__branches_post": { + "properties": { + "parent_version_id": { + "type": "string", + "title": "Parent Version Id", + "description": "ID of the version to branch from" + }, + "name": { + "type": "string", + "maxLength": 140, + "title": "Name", + "description": "Name of the branch. It is unique within the agent." + }, + "description": { + "type": "string", + "maxLength": 4096, + "title": "Description", + "description": "Description for the branch" + }, + "conversation_config": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Conversation Config", + "description": "Changes to apply to conversation config" + }, + "platform_settings": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Platform Settings", + "description": "Changes to apply to platform settings" + }, + "workflow": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentWorkflowRequestModel" + }, + { + "type": "null" + } + ], + "description": "Updated workflow definition" + } + }, + "type": "object", + "required": [ + "parent_version_id", + "name", + "description" + ], + "title": "Body_Create_a_new_branch_v1_convai_agents__agent_id__branches_post" + }, + "Body_Create_a_new_speaker_v1_dubbing_resource__dubbing_id__speaker_post": { + "properties": { + "speaker_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Speaker Name", + "description": "Name to attribute to this speaker." + }, + "voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Id", + "description": "Either the identifier of a voice from the ElevenLabs voice library, or one of ['track-clone', 'clip-clone']." + }, + "voice_stability": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Voice Stability", + "description": "For models that support it, the voice similarity value to use. This will default to 0.65, with a valid range of [0.0, 1.0]." + }, + "voice_similarity": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Voice Similarity", + "description": "For models that support it, the voice similarity value to use. This will default to 1.0, with a valid range of [0.0, 1.0]." + }, + "voice_style": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Voice Style", + "description": "For models that support it, the voice style value to use. This will default to 1.0, with a valid range of [0.0, 1.0]." + } + }, + "type": "object", + "title": "Body_Create_a_new_speaker_v1_dubbing_resource__dubbing_id__speaker_post" + }, + "Body_Create_a_new_voice_from_voice_preview_v1_text_to_voice_post": { + "properties": { + "voice_name": { + "type": "string", + "title": "Voice Name", + "description": "Name to use for the created voice.", + "examples": [ + "Sassy squeaky mouse" + ] + }, + "voice_description": { + "type": "string", + "maxLength": 1000, + "minLength": 20, + "title": "Voice Description", + "description": "Description to use for the created voice.", + "examples": [ + "A sassy squeaky mouse" + ] + }, + "generated_voice_id": { + "type": "string", + "title": "Generated Voice Id", + "description": "The generated_voice_id to create; obtain it from POST /v1/text-to-voice/design, POST /v1/text-to-voice/:voice_id/remix, or the response headers when generating previews.", + "examples": [ + "37HceQefKmEi3bGovXjL" + ] + }, + "labels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Labels", + "description": "Optional, metadata to add to the created voice. Defaults to None.", + "examples": [ + { + "language": "en" + } + ], + "name": "Voice metadata" + }, + "played_not_selected_voice_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Played Not Selected Voice Ids", + "description": "List of voice ids that the user has played but not selected. Used for RLHF." + } + }, + "type": "object", + "required": [ + "voice_name", + "voice_description", + "generated_voice_id" + ], + "title": "Body_Create_a_new_voice_from_voice_preview_v1_text_to_voice_post" + }, + "Body_Create_agent_draft_v1_convai_agents__agent_id__drafts_post": { + "properties": { + "conversation_config": { + "additionalProperties": true, + "type": "object", + "title": "Conversation Config", + "description": "Conversation config for the draft" + }, + "platform_settings": { + "additionalProperties": true, + "type": "object", + "title": "Platform Settings", + "description": "Platform settings for the draft" + }, + "workflow": { + "$ref": "#/components/schemas/AgentWorkflowRequestModel", + "description": "Workflow for the draft" + }, + "name": { + "type": "string", + "title": "Name", + "description": "Name for the draft" + }, + "tags": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tags", + "description": "Tags to help classify and filter the agent", + "examples": [ + [ + "Customer Support", + "Technical Help", + "Eleven" + ] + ], + "optional": true + } + }, + "type": "object", + "required": [ + "conversation_config", + "platform_settings", + "workflow", + "name" + ], + "title": "Body_Create_agent_draft_v1_convai_agents__agent_id__drafts_post" + }, + "Body_Create_agent_test_folder_v1_convai_agent_testing_folders_post": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the folder to create" + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "The ID of the parent folder. If not provided, the folder will be created at the root level." + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Body_Create_agent_test_folder_v1_convai_agent_testing_folders_post" + }, + "Body_Create_chapter_v1_studio_projects__project_id__chapters_post": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the chapter, used for identification only.", + "examples": [ + "Chapter 1" + ] + }, + "from_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "From Url", + "description": "An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.", + "examples": [ + "https://blog.elevenlabs.io/the_first_ai_that_can_laugh/" + ] + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Body_Create_chapter_v1_studio_projects__project_id__chapters_post" + }, + "Body_Create_file_document_v1_convai_knowledge_base_file_post": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File", + "description": "Documentation that the agent will have access to in order to interact with users." + }, + "name": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "A custom, human-readable name for the document." + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "If set, the created document or folder will be placed inside the given folder." + } + }, + "type": "object", + "required": [ + "file" + ], + "title": "Body_Create_file_document_v1_convai_knowledge_base_file_post" + }, + "Body_Create_folder_v1_convai_knowledge_base_folder_post": { + "properties": { + "name": { + "type": "string", + "minLength": 1, + "title": "Name", + "description": "A custom, human-readable name for the document." + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "If set, the created document or folder will be placed inside the given folder." + }, + "enable_auto_sync": { + "type": "boolean", + "title": "Enable Auto Sync", + "description": "Whether to enable auto-sync for this URL document.", + "default": false + }, + "auto_remove": { + "type": "boolean", + "title": "Auto Remove", + "description": "Whether to automatically remove the document if the URL becomes unavailable. Only applicable when auto-sync is enabled.", + "default": false + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Body_Create_folder_v1_convai_knowledge_base_folder_post" + }, + "Body_Create_forced_alignment_v1_forced_alignment_post": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File", + "description": "The file to align. All major audio formats are supported. The file size must be less than 1GB." + }, + "text": { + "type": "string", + "title": "Text", + "description": "The text to align with the audio. The input text can be in any format, however diarization is not supported at this time." + } + }, + "type": "object", + "required": [ + "file", + "text" + ], + "title": "Body_Create_forced_alignment_v1_forced_alignment_post" + }, + "Body_Create_or_update_deployments_v1_convai_agents__agent_id__deployments_post": { + "properties": { + "deployment_request": { + "$ref": "#/components/schemas/AgentDeploymentRequest", + "description": "Request to create a new deployment" + } + }, + "type": "object", + "required": [ + "deployment_request" + ], + "title": "Body_Create_or_update_deployments_v1_convai_agents__agent_id__deployments_post" + }, + "Body_Create_podcast_v1_studio_podcasts_post": { + "properties": { + "model_id": { + "type": "string", + "title": "Model Id", + "description": "The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models.", + "examples": [ + "eleven_multilingual_v2" + ] + }, + "mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/PodcastConversationMode" + }, + { + "$ref": "#/components/schemas/PodcastBulletinMode" + } + ], + "title": "Mode", + "description": "The type of podcast to generate. Can be 'conversation', an interaction between two voices, or 'bulletin', a monologue.", + "examples": [ + { + "conversation": { + "guest_voice_id": "bYTqZQo3Jz7LQtmGTgwi", + "host_voice_id": "6lCwbsX1yVjD49QmpkTR" + }, + "type": "conversation" + } + ] + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/PodcastTextSource" + }, + { + "$ref": "#/components/schemas/PodcastURLSource" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/PodcastTextSource" + }, + { + "$ref": "#/components/schemas/PodcastURLSource" + } + ] + }, + "type": "array" + } + ], + "title": "Source", + "description": "The source content for the Podcast.", + "examples": [ + { + "type": "url", + "url": "https://en.wikipedia.org/wiki/Cognitive_science" + } + ] + }, + "quality_preset": { + "$ref": "#/components/schemas/QualityPresetType", + "title": "Quality of the generated audio.", + "description": "Output quality of the generated audio. Must be one of:\n'standard' - standard output format, 128kbps with 44.1kHz sample rate.\n'high' - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.\n'ultra' - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.\n'ultra_lossless' - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.\n", + "default": "standard", + "examples": [ + "standard" + ] + }, + "duration_scale": { + "type": "string", + "enum": [ + "short", + "default", + "long" + ], + "title": "The duration of the generated podcast. This varies depending on the format, voice and language.", + "description": "Duration of the generated podcast. Must be one of:\nshort - produces podcasts shorter than 3 minutes.\ndefault - produces podcasts roughly between 3-7 minutes.\nlong - produces podcasts longer than 7 minutes.\n", + "default": "default", + "examples": [ + "short" + ] + }, + "language": { + "anyOf": [ + { + "type": "string", + "maxLength": 2, + "minLength": 2 + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "An optional language of the Studio project. Two-letter language code (ISO 639-1).", + "examples": [ + "en" + ] + }, + "intro": { + "anyOf": [ + { + "type": "string", + "maxLength": 1500 + }, + { + "type": "null" + } + ], + "title": "Intro", + "description": "The intro text that will always be added to the beginning of the podcast.", + "examples": [ + "Welcome to the podcast." + ] + }, + "outro": { + "anyOf": [ + { + "type": "string", + "maxLength": 1500 + }, + { + "type": "null" + } + ], + "title": "Outro", + "description": "The outro text that will always be added to the end of the podcast.", + "examples": [ + "Thank you for listening!" + ] + }, + "instructions_prompt": { + "anyOf": [ + { + "type": "string", + "maxLength": 3000 + }, + { + "type": "null" + } + ], + "title": "Instructions Prompt", + "description": "Additional instructions prompt for the podcast generation used to adjust the podcast's style and tone.", + "examples": [ + "Ensure the podcast remains factual, accurate and appropriate for all audiences." + ] + }, + "highlights": { + "anyOf": [ + { + "items": { + "type": "string", + "maxLength": 70, + "minLength": 10 + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Highlights", + "description": "A brief summary or highlights of the Studio project's content, providing key points or themes. This should be between 10 and 70 characters.", + "examples": [ + [ + "Emphasize the importance of AI on education" + ] + ] + }, + "callback_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Callback Url", + "description": "\n A url that will be called by our service when the Studio project is converted. Request will contain a json blob containing the status of the conversion\n Messages:\n 1. When project was converted successfully:\n {\n type: \"project_conversion_status\",\n event_timestamp: 1234567890,\n data: {\n request_id: \"1234567890\",\n project_id: \"21m00Tcm4TlvDq8ikWAM\",\n conversion_status: \"success\",\n project_snapshot_id: \"22m00Tcm4TlvDq8ikMAT\",\n error_details: None,\n }\n }\n 2. When project conversion failed:\n {\n type: \"project_conversion_status\",\n event_timestamp: 1234567890,\n data: {\n request_id: \"1234567890\",\n project_id: \"21m00Tcm4TlvDq8ikWAM\",\n conversion_status: \"error\",\n project_snapshot_id: None,\n error_details: \"Error details if conversion failed\"\n }\n }\n\n 3. When chapter was converted successfully:\n {\n type: \"chapter_conversion_status\",\n event_timestamp: 1234567890,\n data: {\n request_id: \"1234567890\",\n project_id: \"21m00Tcm4TlvDq8ikWAM\",\n chapter_id: \"22m00Tcm4TlvDq8ikMAT\",\n conversion_status: \"success\",\n chapter_snapshot_id: \"23m00Tcm4TlvDq8ikMAV\",\n error_details: None,\n }\n }\n 4. When chapter conversion failed:\n {\n type: \"chapter_conversion_status\",\n event_timestamp: 1234567890,\n data: {\n request_id: \"1234567890\",\n project_id: \"21m00Tcm4TlvDq8ikWAM\",\n chapter_id: \"22m00Tcm4TlvDq8ikMAT\",\n conversion_status: \"error\",\n chapter_snapshot_id: None,\n error_details: \"Error details if conversion failed\"\n }\n }\n ", + "examples": [ + [ + "https://www.test.com/my-api/projects-status" + ] + ] + }, + "apply_text_normalization": { + "anyOf": [ + { + "type": "string", + "enum": [ + "auto", + "on", + "off", + "apply_english" + ] + }, + { + "type": "null" + } + ], + "title": "Apply Text Normalization", + "description": "\n This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'.\n When set to 'auto', the system will automatically decide whether to apply text normalization\n (e.g., spelling out numbers). With 'on', text normalization will always be applied, while\n with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English.\n " + } + }, + "type": "object", + "required": [ + "model_id", + "mode", + "source" + ], + "title": "Body_Create_podcast_v1_studio_podcasts_post" + }, + "Body_Create_text_document_v1_convai_knowledge_base_text_post": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "Text content to be added to the knowledge base." + }, + "name": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "A custom, human-readable name for the document." + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "If set, the created document or folder will be placed inside the given folder." + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "Body_Create_text_document_v1_convai_knowledge_base_text_post" + }, + "Body_Create_workspace_webhook_v1_workspace_webhooks_post": { + "properties": { + "settings": { + "$ref": "#/components/schemas/WebhookHMACSettings", + "description": "Webhook settings object containing auth_type and corresponding configuration" + } + }, + "type": "object", + "required": [ + "settings" + ], + "title": "Body_Create_workspace_webhook_v1_workspace_webhooks_post" + }, + "Body_Creates_Audio_Native_enabled_project__v1_audio_native_post": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Project name." + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Image", + "description": "(Deprecated) Image URL used in the player. If not provided, default image set in the Player settings is used.", + "deprecated": true + }, + "author": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Author", + "description": "Author used in the player and inserted at the start of the uploaded article. If not provided, the default author set in the Player settings is used." + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "Title used in the player and inserted at the top of the uploaded article. If not provided, the default title set in the Player settings is used." + }, + "small": { + "type": "boolean", + "title": "Small", + "description": "(Deprecated) Whether to use small player or not. If not provided, default value set in the Player settings is used.", + "default": false, + "deprecated": true + }, + "text_color": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text Color", + "description": "Text color used in the player. If not provided, default text color set in the Player settings is used." + }, + "background_color": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Background Color", + "description": "Background color used in the player. If not provided, default background color set in the Player settings is used." + }, + "sessionization": { + "type": "integer", + "title": "Sessionization", + "description": "(Deprecated) Specifies for how many minutes to persist the session across page reloads. If not provided, default sessionization set in the Player settings is used.", + "default": 0, + "deprecated": true + }, + "voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Id", + "description": "Voice ID used to voice the content. If not provided, default voice ID set in the Player settings is used." + }, + "model_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Model Id", + "description": "TTS Model ID used in the player. If not provided, default model ID set in the Player settings is used." + }, + "file": { + "type": "string", + "format": "binary", + "title": "File", + "description": "Either txt or HTML input file containing the article content. HTML should be formatted as follows '<html><body><div><p>Your content</p><h3>More of your content</h3><p>Some more of your content</p></div></body></html>'" + }, + "auto_convert": { + "type": "boolean", + "title": "Auto Convert", + "description": "Whether to auto convert the project to audio or not.", + "default": false + }, + "apply_text_normalization": { + "anyOf": [ + { + "type": "string", + "enum": [ + "auto", + "on", + "off", + "apply_english" + ] + }, + { + "type": "null" + } + ], + "title": "Apply Text Normalization", + "description": "\n This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'.\n When set to 'auto', the system will automatically decide whether to apply text normalization\n (e.g., spelling out numbers). With 'on', text normalization will always be applied, while\n with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English.\n " + }, + "pronunciation_dictionary_locators": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators=\"{\\\"pronunciation_dictionary_id\\\":\\\"Vmd4Zor6fplcA7WrINey\\\",\\\"version_id\\\":\\\"hRPaxjlTdR7wFMhV4w0b\\\"}\"' --form 'pronunciation_dictionary_locators=\"{\\\"pronunciation_dictionary_id\\\":\\\"JzWtcGQMJ6bnlWwyMo7e\\\",\\\"version_id\\\":\\\"lbmwxiLu4q6txYxgdZqn\\\"}\"'.", + "examples": [ + [ + "{\"pronunciation_dictionary_id\": \"21m00Tcm4TlvDq8ikWAM\", \"version_id\": \"BdF0s0aZ3oFoKnDYdTox\"}" + ] + ] + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Body_Creates_Audio_Native_enabled_project__v1_audio_native_post" + }, + "Body_Delete_existing_invitation_v1_workspace_invites_delete": { + "properties": { + "email": { + "type": "string", + "title": "Email", + "description": "The email of the customer", + "examples": [ + "john.doe@testmail.com" + ] + } + }, + "type": "object", + "required": [ + "email" + ], + "title": "Body_Delete_existing_invitation_v1_workspace_invites_delete" + }, + "Body_Delete_member_from_user_group_v1_workspace_groups__group_id__members_remove_post": { + "properties": { + "email": { + "type": "string", + "title": "Email", + "description": "The email of the target workspace member." + } + }, + "type": "object", + "required": [ + "email" + ], + "title": "Body_Delete_member_from_user_group_v1_workspace_groups__group_id__members_remove_post" + }, + "Body_Download_history_items_v1_history_download_post": { + "properties": { + "history_item_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "History Item Ids", + "description": "A list of history items to download, you can get IDs of history items and other metadata using the GET https://api.elevenlabs.io/v1/history endpoint." + }, + "output_format": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Output Format", + "description": "Output format to transcode the audio file, can be wav or default." + } + }, + "type": "object", + "required": [ + "history_item_ids" + ], + "title": "Body_Download_history_items_v1_history_download_post" + }, + "Body_Dub_a_video_or_an_audio_file_v1_dubbing_post": { + "properties": { + "file": { + "anyOf": [ + { + "type": "string", + "format": "binary" + }, + { + "type": "null" + } + ], + "title": "File", + "description": "A list of file paths to audio recordings intended for voice cloning" + }, + "csv_file": { + "anyOf": [ + { + "type": "string", + "format": "binary" + }, + { + "type": "null" + } + ], + "title": "Csv File", + "description": "CSV file containing transcription/translation metadata" + }, + "foreground_audio_file": { + "anyOf": [ + { + "type": "string", + "format": "binary" + }, + { + "type": "null" + } + ], + "title": "Foreground Audio File", + "description": "For use only with csv input" + }, + "background_audio_file": { + "anyOf": [ + { + "type": "string", + "format": "binary" + }, + { + "type": "null" + } + ], + "title": "Background Audio File", + "description": "For use only with csv input" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "Name of the dubbing project." + }, + "source_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Url", + "description": "URL of the source video/audio file." + }, + "source_lang": { + "type": "string", + "title": "Source Lang", + "description": "Source language. Expects a valid iso639-1 or iso639-3 language code.", + "default": "auto" + }, + "target_lang": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Target Lang", + "description": "The Target language to dub the content into. Expects a valid iso639-1 or iso639-3 language code." + }, + "target_accent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Target Accent", + "description": "[Experimental] An accent to apply when selecting voices from the library and to use to inform translation of the dialect to prefer." + }, + "num_speakers": { + "type": "integer", + "title": "Num Speakers", + "description": "Number of speakers to use for the dubbing. Set to 0 to automatically detect the number of speakers", + "default": 0 + }, + "watermark": { + "type": "boolean", + "title": "Watermark", + "description": "Whether to apply watermark to the output video.", + "default": false + }, + "start_time": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Start Time", + "description": "Start time of the source video/audio file." + }, + "end_time": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "End Time", + "description": "End time of the source video/audio file." + }, + "highest_resolution": { + "type": "boolean", + "title": "Highest Resolution", + "description": "Whether to use the highest resolution available.", + "default": false + }, + "drop_background_audio": { + "type": "boolean", + "title": "Drop Background Audio", + "description": "An advanced setting. Whether to drop background audio from the final dub. This can improve dub quality where it's known that audio shouldn't have a background track such as for speeches or monologues.", + "default": false + }, + "use_profanity_filter": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Use Profanity Filter", + "description": "[BETA] Whether transcripts should have profanities censored with the words '[censored]'" + }, + "dubbing_studio": { + "type": "boolean", + "title": "Dubbing Studio", + "description": "Whether to prepare dub for edits in dubbing studio or edits as a dubbing resource.", + "default": false + }, + "disable_voice_cloning": { + "type": "boolean", + "title": "Disable Voice Cloning", + "description": "Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices.", + "default": false + }, + "mode": { + "type": "string", + "enum": [ + "automatic", + "manual" + ], + "title": "Mode", + "description": "The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. Note that manual mode is experimental and production use is strongly discouraged.", + "default": "automatic" + }, + "csv_fps": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Csv Fps", + "description": "Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes." + } + }, + "type": "object", + "title": "Body_Dub_a_video_or_an_audio_file_v1_dubbing_post" + }, + "Body_Dubs_all_or_some_segments_and_languages_v1_dubbing_resource__dubbing_id__dub_post": { + "properties": { + "segments": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Segments", + "description": "Dub only this list of segments." + }, + "languages": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Languages", + "description": "Dub only these languages for each segment." + } + }, + "type": "object", + "required": [ + "segments", + "languages" + ], + "title": "Body_Dubs_all_or_some_segments_and_languages_v1_dubbing_resource__dubbing_id__dub_post" + }, + "Body_Duplicate_Agent_v1_convai_agents__agent_id__duplicate_post": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "A name to make the agent easier to find", + "examples": [ + "My agent" + ], + "optional": true + } + }, + "type": "object", + "title": "Body_Duplicate_Agent_v1_convai_agents__agent_id__duplicate_post" + }, + "Body_Edit_PVC_voice_v1_voices_pvc__voice_id__post": { + "properties": { + "name": { + "type": "string", + "maxLength": 100, + "title": "Name", + "description": "The name that identifies this voice. This will be displayed in the dropdown of the website.", + "examples": [ + "John Smith" + ] + }, + "language": { + "type": "string", + "title": "Language", + "description": "Language used in the samples.", + "examples": [ + "en" + ] + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 500 + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Description to use for the created voice.", + "examples": [ + "An old American male voice with a slight hoarseness in his throat. Perfect for news." + ] + }, + "labels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Labels", + "description": "Labels for the voice. Keys can be language, accent, gender, or age.", + "examples": [ + "{\"language\": \"en\", \"accent\": \"en-US\", \"gender\": \"male\", \"age\": \"middle-aged\"}" + ] + } + }, + "type": "object", + "title": "Body_Edit_PVC_voice_v1_voices_pvc__voice_id__post" + }, + "Body_Edit_voice_v1_voices__voice_id__edit_post": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name that identifies this voice. This will be displayed in the dropdown of the website.", + "examples": [ + "John Smith" + ] + }, + "files": { + "items": { + "type": "string", + "format": "binary" + }, + "type": "array", + "title": "Files", + "description": "Audio files to add to the voice" + }, + "remove_background_noise": { + "type": "boolean", + "title": "Remove Background Noise", + "description": "If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.", + "default": false, + "examples": [ + true + ] + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "A description of the voice.", + "examples": [ + "An old American male voice with a slight hoarseness in his throat. Perfect for news." + ] + }, + "labels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Labels", + "description": "Labels for the voice. Keys can be language, accent, gender, or age.", + "examples": [ + "{\"language\": \"en\", \"accent\": \"en-US\", \"gender\": \"male\", \"age\": \"middle-aged\"}" + ] + }, + "moderate_metadata": { + "type": "boolean", + "title": "Moderate Metadata", + "description": "Run synchronous LLM moderation over the voice name and description when they change. Has no effect unless the voice_library_metadata_moderation feature flag is enabled for the user.", + "default": false + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Body_Edit_voice_v1_voices__voice_id__edit_post" + }, + "Body_Generate_composition_plan_v1_music_plan_post": { + "properties": { + "prompt": { + "type": "string", + "maxLength": 4100, + "title": "Prompt", + "description": "A simple text prompt to compose a plan from." + }, + "music_length_ms": { + "anyOf": [ + { + "type": "integer", + "maximum": 600000, + "minimum": 3000 + }, + { + "type": "null" + } + ], + "title": "Music Length Ms", + "description": "The length of the composition plan to generate in milliseconds. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt." + }, + "source_composition_plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicPrompt" + }, + { + "type": "null" + } + ], + "description": "An optional composition plan to use as a source for the new composition plan." + }, + "model_id": { + "type": "string", + "enum": [ + "music_v1" + ], + "title": "Model Id", + "description": "The model to use for the generation.", + "default": "music_v1" + } + }, + "type": "object", + "required": [ + "prompt" + ], + "title": "Body_Generate_composition_plan_v1_music_plan_post" + }, + "Body_Get_Workspace_Usage_v1_workspace_analytics_query_usage_by_product_over_time_post": { + "properties": { + "start_time": { + "type": "integer", + "minimum": 1577836800000, + "title": "Start Time", + "description": "Start of the time range as a Unix timestamp in milliseconds. Must be at least 2020-01-01." + }, + "end_time": { + "type": "integer", + "minimum": 1577836800000, + "title": "End Time", + "description": "End of the time range as a Unix timestamp in milliseconds. Must be at least 2020-01-01." + }, + "interval_seconds": { + "type": "integer", + "minimum": 1, + "title": "Interval Seconds", + "description": "Bucket size in seconds. Each row in the response covers this many seconds of usage. For example, pass 3600 for hourly buckets or 86400 for daily buckets.", + "default": 60 + }, + "group_by": { + "anyOf": [ + { + "items": { + "type": "string", + "enum": [ + "product_type", + "model", + "voice_id", + "user_id", + "fiat_currency", + "fiat_charge_type", + "region", + "reporting_workspace_id", + "request_source", + "resource_id", + "subresource_id", + "request_queue_type", + "voice_multiplier", + "hashed_xi_api_key", + "billing_group_id" + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Group By" + }, + "filters": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ColumnFilter" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Filters" + } + }, + "type": "object", + "required": [ + "start_time", + "end_time" + ], + "title": "Body_Get_Workspace_Usage_v1_workspace_analytics_query_usage_by_product_over_time_post" + }, + "Body_Get_similar_library_voices_v1_similar_voices_post": { + "properties": { + "audio_file": { + "type": "string", + "format": "binary", + "title": "Audio File" + }, + "similarity_threshold": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Similarity Threshold", + "description": "Threshold for voice similarity between provided sample and library voices. Values range from 0 to 2. The smaller the value the more similar voices will be returned.", + "examples": [ + 0.5 + ] + }, + "top_k": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Top K", + "description": "Number of most similar voices to return. If similarity_threshold is provided, less than this number of voices may be returned. Values range from 1 to 100.", + "examples": [ + 10 + ] + } + }, + "type": "object", + "title": "Body_Get_similar_library_voices_v1_similar_voices_post" + }, + "Body_Handle_an_outbound_call_via_SIP_trunk_v1_convai_sip_trunk_outbound_call_post": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "agent_phone_number_id": { + "type": "string", + "title": "Agent Phone Number Id" + }, + "to_number": { + "type": "string", + "title": "To Number" + }, + "conversation_initiation_client_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataRequest-Input" + }, + { + "type": "null" + } + ] + }, + "telephony_call_config": { + "$ref": "#/components/schemas/TelephonyCallConfig", + "default": { + "ringing_timeout_secs": 60 + } + } + }, + "type": "object", + "required": [ + "agent_id", + "agent_phone_number_id", + "to_number" + ], + "title": "Body_Handle_an_outbound_call_via_SIP_trunk_v1_convai_sip_trunk_outbound_call_post" + }, + "Body_Handle_an_outbound_call_via_Twilio_v1_convai_twilio_outbound_call_post": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "agent_phone_number_id": { + "type": "string", + "title": "Agent Phone Number Id" + }, + "to_number": { + "type": "string", + "title": "To Number" + }, + "conversation_initiation_client_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataRequest-Input" + }, + { + "type": "null" + } + ] + }, + "call_recording_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Call Recording Enabled", + "description": "Whether let Twilio record the call." + }, + "telephony_call_config": { + "$ref": "#/components/schemas/TelephonyCallConfig", + "default": { + "ringing_timeout_secs": 60 + } + } + }, + "type": "object", + "required": [ + "agent_id", + "agent_phone_number_id", + "to_number" + ], + "title": "Body_Handle_an_outbound_call_via_Twilio_v1_convai_twilio_outbound_call_post" + }, + "Body_Invite_multiple_users_v1_workspace_invites_add_bulk_post": { + "properties": { + "emails": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Emails", + "description": "The email of the customer", + "examples": [ + "john.doe@testmail.com" + ] + }, + "seat_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/SeatType" + }, + { + "type": "null" + } + ], + "description": "The seat type of the user", + "examples": [ + "workspace_member", + "workspace_admin" + ] + }, + "group_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Group Ids", + "description": "The group ids of the user", + "examples": [ + [ + "group_id_1", + "group_id_2" + ] + ] + } + }, + "type": "object", + "required": [ + "emails" + ], + "title": "Body_Invite_multiple_users_v1_workspace_invites_add_bulk_post" + }, + "Body_Invite_user_v1_workspace_invites_add_post": { + "properties": { + "email": { + "type": "string", + "title": "Email", + "description": "The email of the customer", + "examples": [ + "john.doe@testmail.com" + ] + }, + "workspace_permission": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workspace Permission", + "description": "The workspace permission of the user. This is deprecated, use `seat_type` instead.", + "deprecated": true, + "examples": [ + "workspace_member", + "workspace_admin" + ] + }, + "seat_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/SeatType" + }, + { + "type": "null" + } + ], + "description": "The seat type of the user", + "examples": [ + "workspace_member", + "workspace_admin" + ] + }, + "group_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Group Ids", + "description": "The group ids of the user", + "examples": [ + [ + "group_id_1", + "group_id_2" + ] + ] + } + }, + "type": "object", + "required": [ + "email" + ], + "title": "Body_Invite_user_v1_workspace_invites_add_post" + }, + "Body_List_API_requests_v1_workspace_analytics_requests_post": { + "properties": { + "start_time": { + "anyOf": [ + { + "type": "integer", + "minimum": 1577836800000 + }, + { + "type": "null" + } + ], + "title": "Start Time", + "description": "Start of the time range as a Unix timestamp in milliseconds." + }, + "end_time": { + "anyOf": [ + { + "type": "integer", + "minimum": 1577836800000 + }, + { + "type": "null" + } + ], + "title": "End Time", + "description": "End of the time range as a Unix timestamp in milliseconds." + }, + "limit": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "title": "Limit", + "default": 100 + }, + "sort": { + "anyOf": [ + { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + { + "type": "null" + } + ], + "title": "Sort", + "description": "Optional timestamp sort direction. If omitted, defaults to desc when end_time is provided, otherwise asc." + }, + "filters": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ColumnFilter" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Filters" + }, + "search": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Search" + } + }, + "type": "object", + "title": "Body_List_API_requests_v1_workspace_analytics_requests_post" + }, + "Body_Make_an_outbound_call_via_WhatsApp_v1_convai_whatsapp_outbound_call_post": { + "properties": { + "whatsapp_phone_number_id": { + "type": "string", + "title": "Whatsapp Phone Number Id" + }, + "whatsapp_user_id": { + "type": "string", + "title": "Whatsapp User Id" + }, + "whatsapp_call_permission_request_template_name": { + "type": "string", + "title": "Whatsapp Call Permission Request Template Name" + }, + "whatsapp_call_permission_request_template_language_code": { + "type": "string", + "title": "Whatsapp Call Permission Request Template Language Code" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "conversation_initiation_client_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataRequest-Input" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "whatsapp_phone_number_id", + "whatsapp_user_id", + "whatsapp_call_permission_request_template_name", + "whatsapp_call_permission_request_template_language_code", + "agent_id" + ], + "title": "Body_Make_an_outbound_call_via_WhatsApp_v1_convai_whatsapp_outbound_call_post" + }, + "Body_Merge_a_branch_into_a_target_branch_v1_convai_agents__agent_id__branches__source_branch_id__merge_post": { + "properties": { + "archive_source_branch": { + "type": "boolean", + "title": "Archive Source Branch", + "description": "Whether to archive the source branch after merging", + "default": true + }, + "force": { + "type": "boolean", + "title": "Force", + "description": "Force source branch changes onto the target, overriding timestamp-based conflict resolution", + "default": false + } + }, + "type": "object", + "title": "Body_Merge_a_branch_into_a_target_branch_v1_convai_agents__agent_id__branches__source_branch_id__merge_post" + }, + "Body_Move_entity_to_folder_v1_convai_knowledge_base__document_id__move_post": { + "properties": { + "move_to": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Move To", + "description": "The folder to move the entities to. If not set, the entities will be moved to the root folder." + } + }, + "type": "object", + "title": "Body_Move_entity_to_folder_v1_convai_knowledge_base__document_id__move_post" + }, + "Body_Move_segments_between_speakers_v1_dubbing_resource__dubbing_id__migrate_segments_post": { + "properties": { + "segment_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Segment Ids" + }, + "speaker_id": { + "type": "string", + "title": "Speaker Id" + } + }, + "type": "object", + "required": [ + "segment_ids", + "speaker_id" + ], + "title": "Body_Move_segments_between_speakers_v1_dubbing_resource__dubbing_id__migrate_segments_post" + }, + "Body_Patches_an_Agent_settings_v1_convai_agents__agent_id__patch": { + "properties": { + "conversation_config": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Conversation Config", + "description": "Conversation configuration for an agent" + }, + "platform_settings": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Platform Settings", + "description": "Platform settings for the agent are all settings that aren't related to the conversation orchestration and content." + }, + "workflow": { + "$ref": "#/components/schemas/AgentWorkflowRequestModel", + "description": "Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools." + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "A name to make the agent easier to find", + "examples": [ + "My agent" + ], + "optional": true + }, + "tags": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tags", + "description": "Tags to help classify and filter the agent", + "examples": [ + [ + "Customer Support", + "Technical Help", + "Eleven" + ] + ], + "optional": true + }, + "version_description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Description", + "description": "Description for this version when publishing changes (only applicable for versioned agents)" + } + }, + "type": "object", + "title": "Body_Patches_an_Agent_settings_v1_convai_agents__agent_id__patch" + }, + "Body_Post_Agent_avatar_v1_convai_agents__agent_id__avatar_post": { + "properties": { + "avatar_file": { + "type": "string", + "format": "binary", + "title": "Avatar File", + "description": "An image file to be used as the agent's avatar." + } + }, + "type": "object", + "required": [ + "avatar_file" + ], + "title": "Body_Post_Agent_avatar_v1_convai_agents__agent_id__avatar_post" + }, + "Body_Register_a_Twilio_call_and_return_TwiML_v1_convai_twilio_register_call_post": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "from_number": { + "type": "string", + "title": "From Number" + }, + "to_number": { + "type": "string", + "title": "To Number" + }, + "direction": { + "$ref": "#/components/schemas/TelephonyDirection", + "default": "inbound" + }, + "conversation_initiation_client_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataRequest-Input" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "agent_id", + "from_number", + "to_number" + ], + "title": "Body_Register_a_Twilio_call_and_return_TwiML_v1_convai_twilio_register_call_post" + }, + "Body_Register_media_v1_productions_orders__order_id__media_post": { + "properties": { + "declared_language": { + "type": "string", + "title": "Declared Language", + "description": "The language code of the media content (e.g. 'en', 'es-ES'). Must be a supported source language for some order item kind." + }, + "media": { + "anyOf": [ + { + "type": "string", + "format": "binary" + }, + { + "type": "null" + } + ], + "title": "Media", + "description": "The media file to upload. Mutually exclusive with media_url." + }, + "media_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Media Url", + "description": "A URL to fetch the media file from. Mutually exclusive with media." + }, + "media_url_filename": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Media Url Filename", + "description": "The filename for URL-sourced media (e.g. 'example.mp4'). Required when using media_url." + }, + "media_url_content_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Media Url Content Type", + "description": "The MIME type for URL-sourced media (e.g. 'video/mp4'). Required when using media_url." + } + }, + "type": "object", + "required": [ + "declared_language" + ], + "title": "Body_Register_media_v1_productions_orders__order_id__media_post" + }, + "Body_Remove_rules_from_the_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__remove_rules_post": { + "properties": { + "rule_strings": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Rule Strings", + "description": "List of strings to remove from the pronunciation dictionary.", + "examples": [ + "['a', 'b']" + ] + } + }, + "type": "object", + "required": [ + "rule_strings" + ], + "title": "Body_Remove_rules_from_the_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__remove_rules_post" + }, + "Body_Render_audio_or_video_for_the_given_language_v1_dubbing_resource__dubbing_id__render__language__post": { + "properties": { + "render_type": { + "$ref": "#/components/schemas/RenderType", + "description": "The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip']" + }, + "normalize_volume": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Normalize Volume", + "description": "Whether to normalize the volume of the rendered audio.", + "default": false + } + }, + "type": "object", + "required": [ + "render_type" + ], + "title": "Body_Render_audio_or_video_for_the_given_language_v1_dubbing_resource__dubbing_id__render__language__post" + }, + "Body_Request_manual_verification_v1_voices_pvc__voice_id__verification_post": { + "properties": { + "files": { + "items": { + "type": "string", + "format": "binary" + }, + "type": "array", + "title": "Files", + "description": "Verification documents" + }, + "extra_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Extra Text", + "description": "Extra text to be used in the manual verification process." + } + }, + "type": "object", + "required": [ + "files" + ], + "title": "Body_Request_manual_verification_v1_voices_pvc__voice_id__verification_post" + }, + "Body_Run_PVC_training_v1_voices_pvc__voice_id__train_post": { + "properties": { + "model_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Model Id", + "description": "The model ID to use for the conversion.", + "examples": [ + "eleven_turbo_v2" + ] + } + }, + "type": "object", + "title": "Body_Run_PVC_training_v1_voices_pvc__voice_id__train_post" + }, + "Body_Send_an_outbound_message_via_WhatsApp_v1_convai_whatsapp_outbound_message_post": { + "properties": { + "whatsapp_phone_number_id": { + "type": "string", + "title": "Whatsapp Phone Number Id" + }, + "whatsapp_user_id": { + "type": "string", + "title": "Whatsapp User Id" + }, + "template_name": { + "type": "string", + "title": "Template Name" + }, + "template_language_code": { + "type": "string", + "title": "Template Language Code" + }, + "template_params": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/WhatsAppTemplateHeaderComponentParams" + }, + { + "$ref": "#/components/schemas/WhatsAppTemplateBodyComponentParams" + }, + { + "$ref": "#/components/schemas/WhatsAppTemplateButtonComponentParams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "body": "#/components/schemas/WhatsAppTemplateBodyComponentParams", + "button": "#/components/schemas/WhatsAppTemplateButtonComponentParams", + "header": "#/components/schemas/WhatsAppTemplateHeaderComponentParams" + } + } + }, + "type": "array", + "title": "Template Params" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "conversation_initiation_client_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataRequest-Input" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "whatsapp_phone_number_id", + "whatsapp_user_id", + "template_name", + "template_language_code", + "template_params", + "agent_id" + ], + "title": "Body_Send_an_outbound_message_via_WhatsApp_v1_convai_whatsapp_outbound_message_post" + }, + "Body_Set_rules_on_the_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__set_rules_post": { + "properties": { + "rules": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/PronunciationDictionaryAliasRuleRequestModel" + }, + { + "$ref": "#/components/schemas/PronunciationDictionaryPhonemeRuleRequestModel" + } + ] + }, + "type": "array", + "title": "Rules", + "description": "List of pronunciation rules. Rule can be either:\n an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', }\n or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' }", + "examples": [ + "\n [\n {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b' },\n {'string_to_replace': 'c', 'type': 'phoneme', 'phoneme': 'd', 'alphabet': 'ipa' }\n ]" + ] + } + }, + "type": "object", + "required": [ + "rules" + ], + "title": "Body_Set_rules_on_the_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__set_rules_post" + }, + "Body_Share_workspace_resource_v1_workspace_resources__resource_id__share_post": { + "properties": { + "role": { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ], + "title": "Role", + "description": "Role to update the target principal with." + }, + "resource_type": { + "$ref": "#/components/schemas/WorkspaceResourceType", + "description": "Resource type of the target resource." + }, + "user_email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Email", + "description": "The email of the user or service account." + }, + "group_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Group Id", + "description": "The ID of the target group. To target the permissions principals have by default on this resource, use the value 'default'." + }, + "workspace_api_key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workspace Api Key Id", + "description": "The ID of the target workspace API key. This isn't the same as the key itself that would you pass in the header for authentication. Workspace admins can find this in the workspace settings UI." + } + }, + "type": "object", + "required": [ + "role", + "resource_type" + ], + "title": "Body_Share_workspace_resource_v1_workspace_resources__resource_id__share_post" + }, + "Body_Simulates_a_conversation__Stream__v1_convai_agents__agent_id__simulate_conversation_stream_post": { + "properties": { + "simulation_specification": { + "$ref": "#/components/schemas/ConversationSimulationSpecification", + "description": "A specification detailing how the conversation should be simulated" + }, + "extra_evaluation_criteria": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PromptEvaluationCriteria" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Extra Evaluation Criteria", + "description": "A list of evaluation criteria to test" + }, + "new_turns_limit": { + "type": "integer", + "title": "New Turns Limit", + "description": "Maximum number of new turns to generate in the conversation simulation", + "default": 10000 + } + }, + "type": "object", + "required": [ + "simulation_specification" + ], + "title": "Body_Simulates_a_conversation__Stream__v1_convai_agents__agent_id__simulate_conversation_stream_post" + }, + "Body_Simulates_a_conversation_v1_convai_agents__agent_id__simulate_conversation_post": { + "properties": { + "simulation_specification": { + "$ref": "#/components/schemas/ConversationSimulationSpecification", + "description": "A specification detailing how the conversation should be simulated" + }, + "extra_evaluation_criteria": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PromptEvaluationCriteria" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Extra Evaluation Criteria", + "description": "A list of evaluation criteria to test" + }, + "new_turns_limit": { + "type": "integer", + "title": "New Turns Limit", + "description": "Maximum number of new turns to generate in the conversation simulation", + "default": 10000 + } + }, + "type": "object", + "required": [ + "simulation_specification" + ], + "title": "Body_Simulates_a_conversation_v1_convai_agents__agent_id__simulate_conversation_post" + }, + "Body_Sound_Generation_v1_sound_generation_post": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The text that will get converted into a sound effect.", + "examples": [ + "A large, ancient wooden door slowly opening in an eerie, abandoned castle.." + ] + }, + "loop": { + "type": "boolean", + "title": "Loop", + "description": "Whether to create a sound effect that loops smoothly. Only available for the 'eleven_text_to_sound_v2 model'.", + "default": false + }, + "duration_seconds": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Duration Seconds", + "description": "The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None." + }, + "prompt_influence": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Prompt Influence", + "description": "A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3.", + "default": 0.3 + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "The model ID to use for the sound generation.", + "default": "eleven_text_to_sound_v2", + "examples": [ + "eleven_text_to_sound_v2" + ] + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "Body_Sound_Generation_v1_sound_generation_post" + }, + "Body_Speech_to_Speech_Streaming_v1_speech_to_speech__voice_id__stream_post": { + "properties": { + "audio": { + "type": "string", + "format": "binary", + "title": "Audio", + "description": "The audio file which holds the content and emotion that will control the generated speech." + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property.", + "default": "eleven_english_sts_v2" + }, + "voice_settings": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Settings", + "description": "Voice settings overriding stored settings for the given voice. They are applied only on the given request. Needs to be send as a JSON encoded string." + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.", + "examples": [ + 12345 + ] + }, + "remove_background_noise": { + "type": "boolean", + "title": "Remove Background Noise", + "description": "If set, will remove the background noise from your audio input using our audio isolation model. Only applies to Voice Changer.", + "default": false, + "examples": [ + true + ] + }, + "file_format": { + "anyOf": [ + { + "type": "string", + "enum": [ + "pcm_s16le_16", + "other" + ] + }, + { + "type": "null" + } + ], + "title": "File Format", + "description": "The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform.", + "default": "other", + "examples": [ + "pcm_s16le_16", + "other" + ] + } + }, + "type": "object", + "required": [ + "audio" + ], + "title": "Body_Speech_to_Speech_Streaming_v1_speech_to_speech__voice_id__stream_post" + }, + "Body_Speech_to_Speech_v1_speech_to_speech__voice_id__post": { + "properties": { + "audio": { + "type": "string", + "format": "binary", + "title": "Audio", + "description": "The audio file which holds the content and emotion that will control the generated speech." + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property.", + "default": "eleven_english_sts_v2" + }, + "voice_settings": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Settings", + "description": "Voice settings overriding stored settings for the given voice. They are applied only on the given request. Needs to be send as a JSON encoded string." + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.", + "examples": [ + 12345 + ] + }, + "remove_background_noise": { + "type": "boolean", + "title": "Remove Background Noise", + "description": "If set, will remove the background noise from your audio input using our audio isolation model. Only applies to Voice Changer.", + "default": false, + "examples": [ + true + ] + }, + "file_format": { + "anyOf": [ + { + "type": "string", + "enum": [ + "pcm_s16le_16", + "other" + ] + }, + { + "type": "null" + } + ], + "title": "File Format", + "description": "The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform.", + "default": "other", + "examples": [ + "pcm_s16le_16", + "other" + ] + } + }, + "type": "object", + "required": [ + "audio" + ], + "title": "Body_Speech_to_Speech_v1_speech_to_speech__voice_id__post" + }, + "Body_Speech_to_Text_v1_speech_to_text_post": { + "properties": { + "model_id": { + "type": "string", + "enum": [ + "scribe_v1", + "scribe_v2" + ], + "title": "Model Id", + "description": "The ID of the model to use for transcription." + }, + "file": { + "anyOf": [ + { + "type": "string", + "format": "binary" + }, + { + "type": "null" + } + ], + "title": "File", + "description": "The file to transcribe (100ms minimum audio length). All major audio and video formats are supported. Exactly one of the file or cloud_storage_url parameters must be provided. The file size must be less than 3.0GB." + }, + "language_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language Code", + "description": "An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically." + }, + "tag_audio_events": { + "type": "boolean", + "title": "Tag Audio Events", + "description": "Whether to tag audio events like (laughter), (footsteps), etc. in the transcription.", + "default": true + }, + "num_speakers": { + "anyOf": [ + { + "type": "integer", + "maximum": 32, + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Num Speakers", + "description": "The maximum amount of speakers talking in the uploaded file. Can help with predicting who speaks when. The maximum amount of speakers that can be predicted is 32. Defaults to null, in this case the amount of speakers is set to the maximum value the model supports." + }, + "timestamps_granularity": { + "type": "string", + "enum": [ + "none", + "word", + "character" + ], + "title": "Timestamps Granularity", + "description": "The granularity of the timestamps in the transcription. 'word' provides word-level timestamps and 'character' provides character-level timestamps per word.", + "default": "word" + }, + "diarize": { + "type": "boolean", + "title": "Diarize", + "description": "Whether to annotate which speaker is currently talking in the uploaded file.", + "default": false + }, + "diarization_threshold": { + "anyOf": [ + { + "type": "number", + "maximum": 0.4, + "minimum": 0.1 + }, + { + "type": "null" + } + ], + "title": "Diarization Threshold", + "description": "Diarization threshold to apply during speaker diarization. A higher value means there will be a lower chance of one speaker being diarized as two different speakers but also a higher chance of two different speakers being diarized as one speaker (less total speakers predicted). A low value means there will be a higher chance of one speaker being diarized as two different speakers but also a lower chance of two different speakers being diarized as one speaker (more total speakers predicted). Can only be set when diarize=True and num_speakers=None. Defaults to None, in which case we will choose a threshold based on the model_id (0.22 usually)." + }, + "additional_formats": { + "$ref": "#/components/schemas/AdditionalFormats", + "description": "A list of additional formats to export the transcript to.", + "examples": [ + [ + { + "format": "srt", + "include_speakers": true, + "include_timestamps": true + }, + { + "format": "txt", + "include_speakers": false + } + ] + ] + }, + "file_format": { + "type": "string", + "enum": [ + "pcm_s16le_16", + "other" + ], + "title": "File Format", + "description": "The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform.", + "default": "other", + "examples": [ + "pcm_s16le_16", + "other" + ] + }, + "cloud_storage_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cloud Storage Url", + "description": "The HTTPS URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be accessible via HTTPS and the file size must be less than 2GB. Any valid HTTPS URL is accepted, including URLs from cloud storage providers (AWS S3, Google Cloud Storage, Cloudflare R2, etc.), CDNs, or any other HTTPS source. URLs can be pre-signed or include authentication tokens in query parameters.", + "deprecated": true, + "examples": [ + "https://storage.googleapis.com/my-bucket/folder/audio.mp3", + "https://my-bucket.s3.us-west-2.amazonaws.com/folder/audio.mp3", + "https://account123.r2.cloudflarestorage.com/my-bucket/audio.mp3", + "https://cdn.example.com/media/audio.wav" + ], + "x-fern-ignore": true + }, + "source_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Url", + "description": "The URL of an audio or video file to transcribe. Supports hosted video or audio files, YouTube video URLs, TikTok video URLs, and other video hosting services.", + "examples": [ + "https://storage.googleapis.com/my-bucket/folder/audio.mp3", + "https://www.youtube.com/watch?v=dQw4w9WgXcQ", + "https://www.tiktok.com/@barstoolsports/video/7285745795779939614" + ] + }, + "webhook": { + "type": "boolean", + "title": "Webhook", + "description": "Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook.", + "default": false + }, + "webhook_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Webhook Id", + "description": "Optional specific webhook ID to send the transcription result to. Only valid when webhook is set to true. If not provided, transcription will be sent to all configured speech-to-text webhooks." + }, + "temperature": { + "anyOf": [ + { + "type": "number", + "maximum": 2, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Temperature", + "description": "Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0." + }, + "seed": { + "anyOf": [ + { + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be an integer between 0 and 2147483647.", + "examples": [ + 12345 + ] + }, + "use_multi_channel": { + "type": "boolean", + "title": "Use Multi Channel", + "description": "Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel will be transcribed independently and the results will be combined. Each word in the response will include a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. Each channel is billed independently at the full audio duration, so cost scales linearly with the number of channels.", + "default": false + }, + "webhook_metadata": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Webhook Metadata", + "description": "Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information.", + "examples": [ + "{\"user_id\": \"123\", \"session_id\": \"abc-def-ghi\"}", + "{\"request_type\": \"interview\", \"participant_name\": \"John Doe\"}" + ] + }, + "entity_detection": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Entity Detection", + "description": "Detect entities in the transcript. Can be 'all' to detect all entities, a single entity type or category string, or a list of entity types/categories. Categories include 'pii', 'phi', 'pci', 'other', 'offensive_language'. When enabled, detected entities will be returned in the 'entities' field with their text, type, and character positions. Usage of this parameter will incur an additional 30% surcharge on the base transcription cost." + }, + "no_verbatim": { + "type": "boolean", + "title": "No Verbatim", + "description": "If true, the transcription will not have any filler words, false starts and non-speech sounds. Only supported with scribe_v2 model.", + "default": false + }, + "detect_speaker_roles": { + "type": "boolean", + "title": "Detect Speaker Roles", + "description": "Whether to detect speaker roles (agent vs customer). Requires diarize=true. Cannot be used with use_multi_channel=true. When enabled, speaker_id values will be 'agent' and 'customer' instead of 'speaker_0', 'speaker_1', etc. Usage incurs an additional 10% surcharge on base transcription cost.", + "default": false + }, + "entity_redaction": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Entity Redaction", + "description": "Redact entities from the transcript text. Accepts the same format as entity_detection: 'all', a category ('pii', 'phi'), or specific entity types. Must be a subset of entity_detection. When redaction is enabled, the entities field will not be returned. Usage of this parameter will incur an additional 30% surcharge on the base transcription cost." + }, + "entity_redaction_mode": { + "type": "string", + "title": "Entity Redaction Mode", + "description": "How to format redacted entities. 'redacted' replaces with {REDACTED}, 'entity_type' replaces with {ENTITY_TYPE}, 'enumerated_entity_type' replaces with {ENTITY_TYPE_N} where N enumerates each occurrence. Only used when entity_redaction is set.", + "default": "enumerated_entity_type" + }, + "keyterms": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Keyterms", + "description": "A list of keyterms to bias the transcription towards. The keyterms are words or phrases you want the model to recognise more accurately. The number of keyterms cannot exceed 1000. The length of each keyterm must be less than 50 characters. Keyterms can contain at most 5 words (after normalisation). For example [\"hello\", \"world\", \"technical term\"]. The following characters are not supported: `<`, `>`, `{`, `}`, `[`, `]`, `\\`. Usage of this parameter will incur an additional 20% surcharge on the base transcription cost. When more than 100 keyterms are provided, a minimum billable duration of 20 seconds applies per request.", + "default": [] + } + }, + "type": "object", + "required": [ + "model_id" + ], + "title": "Body_Speech_to_Text_v1_speech_to_text_post" + }, + "Body_Stem_separation_v1_music_stem_separation_post": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File", + "description": "The audio file to separate into stems." + }, + "stem_variation_id": { + "type": "string", + "enum": [ + "two_stems_v1", + "six_stems_v1" + ], + "title": "Stem Variation Id", + "description": "The id of the stem variation to use.", + "default": "six_stems_v1" + }, + "sign_with_c2pa": { + "type": "boolean", + "title": "Sign With C2Pa", + "description": "Whether to sign the generated song with C2PA. Applicable only for mp3 files.", + "default": false + } + }, + "type": "object", + "required": [ + "file" + ], + "title": "Body_Stem_separation_v1_music_stem_separation_post" + }, + "Body_Stream_Studio_project_audio_v1_studio_projects__project_id__snapshots__project_snapshot_id__stream_post": { + "properties": { + "convert_to_mpeg": { + "type": "boolean", + "title": "Convert To Mpeg", + "description": "Whether to convert the audio to mpeg format.", + "default": false + } + }, + "type": "object", + "title": "Body_Stream_Studio_project_audio_v1_studio_projects__project_id__snapshots__project_snapshot_id__stream_post" + }, + "Body_Stream_chapter_audio_v1_studio_projects__project_id__chapters__chapter_id__snapshots__chapter_snapshot_id__stream_post": { + "properties": { + "convert_to_mpeg": { + "type": "boolean", + "title": "Convert To Mpeg", + "description": "Whether to convert the audio to mpeg format.", + "default": false + } + }, + "type": "object", + "title": "Body_Stream_chapter_audio_v1_studio_projects__project_id__chapters__chapter_id__snapshots__chapter_snapshot_id__stream_post" + }, + "Body_Stream_composed_music_v1_music_stream_post": { + "properties": { + "prompt": { + "anyOf": [ + { + "type": "string", + "maxLength": 4100 + }, + { + "type": "null" + } + ], + "title": "Prompt", + "description": "A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`." + }, + "generation_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicGenerationMode" + }, + { + "type": "null" + } + ], + "description": "Optional generation mode hint for prompt-based music generation. Can only be used with `prompt`.", + "x-fern-ignore": true + }, + "music_prompt": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicPrompt" + }, + { + "type": "null" + } + ], + "description": "A music prompt. Deprecated. Use `composition_plan` instead.", + "deprecated": true, + "x-fern-ignore": true + }, + "lyrics_text": { + "anyOf": [ + { + "type": "string", + "maxLength": 4000 + }, + { + "type": "null" + } + ], + "title": "Lyrics Text", + "description": "The lyrics text to use for the generation.", + "x-fern-ignore": true + }, + "composition_plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicPrompt" + }, + { + "type": "null" + } + ], + "description": "A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`." + }, + "music_length_ms": { + "anyOf": [ + { + "type": "integer", + "maximum": 600000, + "minimum": 3000 + }, + { + "type": "null" + } + ], + "title": "Music Length Ms", + "description": "The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt." + }, + "model_id": { + "type": "string", + "enum": [ + "music_v1" + ], + "title": "Model Id", + "description": "The model to use for the generation.", + "default": "music_v1" + }, + "seed": { + "anyOf": [ + { + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt." + }, + "force_instrumental": { + "type": "boolean", + "title": "Force Instrumental", + "description": "If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`.", + "default": false + }, + "finetune_id": { + "anyOf": [ + { + "type": "string", + "maxLength": 100 + }, + { + "type": "null" + } + ], + "title": "Finetune Id", + "description": "The ID of the finetune to use for the generation", + "x-fern-ignore": true + }, + "finetune_strength": { + "type": "number", + "maximum": 2, + "exclusiveMinimum": 0, + "title": "Finetune Strength", + "description": "How strongly the finetune influences the generation. Defaults to 1.0 (full strength). Lower values soften the influence of the finetune, leaving more room for prompt-level steering. Only meaningful when `finetune_id` is also provided.", + "default": 1, + "x-fern-ignore": true + }, + "use_phonetic_names": { + "type": "boolean", + "title": "Use Phonetic Names", + "description": "If true, proper names in the prompt will be phonetically spelled in the lyrics for better pronunciation by the music model. The original names will be restored in word timestamps.", + "default": false, + "x-fern-ignore": true + }, + "store_for_inpainting": { + "type": "boolean", + "title": "Store For Inpainting", + "description": "Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting feature.", + "default": false + } + }, + "type": "object", + "title": "Body_Stream_composed_music_v1_music_stream_post" + }, + "Body_Submit_a_batch_call_request__v1_convai_batch_calling_submit_post": { + "properties": { + "call_name": { + "type": "string", + "title": "Call Name" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "recipients": { + "items": { + "$ref": "#/components/schemas/OutboundCallRecipient" + }, + "type": "array", + "maxItems": 10000, + "title": "Recipients" + }, + "scheduled_time_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Scheduled Time Unix" + }, + "agent_phone_number_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Phone Number Id" + }, + "whatsapp_params": { + "anyOf": [ + { + "$ref": "#/components/schemas/BatchCallWhatsAppParams" + }, + { + "type": "null" + } + ] + }, + "timezone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Timezone" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + }, + "environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment" + }, + "telephony_call_config": { + "$ref": "#/components/schemas/TelephonyCallConfig", + "default": { + "ringing_timeout_secs": 60 + } + }, + "target_concurrency_limit": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Target Concurrency Limit", + "description": "Maximum number of simultaneous calls for this batch. When set, dispatch is governed by this limit rather than workspace/agent capacity percentages." + } + }, + "type": "object", + "required": [ + "call_name", + "agent_id", + "recipients" + ], + "title": "Body_Submit_a_batch_call_request__v1_convai_batch_calling_submit_post" + }, + "Body_Text_to_dialogue__multi_voice__streaming_v1_text_to_dialogue_stream_post": { + "properties": { + "inputs": { + "items": { + "$ref": "#/components/schemas/DialogueInput" + }, + "type": "array", + "title": "Inputs", + "description": "A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error.", + "examples": [ + [ + { + "text": "Hello, how are you?", + "voice_id": "bYTqZQo3Jz7LQtmGTgwi" + }, + { + "text": "I'm doing well, thank you!", + "voice_id": "6lCwbsX1yVjD49QmpkTR" + } + ] + ] + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.", + "default": "eleven_v3" + }, + "language_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language Code", + "description": "Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned." + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModelSettingsResponseModel" + }, + { + "type": "null" + } + ], + "title": "Settings", + "description": "Settings controlling the dialogue generation.", + "examples": [ + { + "stability": 0.5 + } + ] + }, + "pronunciation_dictionary_locators": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryVersionLocatorRequestModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request", + "examples": [ + [ + { + "pronunciation_dictionary_id": "test", + "version_id": "id2" + } + ] + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.", + "examples": [ + 12345 + ] + }, + "apply_text_normalization": { + "type": "string", + "enum": [ + "auto", + "on", + "off" + ], + "title": "Apply Text Normalization", + "description": "This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped.", + "default": "auto", + "examples": [ + true + ] + } + }, + "type": "object", + "required": [ + "inputs" + ], + "title": "Body_Text_to_dialogue__multi_voice__streaming_v1_text_to_dialogue_stream_post" + }, + "Body_Text_to_dialogue__multi_voice__v1_text_to_dialogue_post": { + "properties": { + "inputs": { + "items": { + "$ref": "#/components/schemas/DialogueInput" + }, + "type": "array", + "title": "Inputs", + "description": "A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error.", + "examples": [ + [ + { + "text": "Hello, how are you?", + "voice_id": "bYTqZQo3Jz7LQtmGTgwi" + }, + { + "text": "I'm doing well, thank you!", + "voice_id": "6lCwbsX1yVjD49QmpkTR" + } + ] + ] + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.", + "default": "eleven_v3" + }, + "language_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language Code", + "description": "Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned." + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModelSettingsResponseModel" + }, + { + "type": "null" + } + ], + "title": "Settings", + "description": "Settings controlling the dialogue generation.", + "examples": [ + { + "stability": 0.5 + } + ] + }, + "pronunciation_dictionary_locators": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryVersionLocatorRequestModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request", + "examples": [ + [ + { + "pronunciation_dictionary_id": "test", + "version_id": "id2" + } + ] + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.", + "examples": [ + 12345 + ] + }, + "apply_text_normalization": { + "type": "string", + "enum": [ + "auto", + "on", + "off" + ], + "title": "Apply Text Normalization", + "description": "This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped.", + "default": "auto", + "examples": [ + true + ] + } + }, + "type": "object", + "required": [ + "inputs" + ], + "title": "Body_Text_to_dialogue__multi_voice__v1_text_to_dialogue_post" + }, + "Body_Transcribes_segments_v1_dubbing_resource__dubbing_id__transcribe_post": { + "properties": { + "segments": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Segments", + "description": "Transcribe this specific list of segments." + } + }, + "type": "object", + "required": [ + "segments" + ], + "title": "Body_Transcribes_segments_v1_dubbing_resource__dubbing_id__transcribe_post" + }, + "Body_Translates_all_or_some_segments_and_languages_v1_dubbing_resource__dubbing_id__translate_post": { + "properties": { + "segments": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Segments", + "description": "Translate only this list of segments." + }, + "languages": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Languages", + "description": "Translate only these languages for each segment." + } + }, + "type": "object", + "required": [ + "segments", + "languages" + ], + "title": "Body_Translates_all_or_some_segments_and_languages_v1_dubbing_resource__dubbing_id__translate_post" + }, + "Body_Unshare_workspace_resource_v1_workspace_resources__resource_id__unshare_post": { + "properties": { + "resource_type": { + "$ref": "#/components/schemas/WorkspaceResourceType", + "description": "Resource type of the target resource." + }, + "user_email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Email", + "description": "The email of the user or service account." + }, + "group_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Group Id", + "description": "The ID of the target group. To target the permissions principals have by default on this resource, use the value 'default'." + }, + "workspace_api_key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workspace Api Key Id", + "description": "The ID of the target workspace API key. This isn't the same as the key itself that would you pass in the header for authentication. Workspace admins can find this in the workspace settings UI." + } + }, + "type": "object", + "required": [ + "resource_type" + ], + "title": "Body_Unshare_workspace_resource_v1_workspace_resources__resource_id__unshare_post" + }, + "Body_Update_PVC_voice_sample_v1_voices_pvc__voice_id__samples__sample_id__post": { + "properties": { + "remove_background_noise": { + "type": "boolean", + "title": "Remove Background Noise", + "description": "If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.", + "default": false, + "examples": [ + true + ] + }, + "selected_speaker_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Selected Speaker Ids", + "description": "Speaker IDs to be used for PVC training. Make sure you send all the speaker IDs you want to use for PVC training in one request because the last request will override the previous ones.", + "examples": [ + "speaker_0" + ] + }, + "trim_start_time": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Trim Start Time", + "description": "The start time of the audio to be used for PVC training. Time should be in milliseconds", + "examples": [ + 0 + ] + }, + "trim_end_time": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Trim End Time", + "description": "The end time of the audio to be used for PVC training. Time should be in milliseconds", + "examples": [ + 10 + ] + }, + "file_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Name", + "description": "The name of the audio file to be used for PVC training.", + "examples": [ + "sample.mp3" + ] + } + }, + "type": "object", + "title": "Body_Update_PVC_voice_sample_v1_voices_pvc__voice_id__samples__sample_id__post" + }, + "Body_Update_Studio_project_content_v1_studio_projects__project_id__content_post": { + "properties": { + "from_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "From Url", + "description": "An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.", + "examples": [ + "https://blog.elevenlabs.io/the_first_ai_that_can_laugh/" + ] + }, + "from_document": { + "anyOf": [ + { + "type": "string", + "format": "binary" + }, + { + "type": "null" + } + ], + "title": "From Document", + "description": "An optional .epub, .pdf, .txt or similar file can be provided. If provided, we will initialize the Studio project with its content. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank." + }, + "from_content_json": { + "type": "string", + "title": "From Content Json", + "description": "\n An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.\n\n Example:\n [{\"name\": \"Chapter A\", \"blocks\": [{\"sub_type\": \"p\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"A\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"B\", \"type\": \"tts_node\"}]}, {\"sub_type\": \"h1\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"C\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"D\", \"type\": \"tts_node\"}]}]}, {\"name\": \"Chapter B\", \"blocks\": [{\"sub_type\": \"p\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"E\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"F\", \"type\": \"tts_node\"}]}, {\"sub_type\": \"h2\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"G\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"H\", \"type\": \"tts_node\"}]}]}]\n ", + "examples": [ + "[{\"name\": \"Chapter A\", \"blocks\": [{\"sub_type\": \"p\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"A\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"B\", \"type\": \"tts_node\"}]}, {\"sub_type\": \"h1\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"C\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"D\", \"type\": \"tts_node\"}]}]}, {\"name\": \"Chapter B\", \"blocks\": [{\"sub_type\": \"p\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"E\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"F\", \"type\": \"tts_node\"}]}, {\"sub_type\": \"h2\", \"nodes\": [{\"voice_id\": \"6lCwbsX1yVjD49QmpkT0\", \"text\": \"G\", \"type\": \"tts_node\"}, {\"voice_id\": \"6lCwbsX1yVjD49QmpkT1\", \"text\": \"H\", \"type\": \"tts_node\"}]}]}]" + ] + }, + "auto_convert": { + "type": "boolean", + "title": "Auto Convert", + "description": "Whether to auto convert the Studio project to audio or not.", + "default": false + } + }, + "type": "object", + "title": "Body_Update_Studio_project_content_v1_studio_projects__project_id__content_post" + }, + "Body_Update_Studio_project_v1_studio_projects__project_id__post": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the Studio project, used for identification only.", + "examples": [ + "Project 1" + ] + }, + "default_title_voice_id": { + "type": "string", + "title": "Default Title Voice Id", + "description": "The voice_id that corresponds to the default voice used for new titles.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ] + }, + "default_paragraph_voice_id": { + "type": "string", + "title": "Default Paragraph Voice Id", + "description": "The voice_id that corresponds to the default voice used for new paragraphs.", + "examples": [ + "21m00Tcm4TlvDq8ikWAM" + ] + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download.", + "examples": [ + "Romeo and Juliet" + ] + }, + "author": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Author", + "description": "An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download.", + "examples": [ + "William Shakespeare" + ] + }, + "isbn_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Isbn Number", + "description": "An optional ISBN number of the Studio project you want to create, this will be added as metadata to the mp3 file on Studio project or chapter download.", + "examples": [ + "0-306-40615-2" + ] + }, + "volume_normalization": { + "type": "boolean", + "title": "Volume Normalization", + "description": "When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements", + "default": false, + "examples": [ + false + ] + } + }, + "type": "object", + "required": [ + "name", + "default_title_voice_id", + "default_paragraph_voice_id" + ], + "title": "Body_Update_Studio_project_v1_studio_projects__project_id__post" + }, + "Body_Update_agent_branch_v1_convai_agents__agent_id__branches__branch_id__patch": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string", + "maxLength": 140, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "New name for the branch. Must be unique within the agent." + }, + "is_archived": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Archived", + "description": "Whether the branch should be archived" + }, + "protection_status": { + "anyOf": [ + { + "$ref": "#/components/schemas/BranchProtectionStatus" + }, + { + "type": "null" + } + ], + "description": "The protection level for the branch" + } + }, + "type": "object", + "title": "Body_Update_agent_branch_v1_convai_agents__agent_id__branches__branch_id__patch" + }, + "Body_Update_agent_test_folder_v1_convai_agent_testing_folders__folder_id__patch": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The new name for the folder" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Body_Update_agent_test_folder_v1_convai_agent_testing_folders__folder_id__patch" + }, + "Body_Update_audio_native_Project_content_v1_audio_native__project_id__content_post": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File", + "description": "Either txt or HTML input file containing the article content. HTML should be formatted as follows '<html><body><div><p>Your content</p><h5>More of your content</h5><p>Some more of your content</p></div></body></html>'" + }, + "auto_convert": { + "type": "boolean", + "title": "Auto Convert", + "description": "Whether to auto convert the project to audio or not.", + "default": false + }, + "auto_publish": { + "type": "boolean", + "title": "Auto Publish", + "description": "Whether to auto publish the new project snapshot after it's converted.", + "default": false + } + }, + "type": "object", + "title": "Body_Update_audio_native_Project_content_v1_audio_native__project_id__content_post" + }, + "Body_Update_audio_native_content_from_URL_v1_audio_native_content_post": { + "properties": { + "url": { + "type": "string", + "title": "Url", + "description": "URL of the page to extract content from.", + "examples": [ + "https://elevenlabs.io/blog/the_first_ai_that_can_laugh/" + ] + }, + "author": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Author", + "description": "Author used in the player and inserted at the start of the uploaded article. If not provided, the default author set in the Player settings is used." + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "Title used in the player and inserted at the top of the uploaded article. If not provided, the default title set in the Player settings is used." + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "Body_Update_audio_native_content_from_URL_v1_audio_native_content_post" + }, + "Body_Update_chapter_v1_studio_projects__project_id__chapters__chapter_id__post": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "The name of the chapter, used for identification only.", + "examples": [ + "Chapter 1" + ] + }, + "content": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChapterContentInputModel" + }, + { + "type": "null" + } + ], + "description": "The chapter content to use." + } + }, + "type": "object", + "title": "Body_Update_chapter_v1_studio_projects__project_id__chapters__chapter_id__post" + }, + "Body_Update_document_v1_convai_knowledge_base__documentation_id__patch": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "A custom, human-readable name for the document." + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content", + "description": "Updated content for the document. Only supported for text documents, URL documents with auto-sync disabled, and file documents." + } + }, + "type": "object", + "title": "Body_Update_document_v1_convai_knowledge_base__documentation_id__patch" + }, + "Body_Update_file_document_v1_convai_knowledge_base__documentation_id__update_file_patch": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File", + "description": "Documentation that the agent will have access to in order to interact with users." + } + }, + "type": "object", + "required": [ + "file" + ], + "title": "Body_Update_file_document_v1_convai_knowledge_base__documentation_id__update_file_patch" + }, + "Body_Update_member_v1_workspace_members_post": { + "properties": { + "email": { + "type": "string", + "title": "Email", + "description": "Email of the target user." + }, + "is_locked": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Locked", + "description": "Whether to lock or unlock the user account." + }, + "workspace_role": { + "anyOf": [ + { + "$ref": "#/components/schemas/SeatType" + }, + { + "type": "null" + } + ], + "description": "The workspace role of the user. This is deprecated, use `workspace_seat_type` instead.", + "deprecated": true, + "examples": [ + "workspace_admin", + "workspace_member" + ] + }, + "workspace_seat_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/SeatType" + }, + { + "type": "null" + } + ], + "description": "The workspace seat type" + } + }, + "type": "object", + "required": [ + "email" + ], + "title": "Body_Update_member_v1_workspace_members_post" + }, + "Body_Update_metadata_for_a_speaker_v1_dubbing_resource__dubbing_id__speaker__speaker_id__patch": { + "properties": { + "speaker_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Speaker Name", + "description": "Name to attribute to this speaker." + }, + "voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Id", + "description": "Either the identifier of a voice from the ElevenLabs voice library, or one of ['track-clone', 'clip-clone']." + }, + "voice_stability": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Voice Stability", + "description": "For models that support it, the voice similarity value to use. This will default to 0.65, with a valid range of [0.0, 1.0]." + }, + "voice_similarity": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Voice Similarity", + "description": "For models that support it, the voice similarity value to use. This will default to 1.0, with a valid range of [0.0, 1.0]." + }, + "voice_style": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Voice Style", + "description": "For models that support it, the voice style value to use. This will default to 1.0, with a valid range of [0.0, 1.0]." + }, + "languages": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Languages", + "description": "Languages to apply these changes to. If empty, will apply to all languages." + } + }, + "type": "object", + "title": "Body_Update_metadata_for_a_speaker_v1_dubbing_resource__dubbing_id__speaker__speaker_id__patch" + }, + "Body_Update_order_v1_productions_orders__order_id__patch": { + "properties": { + "request": { + "$ref": "#/components/schemas/UpdateOrderRequest" + } + }, + "type": "object", + "required": [ + "request" + ], + "title": "Body_Update_order_v1_productions_orders__order_id__patch" + }, + "Body_Update_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__patch": { + "properties": { + "archived": { + "type": "boolean", + "title": "Archived", + "description": "Whether to archive the pronunciation dictionary.", + "examples": [ + true + ] + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the pronunciation dictionary, used for identification only.", + "examples": [ + "My Dictionary" + ] + } + }, + "type": "object", + "title": "Body_Update_pronunciation_dictionary_v1_pronunciation_dictionaries__pronunciation_dictionary_id__patch" + }, + "Body_Update_workspace_webhook_v1_workspace_webhooks__webhook_id__patch": { + "properties": { + "is_disabled": { + "type": "boolean", + "title": "Is Disabled", + "description": "Whether to disable or enable the webhook", + "examples": [ + true + ] + }, + "name": { + "type": "string", + "title": "Name", + "description": "The display name of the webhook (used for display purposes only).", + "examples": [ + "My Callback Webhook" + ] + }, + "retry_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Retry Enabled", + "description": "Whether to enable automatic retries for transient failures (5xx, 429, timeout)", + "examples": [ + true + ] + }, + "request_headers": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Request Headers", + "description": "A list of request headers to include with the webhook delivery (optional)" + } + }, + "type": "object", + "required": [ + "is_disabled", + "name" + ], + "title": "Body_Update_workspace_webhook_v1_workspace_webhooks__webhook_id__patch" + }, + "Body_Upload_file_v1_convai_conversations__conversation_id__files_post": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File", + "description": "Image or PDF file to upload" + } + }, + "type": "object", + "required": [ + "file" + ], + "title": "Body_Upload_file_v1_convai_conversations__conversation_id__files_post" + }, + "Body_Upload_music_v1_music_upload_post": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File", + "description": "The audio file to upload." + }, + "extract_composition_plan": { + "type": "boolean", + "title": "Extract Composition Plan", + "description": "Whether to generate and return the composition plan for the uploaded song. If True, the response will include the composition_plan but will increase the latency.", + "default": false + } + }, + "type": "object", + "required": [ + "file" + ], + "title": "Body_Upload_music_v1_music_upload_post" + }, + "Body_Upsert_order_item_v1_productions_orders__order_id__items_post": { + "properties": { + "request": { + "$ref": "#/components/schemas/UpsertOrderItemRequest" + } + }, + "type": "object", + "required": [ + "request" + ], + "title": "Body_Upsert_order_item_v1_productions_orders__order_id__items_post" + }, + "Body_Verify_PVC_voice_captcha_v1_voices_pvc__voice_id__captcha_post": { + "properties": { + "recording": { + "type": "string", + "format": "binary", + "title": "Recording", + "description": "Audio recording of the user" + } + }, + "type": "object", + "required": [ + "recording" + ], + "title": "Body_Verify_PVC_voice_captcha_v1_voices_pvc__voice_id__captcha_post" + }, + "Body_Video_to_Music_v1_music_video_to_music_post": { + "properties": { + "videos": { + "items": { + "type": "string", + "format": "binary" + }, + "type": "array", + "maxItems": 10, + "minItems": 1, + "title": "Videos", + "description": "\n One or more video files sent via FormData array (multipart/form-data). They will be combined into one codec in order.\n A maximum of 10 videos is allowed, where the total size of the combined video is limited to 200MB.\n In total, the video can be up to 600 seconds long. Note that combining multiple videos may increase the request duration significantly. If possible, combine the videos beforehand.\n " + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 1000, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Optional text description of the music you want. A maximum of 1000 characters is allowed." + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 10, + "minItems": 0, + "title": "Tags", + "description": "Optional list of style tags (e.g. ['upbeat', 'cinematic']). A maximum of 10 tags is allowed.", + "default": [] + }, + "model_id": { + "type": "string", + "enum": [ + "music_v1" + ], + "title": "Model Id", + "description": "The model to use for the generation.", + "default": "music_v1" + }, + "sign_with_c2pa": { + "type": "boolean", + "title": "Sign With C2Pa", + "description": "Whether to sign the generated song with C2PA. Applicable only for mp3 files.", + "default": false + } + }, + "type": "object", + "required": [ + "videos" + ], + "title": "Body_Video_to_Music_v1_music_video_to_music_post" + }, + "Body_create_service_account_api_key_v1_service_accounts__service_account_user_id__api_keys_post": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "permissions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PermissionType" + }, + "type": "array" + }, + { + "type": "string", + "const": "all" + } + ], + "title": "Permissions", + "description": "The permissions of the XI API." + }, + "character_limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Character Limit", + "description": "The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit." + }, + "allowed_ips": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 100, + "minItems": 1 + }, + { + "type": "null" + } + ], + "title": "Allowed Ips", + "description": "List of IP addresses or CIDR ranges allowed to use this API key. Each entry may be a CIDR range (e.g. '10.0.0.0/24') or a bare IP address (normalized to /32 or /128). On create, omit or pass null to allow all IPs. On update, omit to leave the whitelist unchanged, or pass \"clear\" to remove it." + } + }, + "type": "object", + "required": [ + "name", + "permissions" + ], + "title": "Body_create_service_account_api_key_v1_service_accounts__service_account_user_id__api_keys_post" + }, + "Body_edit_service_account_api_key_v1_service_accounts__service_account_user_id__api_keys__api_key_id__patch": { + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Is Enabled", + "description": "Whether to enable or disable the API key." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the XI API key to use (used for identification purposes only).", + "examples": [ + "Sneaky Fox" + ] + }, + "permissions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PermissionType" + }, + "type": "array" + }, + { + "type": "string", + "const": "all" + } + ], + "title": "Permissions", + "description": "The permissions of the XI API." + }, + "character_limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Character Limit", + "description": "The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit." + }, + "allowed_ips": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 100, + "minItems": 1 + }, + { + "type": "string", + "enum": [ + "clear", + "no_update" + ] + } + ], + "title": "Allowed Ips", + "description": "List of IP addresses or CIDR ranges allowed to use this API key. Each entry may be a CIDR range (e.g. '10.0.0.0/24') or a bare IP address (normalized to /32 or /128). On create, omit or pass null to allow all IPs. On update, omit to leave the whitelist unchanged, or pass \"clear\" to remove it.", + "default": "no_update" + } + }, + "type": "object", + "required": [ + "is_enabled", + "name", + "permissions" + ], + "title": "Body_edit_service_account_api_key_v1_service_accounts__service_account_user_id__api_keys__api_key_id__patch" + }, + "Body_text_to_dialogue_full_with_timestamps": { + "properties": { + "inputs": { + "items": { + "$ref": "#/components/schemas/DialogueInput" + }, + "type": "array", + "title": "Inputs", + "description": "A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error.", + "examples": [ + [ + { + "text": "Hello, how are you?", + "voice_id": "bYTqZQo3Jz7LQtmGTgwi" + }, + { + "text": "I'm doing well, thank you!", + "voice_id": "6lCwbsX1yVjD49QmpkTR" + } + ] + ] + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.", + "default": "eleven_v3" + }, + "language_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language Code", + "description": "Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned." + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModelSettingsResponseModel" + }, + { + "type": "null" + } + ], + "title": "Settings", + "description": "Settings controlling the dialogue generation.", + "examples": [ + { + "stability": 0.5 + } + ] + }, + "pronunciation_dictionary_locators": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryVersionLocatorRequestModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request", + "examples": [ + [ + { + "pronunciation_dictionary_id": "test", + "version_id": "id2" + } + ] + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.", + "examples": [ + 12345 + ] + }, + "apply_text_normalization": { + "type": "string", + "enum": [ + "auto", + "on", + "off" + ], + "title": "Apply Text Normalization", + "description": "This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped.", + "default": "auto", + "examples": [ + true + ] + } + }, + "type": "object", + "required": [ + "inputs" + ], + "title": "Body_text_to_dialogue_full_with_timestamps" + }, + "Body_text_to_dialogue_stream_with_timestamps": { + "properties": { + "inputs": { + "items": { + "$ref": "#/components/schemas/DialogueInput" + }, + "type": "array", + "title": "Inputs", + "description": "A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error.", + "examples": [ + [ + { + "text": "Hello, how are you?", + "voice_id": "bYTqZQo3Jz7LQtmGTgwi" + }, + { + "text": "I'm doing well, thank you!", + "voice_id": "6lCwbsX1yVjD49QmpkTR" + } + ] + ] + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.", + "default": "eleven_v3" + }, + "language_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language Code", + "description": "Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned." + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModelSettingsResponseModel" + }, + { + "type": "null" + } + ], + "title": "Settings", + "description": "Settings controlling the dialogue generation.", + "examples": [ + { + "stability": 0.5 + } + ] + }, + "pronunciation_dictionary_locators": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryVersionLocatorRequestModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request", + "examples": [ + [ + { + "pronunciation_dictionary_id": "test", + "version_id": "id2" + } + ] + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.", + "examples": [ + 12345 + ] + }, + "apply_text_normalization": { + "type": "string", + "enum": [ + "auto", + "on", + "off" + ], + "title": "Apply Text Normalization", + "description": "This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped.", + "default": "auto", + "examples": [ + true + ] + } + }, + "type": "object", + "required": [ + "inputs" + ], + "title": "Body_text_to_dialogue_stream_with_timestamps" + }, + "Body_text_to_speech_full": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The text that will get converted into speech.", + "examples": [ + "This is a test for the API of ElevenLabs." + ] + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.", + "default": "eleven_multilingual_v2" + }, + "language_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language Code", + "description": "Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned." + }, + "voice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/VoiceSettingsResponseModel" + }, + { + "type": "null" + } + ], + "description": "Voice settings overriding stored settings for the given voice. They are applied only on the given request." + }, + "pronunciation_dictionary_locators": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryVersionLocatorRequestModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request", + "examples": [ + [ + { + "pronunciation_dictionary_id": "test", + "version_id": "id2" + } + ] + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.", + "examples": [ + 12345 + ] + }, + "previous_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Previous Text", + "description": "The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.", + "examples": [ + "In the heart of a lush valley surrounded by towering mountains lies the quaint village of Willowbrook." + ] + }, + "next_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Text", + "description": "The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.", + "examples": [ + "The Willowbrook Festival, held every spring, celebrates the blossoming of the wild bluebells that carpet the nearby forest floors, creating a breathtaking sea of blue under the canopy of fresh green leaves." + ] + }, + "previous_request_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Previous Request Ids", + "description": "A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send.", + "examples": [ + [ + "09bOJkdYVjKy2oOiiVtR", + "0p2uKqOnZyce22SPZ9d5", + "1KYvY8WZAKmcjCJ1mvVB" + ] + ] + }, + "next_request_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Next Request Ids", + "description": "A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send.", + "examples": [ + [ + "3tPgBrD1UdW3snUkGw1K", + "4D1jAxiRFkolBNUGzXkU", + "4c8Z4aWliVR2oipYRXhj" + ] + ] + }, + "use_pvc_as_ivc": { + "type": "boolean", + "title": "Use Pvc As Ivc", + "description": "If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions.", + "default": false, + "deprecated": true, + "examples": [ + true + ] + }, + "apply_text_normalization": { + "type": "string", + "enum": [ + "auto", + "on", + "off" + ], + "title": "Apply Text Normalization", + "description": "This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped.", + "default": "auto", + "examples": [ + true + ] + }, + "apply_language_text_normalization": { + "type": "boolean", + "title": "Apply Language Text Normalization", + "description": "This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese.", + "default": false, + "examples": [ + true + ] + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "Body_text_to_speech_full" + }, + "Body_text_to_speech_full_with_timestamps": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The text that will get converted into speech.", + "examples": [ + "This is a test for the API of ElevenLabs." + ] + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.", + "default": "eleven_multilingual_v2" + }, + "language_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language Code", + "description": "Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned." + }, + "voice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/VoiceSettingsResponseModel" + }, + { + "type": "null" + } + ], + "description": "Voice settings overriding stored settings for the given voice. They are applied only on the given request." + }, + "pronunciation_dictionary_locators": { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryVersionLocatorRequestModel" + }, + "type": "array", + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request", + "examples": [ + [ + { + "pronunciation_dictionary_id": "test", + "version_id": "id2" + } + ] + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.", + "examples": [ + 12345 + ] + }, + "previous_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Previous Text", + "description": "The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.", + "examples": [ + "In the heart of a lush valley surrounded by towering mountains lies the quaint village of Willowbrook." + ] + }, + "next_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Text", + "description": "The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.", + "examples": [ + "The Willowbrook Festival, held every spring, celebrates the blossoming of the wild bluebells that carpet the nearby forest floors, creating a breathtaking sea of blue under the canopy of fresh green leaves." + ] + }, + "previous_request_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Previous Request Ids", + "description": "A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send.", + "examples": [ + [ + "09bOJkdYVjKy2oOiiVtR", + "0p2uKqOnZyce22SPZ9d5", + "1KYvY8WZAKmcjCJ1mvVB" + ] + ] + }, + "next_request_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Next Request Ids", + "description": "A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send.", + "examples": [ + [ + "3tPgBrD1UdW3snUkGw1K", + "4D1jAxiRFkolBNUGzXkU", + "4c8Z4aWliVR2oipYRXhj" + ] + ] + }, + "use_pvc_as_ivc": { + "type": "boolean", + "title": "Use Pvc As Ivc", + "description": "If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions.", + "default": false, + "deprecated": true, + "examples": [ + true + ] + }, + "apply_text_normalization": { + "type": "string", + "enum": [ + "auto", + "on", + "off" + ], + "title": "Apply Text Normalization", + "description": "This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped.", + "default": "auto", + "examples": [ + true + ] + }, + "apply_language_text_normalization": { + "type": "boolean", + "title": "Apply Language Text Normalization", + "description": "This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese.", + "default": false, + "examples": [ + true + ] + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "Body_text_to_speech_full_with_timestamps" + }, + "Body_text_to_speech_stream": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The text that will get converted into speech.", + "examples": [ + "This is a test for the API of ElevenLabs." + ] + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.", + "default": "eleven_multilingual_v2" + }, + "language_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language Code", + "description": "Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned." + }, + "voice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/VoiceSettingsResponseModel" + }, + { + "type": "null" + } + ], + "description": "Voice settings overriding stored settings for the given voice. They are applied only on the given request." + }, + "pronunciation_dictionary_locators": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryVersionLocatorRequestModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request", + "examples": [ + [ + { + "pronunciation_dictionary_id": "test", + "version_id": "id2" + } + ] + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.", + "examples": [ + 12345 + ] + }, + "previous_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Previous Text", + "description": "The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.", + "examples": [ + "In the heart of a lush valley surrounded by towering mountains lies the quaint village of Willowbrook." + ] + }, + "next_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Text", + "description": "The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.", + "examples": [ + "The Willowbrook Festival, held every spring, celebrates the blossoming of the wild bluebells that carpet the nearby forest floors, creating a breathtaking sea of blue under the canopy of fresh green leaves." + ] + }, + "previous_request_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Previous Request Ids", + "description": "A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send.", + "examples": [ + [ + "09bOJkdYVjKy2oOiiVtR", + "0p2uKqOnZyce22SPZ9d5", + "1KYvY8WZAKmcjCJ1mvVB" + ] + ] + }, + "next_request_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Next Request Ids", + "description": "A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send.", + "examples": [ + [ + "3tPgBrD1UdW3snUkGw1K", + "4D1jAxiRFkolBNUGzXkU", + "4c8Z4aWliVR2oipYRXhj" + ] + ] + }, + "use_pvc_as_ivc": { + "type": "boolean", + "title": "Use Pvc As Ivc", + "description": "If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions.", + "default": false, + "deprecated": true, + "examples": [ + true + ] + }, + "apply_text_normalization": { + "type": "string", + "enum": [ + "auto", + "on", + "off" + ], + "title": "Apply Text Normalization", + "description": "This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped.", + "default": "auto", + "examples": [ + true + ] + }, + "apply_language_text_normalization": { + "type": "boolean", + "title": "Apply Language Text Normalization", + "description": "This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese.", + "default": false, + "examples": [ + true + ] + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "Body_text_to_speech_stream" + }, + "Body_text_to_speech_stream_with_timestamps": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The text that will get converted into speech.", + "examples": [ + "This is a test for the API of ElevenLabs." + ] + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.", + "default": "eleven_multilingual_v2" + }, + "language_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language Code", + "description": "Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support provided language code, an error will be returned." + }, + "voice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/VoiceSettingsResponseModel" + }, + { + "type": "null" + } + ], + "description": "Voice settings overriding stored settings for the given voice. They are applied only on the given request." + }, + "pronunciation_dictionary_locators": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryVersionLocatorRequestModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Pronunciation Dictionary Locators", + "description": "A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request", + "examples": [ + [ + { + "pronunciation_dictionary_id": "test", + "version_id": "id2" + } + ] + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.", + "examples": [ + 12345 + ] + }, + "previous_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Previous Text", + "description": "The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.", + "examples": [ + "In the heart of a lush valley surrounded by towering mountains lies the quaint village of Willowbrook." + ] + }, + "next_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Text", + "description": "The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.", + "examples": [ + "The Willowbrook Festival, held every spring, celebrates the blossoming of the wild bluebells that carpet the nearby forest floors, creating a breathtaking sea of blue under the canopy of fresh green leaves." + ] + }, + "previous_request_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Previous Request Ids", + "description": "A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send.", + "examples": [ + [ + "09bOJkdYVjKy2oOiiVtR", + "0p2uKqOnZyce22SPZ9d5", + "1KYvY8WZAKmcjCJ1mvVB" + ] + ] + }, + "next_request_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Next Request Ids", + "description": "A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send.", + "examples": [ + [ + "3tPgBrD1UdW3snUkGw1K", + "4D1jAxiRFkolBNUGzXkU", + "4c8Z4aWliVR2oipYRXhj" + ] + ] + }, + "use_pvc_as_ivc": { + "type": "boolean", + "title": "Use Pvc As Ivc", + "description": "If true, we won't use PVC version of the voice for the generation but the IVC version. This is a temporary workaround for higher latency in PVC versions.", + "default": false, + "deprecated": true, + "examples": [ + true + ] + }, + "apply_text_normalization": { + "type": "string", + "enum": [ + "auto", + "on", + "off" + ], + "title": "Apply Text Normalization", + "description": "This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped.", + "default": "auto", + "examples": [ + true + ] + }, + "apply_language_text_normalization": { + "type": "boolean", + "title": "Apply Language Text Normalization", + "description": "This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese.", + "default": false, + "examples": [ + true + ] + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "Body_text_to_speech_stream_with_timestamps" + }, + "BranchProtectionStatus": { + "type": "string", + "enum": [ + "writer_perms_required", + "admin_perms_required" + ], + "title": "BranchProtectionStatus", + "default": "writer_perms_required" + }, + "BreakdownTypes": { + "type": "string", + "enum": [ + "none", + "voice", + "voice_multiplier", + "user", + "groups", + "api_keys", + "all_api_keys", + "product_type", + "model", + "resource", + "request_queue", + "region", + "subresource_id", + "reporting_workspace_id", + "has_api_key", + "request_source" + ], + "title": "BreakdownTypes", + "description": "How to break down the information. Cannot be \"user\" or \"api_key\" if include_workspace_metrics is False." + }, + "BuiltInTools-Input": { + "properties": { + "end_call": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The end call tool" + }, + "language_detection": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The language detection tool" + }, + "transfer_to_agent": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The transfer to agent tool" + }, + "transfer_to_number": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The transfer to number tool" + }, + "skip_turn": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The skip turn tool" + }, + "play_keypad_touch_tone": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The play DTMF tool" + }, + "voicemail_detection": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The voicemail detection tool" + } + }, + "type": "object", + "title": "BuiltInTools" + }, + "BuiltInTools-Output": { + "properties": { + "end_call": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The end call tool" + }, + "language_detection": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The language detection tool" + }, + "transfer_to_agent": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The transfer to agent tool" + }, + "transfer_to_number": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The transfer to number tool" + }, + "skip_turn": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The skip turn tool" + }, + "play_keypad_touch_tone": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The play DTMF tool" + }, + "voicemail_detection": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The voicemail detection tool" + } + }, + "type": "object", + "title": "BuiltInTools" + }, + "BuiltInToolsWorkflowOverride-Input": { + "properties": { + "end_call": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The end call tool" + }, + "language_detection": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The language detection tool" + }, + "transfer_to_agent": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The transfer to agent tool" + }, + "transfer_to_number": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The transfer to number tool" + }, + "skip_turn": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The skip turn tool" + }, + "play_keypad_touch_tone": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The play DTMF tool" + }, + "voicemail_detection": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ], + "description": "The voicemail detection tool" + } + }, + "type": "object", + "title": "BuiltInToolsWorkflowOverride" + }, + "BuiltInToolsWorkflowOverride-Output": { + "properties": { + "end_call": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The end call tool" + }, + "language_detection": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The language detection tool" + }, + "transfer_to_agent": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The transfer to agent tool" + }, + "transfer_to_number": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The transfer to number tool" + }, + "skip_turn": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The skip turn tool" + }, + "play_keypad_touch_tone": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The play DTMF tool" + }, + "voicemail_detection": { + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "type": "null" + } + ], + "description": "The voicemail detection tool" + } + }, + "type": "object", + "title": "BuiltInToolsWorkflowOverride" + }, + "CancelCalendarEventParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "cancel_calendar_event", + "title": "Smb Tool Type", + "default": "cancel_calendar_event" + } + }, + "type": "object", + "title": "CancelCalendarEventParams" + }, + "CancelGroupSessionForAllParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "cancel_group_session_for_all", + "title": "Smb Tool Type", + "default": "cancel_group_session_for_all" + } + }, + "type": "object", + "title": "CancelGroupSessionForAllParams", + "description": "Cancel an entire group session and notify every registered participant.\nDestructive -- prefer ``cancel_group_session_registration`` for cancelling\na single attendee." + }, + "CancelGroupSessionRegistrationParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "cancel_group_session_registration", + "title": "Smb Tool Type", + "default": "cancel_group_session_registration" + } + }, + "type": "object", + "title": "CancelGroupSessionRegistrationParams", + "description": "Cancel a single client's registration for a group session." + }, + "CanvasPlacement": { + "properties": { + "x_relative": { + "type": "number", + "title": "X Relative", + "default": 0.5 + }, + "y_relative": { + "type": "number", + "title": "Y Relative", + "default": 0.5 + }, + "scale_x": { + "type": "number", + "title": "Scale X", + "default": 1 + }, + "scale_y": { + "type": "number", + "title": "Scale Y", + "default": 1 + }, + "pivot_x": { + "type": "number", + "title": "Pivot X", + "default": 0 + }, + "pivot_y": { + "type": "number", + "title": "Pivot Y", + "default": 0 + }, + "skew_x": { + "type": "number", + "title": "Skew X", + "default": 0 + }, + "skew_y": { + "type": "number", + "title": "Skew Y", + "default": 0 + }, + "crop_top": { + "type": "number", + "title": "Crop Top", + "default": 0 + }, + "crop_right": { + "type": "number", + "title": "Crop Right", + "default": 0 + }, + "crop_bottom": { + "type": "number", + "title": "Crop Bottom", + "default": 0 + }, + "crop_left": { + "type": "number", + "title": "Crop Left", + "default": 0 + }, + "flip_x": { + "type": "boolean", + "title": "Flip X", + "default": false + }, + "flip_y": { + "type": "boolean", + "title": "Flip Y", + "default": false + } + }, + "type": "object", + "title": "CanvasPlacement", + "description": "Defines asset positioning and transformation on canvas." + }, + "CaptionStyleCharacterAnimationModel": { + "properties": { + "enter_type": { + "type": "string", + "enum": [ + "none", + "fade" + ], + "title": "Enter Type" + }, + "exit_type": { + "type": "string", + "enum": [ + "none", + "fade" + ], + "title": "Exit Type" + } + }, + "type": "object", + "required": [ + "enter_type", + "exit_type" + ], + "title": "CaptionStyleCharacterAnimationModel" + }, + "CaptionStyleHorizontalPlacementModel": { + "properties": { + "align": { + "type": "string", + "enum": [ + "left", + "center", + "right" + ], + "title": "Align" + }, + "translate_pct": { + "type": "number", + "title": "Translate Pct" + } + }, + "type": "object", + "required": [ + "align", + "translate_pct" + ], + "title": "CaptionStyleHorizontalPlacementModel" + }, + "CaptionStyleModel": { + "properties": { + "template": { + "anyOf": [ + { + "$ref": "#/components/schemas/CaptionStyleTemplateModel" + }, + { + "type": "null" + } + ] + }, + "text_font": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text Font" + }, + "text_scale": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Text Scale" + }, + "text_color": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text Color" + }, + "text_align": { + "anyOf": [ + { + "type": "string", + "enum": [ + "start", + "center", + "end" + ] + }, + { + "type": "null" + } + ], + "title": "Text Align" + }, + "text_style": { + "anyOf": [ + { + "type": "string", + "enum": [ + "normal", + "italic" + ] + }, + { + "type": "null" + } + ], + "title": "Text Style" + }, + "text_weight": { + "anyOf": [ + { + "type": "string", + "enum": [ + "normal", + "bold", + "900" + ] + }, + { + "type": "null" + } + ], + "title": "Text Weight" + }, + "text_transform": { + "anyOf": [ + { + "type": "string", + "enum": [ + "none", + "uppercase" + ] + }, + { + "type": "null" + } + ], + "title": "Text Transform" + }, + "text_blend_mode": { + "anyOf": [ + { + "type": "string", + "enum": [ + "normal", + "difference", + "multiply" + ] + }, + { + "type": "null" + } + ], + "title": "Text Blend Mode" + }, + "text_shadow": { + "anyOf": [ + { + "$ref": "#/components/schemas/StudioTextStyleShadowModel" + }, + { + "type": "null" + } + ] + }, + "text_outline": { + "anyOf": [ + { + "$ref": "#/components/schemas/StudioTextStyleOutlineModel" + }, + { + "type": "null" + } + ] + }, + "background_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Background Enabled" + }, + "background_color": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Background Color" + }, + "background_opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Background Opacity" + }, + "word_highlights_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Word Highlights Enabled" + }, + "word_highlights_color": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Word Highlights Color" + }, + "word_highlights_background_color": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Word Highlights Background Color" + }, + "word_highlights_opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Word Highlights Opacity" + }, + "section_animation": { + "anyOf": [ + { + "$ref": "#/components/schemas/CaptionStyleSectionAnimationModel" + }, + { + "type": "null" + } + ] + }, + "word_animation": { + "anyOf": [ + { + "$ref": "#/components/schemas/CaptionStyleWordAnimationModel" + }, + { + "type": "null" + } + ] + }, + "character_animation": { + "anyOf": [ + { + "$ref": "#/components/schemas/CaptionStyleCharacterAnimationModel" + }, + { + "type": "null" + } + ] + }, + "width_pct": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Width Pct" + }, + "horizontal_placement": { + "anyOf": [ + { + "$ref": "#/components/schemas/CaptionStyleHorizontalPlacementModel" + }, + { + "type": "null" + } + ] + }, + "vertical_placement": { + "anyOf": [ + { + "$ref": "#/components/schemas/CaptionStyleVerticalPlacementModel" + }, + { + "type": "null" + } + ] + }, + "auto_break_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Auto Break Enabled" + }, + "max_lines_per_section": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Lines Per Section" + }, + "max_words_per_line": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Words Per Line" + } + }, + "type": "object", + "title": "CaptionStyleModel" + }, + "CaptionStyleSectionAnimationModel": { + "properties": { + "enter_type": { + "type": "string", + "enum": [ + "none", + "fade", + "scale" + ], + "title": "Enter Type" + }, + "exit_type": { + "type": "string", + "enum": [ + "none", + "fade", + "scale" + ], + "title": "Exit Type" + } + }, + "type": "object", + "required": [ + "enter_type", + "exit_type" + ], + "title": "CaptionStyleSectionAnimationModel" + }, + "CaptionStyleTemplateModel": { + "properties": { + "key": { + "type": "string", + "title": "Key" + }, + "label": { + "type": "string", + "title": "Label" + }, + "requires_high_fps": { + "type": "boolean", + "title": "Requires High Fps", + "default": false + } + }, + "type": "object", + "required": [ + "key", + "label" + ], + "title": "CaptionStyleTemplateModel" + }, + "CaptionStyleVerticalPlacementModel": { + "properties": { + "align": { + "type": "string", + "enum": [ + "top", + "center", + "bottom" + ], + "title": "Align" + }, + "translate_pct": { + "type": "number", + "title": "Translate Pct" + } + }, + "type": "object", + "required": [ + "align", + "translate_pct" + ], + "title": "CaptionStyleVerticalPlacementModel" + }, + "CaptionStyleWordAnimationModel": { + "properties": { + "enter_type": { + "type": "string", + "enum": [ + "none", + "fade", + "scale" + ], + "title": "Enter Type" + }, + "exit_type": { + "type": "string", + "enum": [ + "none", + "fade", + "scale" + ], + "title": "Exit Type" + } + }, + "type": "object", + "required": [ + "enter_type", + "exit_type" + ], + "title": "CaptionStyleWordAnimationModel" + }, + "ChapterContentBlockExtendableNodeResponseModel": { + "properties": { + "type": { + "type": "string", + "const": "_other", + "title": "Type" + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "ChapterContentBlockExtendableNodeResponseModel", + "description": "Not used. Make sure you anticipate new types in the future." + }, + "ChapterContentBlockInputModel": { + "properties": { + "sub_type": { + "anyOf": [ + { + "type": "string", + "enum": [ + "p", + "h1", + "h2", + "h3" + ] + }, + { + "type": "null" + } + ], + "title": "Sub Type" + }, + "nodes": { + "items": { + "$ref": "#/components/schemas/ChapterContentParagraphTtsNodeInputModel" + }, + "type": "array", + "title": "Nodes" + }, + "block_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Block Id" + } + }, + "type": "object", + "required": [ + "nodes" + ], + "title": "ChapterContentBlockInputModel" + }, + "ChapterContentBlockResponseModel": { + "properties": { + "block_id": { + "type": "string", + "title": "Block Id" + }, + "nodes": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChapterContentBlockTtsNodeResponseModel" + }, + { + "$ref": "#/components/schemas/ChapterContentBlockExtendableNodeResponseModel" + } + ] + }, + "type": "array", + "title": "Nodes" + } + }, + "type": "object", + "required": [ + "block_id", + "nodes" + ], + "title": "ChapterContentBlockResponseModel" + }, + "ChapterContentBlockTtsNodeResponseModel": { + "properties": { + "type": { + "type": "string", + "const": "tts_node", + "title": "Type" + }, + "voice_id": { + "type": "string", + "title": "Voice Id" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "type": "object", + "required": [ + "type", + "voice_id", + "text" + ], + "title": "ChapterContentBlockTtsNodeResponseModel" + }, + "ChapterContentInputModel": { + "properties": { + "blocks": { + "items": { + "$ref": "#/components/schemas/ChapterContentBlockInputModel" + }, + "type": "array", + "title": "Blocks" + } + }, + "type": "object", + "required": [ + "blocks" + ], + "title": "ChapterContentInputModel" + }, + "ChapterContentParagraphTtsNodeInputModel": { + "properties": { + "type": { + "type": "string", + "const": "tts_node", + "title": "Type" + }, + "text": { + "type": "string", + "title": "Text" + }, + "voice_id": { + "type": "string", + "title": "Voice Id" + } + }, + "type": "object", + "required": [ + "type", + "text", + "voice_id" + ], + "title": "ChapterContentParagraphTtsNodeInputModel" + }, + "ChapterContentResponseModel": { + "properties": { + "blocks": { + "items": { + "$ref": "#/components/schemas/ChapterContentBlockResponseModel" + }, + "type": "array", + "title": "Blocks" + } + }, + "type": "object", + "required": [ + "blocks" + ], + "title": "ChapterContentResponseModel" + }, + "ChapterResponseModel": { + "properties": { + "chapter_id": { + "type": "string", + "title": "Chapter Id", + "description": "The ID of the chapter." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the chapter." + }, + "last_conversion_date_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Last Conversion Date Unix", + "description": "The last conversion date of the chapter." + }, + "conversion_progress": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Conversion Progress", + "description": "The conversion progress of the chapter." + }, + "can_be_downloaded": { + "type": "boolean", + "title": "Can Be Downloaded", + "description": "Whether the chapter can be downloaded." + }, + "state": { + "type": "string", + "enum": [ + "default", + "converting" + ], + "title": "State", + "description": "The state of the chapter." + }, + "has_video": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Has Video", + "description": "Whether the chapter has a video." + }, + "has_visual_content": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Has Visual Content", + "description": "Whether the chapter has any visual content (video, image, or text clips)." + }, + "voice_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Voice Ids", + "description": "List of voice ids used by the chapter" + }, + "statistics": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChapterStatisticsResponseModel" + }, + { + "type": "null" + } + ], + "description": "The statistics of the chapter." + }, + "last_conversion_error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Conversion Error", + "description": "The last conversion error of the chapter." + } + }, + "type": "object", + "required": [ + "chapter_id", + "name", + "can_be_downloaded", + "state" + ], + "title": "ChapterResponseModel", + "example": { + "can_be_downloaded": true, + "chapter_id": "aw1NgEzBg83R7vgmiJt6", + "conversion_progress": 0.5, + "last_conversion_date_unix": 1714204800, + "last_conversion_error": "Error message", + "name": "Chapter 1", + "state": "converting", + "statistics": { + "characters_converted": 500, + "characters_unconverted": 1000, + "credits_needed_to_convert": 1000, + "paragraphs_converted": 20, + "paragraphs_unconverted": 10, + "voice_statistics": [ + { + "characters_converted": 300, + "characters_unconverted": 600, + "voice_id": "voice123" + }, + { + "characters_converted": 200, + "characters_unconverted": 400, + "voice_id": "voice456" + } + ] + } + } + }, + "ChapterSnapshotExtendedResponseModel": { + "properties": { + "chapter_snapshot_id": { + "type": "string", + "title": "Chapter Snapshot Id", + "description": "The ID of the chapter snapshot." + }, + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the project." + }, + "chapter_id": { + "type": "string", + "title": "Chapter Id", + "description": "The ID of the chapter." + }, + "created_at_unix": { + "type": "integer", + "title": "Created At Unix", + "description": "The creation date of the chapter snapshot." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the chapter snapshot." + }, + "character_alignments": { + "items": { + "$ref": "#/components/schemas/CharacterAlignmentModel" + }, + "type": "array", + "title": "Character Alignments" + } + }, + "type": "object", + "required": [ + "chapter_snapshot_id", + "project_id", + "chapter_id", + "created_at_unix", + "name", + "character_alignments" + ], + "title": "ChapterSnapshotExtendedResponseModel", + "example": { + "chapter_id": "aw1NgEzBg83R7vgmiJt3", + "chapter_snapshot_id": "aw1NgEzBg83R7vgmiJt1", + "character_alignments": [], + "created_at_unix": 1714204800, + "name": "My Chapter Snapshot", + "project_id": "aw1NgEzBg83R7vgmiJt2" + } + }, + "ChapterSnapshotResponseModel": { + "properties": { + "chapter_snapshot_id": { + "type": "string", + "title": "Chapter Snapshot Id", + "description": "The ID of the chapter snapshot." + }, + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the project." + }, + "chapter_id": { + "type": "string", + "title": "Chapter Id", + "description": "The ID of the chapter." + }, + "created_at_unix": { + "type": "integer", + "title": "Created At Unix", + "description": "The creation date of the chapter snapshot." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the chapter snapshot." + } + }, + "type": "object", + "required": [ + "chapter_snapshot_id", + "project_id", + "chapter_id", + "created_at_unix", + "name" + ], + "title": "ChapterSnapshotResponseModel", + "example": { + "chapter_id": "aw1NgEzBg83R7vgmiJt3", + "chapter_snapshot_id": "aw1NgEzBg83R7vgmiJt1", + "created_at_unix": 1714204800, + "name": "My Chapter Snapshot", + "project_id": "aw1NgEzBg83R7vgmiJt2" + } + }, + "ChapterSnapshotsResponseModel": { + "properties": { + "snapshots": { + "items": { + "$ref": "#/components/schemas/ChapterSnapshotResponseModel" + }, + "type": "array", + "title": "Snapshots", + "description": "List of chapter snapshots." + } + }, + "type": "object", + "required": [ + "snapshots" + ], + "title": "ChapterSnapshotsResponseModel", + "example": { + "snapshots": [ + { + "chapter_id": "aw1NgEzBg83R7vgmiJt3", + "chapter_snapshot_id": "aw1NgEzBg83R7vgmiJt1", + "created_at_unix": 1714204800, + "name": "My Chapter Snapshot", + "project_id": "aw1NgEzBg83R7vgmiJt2" + } + ] + } + }, + "ChapterStatisticsResponseModel": { + "properties": { + "characters_unconverted": { + "type": "integer", + "title": "Characters Unconverted", + "description": "The number of unconverted characters." + }, + "characters_converted": { + "type": "integer", + "title": "Characters Converted", + "description": "The number of converted characters." + }, + "paragraphs_converted": { + "type": "integer", + "title": "Paragraphs Converted", + "description": "The number of converted paragraphs." + }, + "paragraphs_unconverted": { + "type": "integer", + "title": "Paragraphs Unconverted", + "description": "The number of unconverted paragraphs." + }, + "credits_needed_to_convert": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Credits Needed To Convert", + "description": "The number of credits needed to convert the remaining paragraphs." + }, + "voice_statistics": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/VoiceStatisticsResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Voice Statistics", + "description": "Per-voice breakdown of character counts." + } + }, + "type": "object", + "required": [ + "characters_unconverted", + "characters_converted", + "paragraphs_converted", + "paragraphs_unconverted" + ], + "title": "ChapterStatisticsResponseModel", + "example": { + "characters_converted": 500, + "characters_unconverted": 1000, + "credits_needed_to_convert": 1000, + "paragraphs_converted": 20, + "paragraphs_unconverted": 10, + "voice_statistics": [ + { + "characters_converted": 300, + "characters_unconverted": 600, + "voice_id": "voice123" + }, + { + "characters_converted": 200, + "characters_unconverted": 400, + "voice_id": "voice456" + } + ] + } + }, + "ChapterWithContentResponseModel": { + "properties": { + "chapter_id": { + "type": "string", + "title": "Chapter Id", + "description": "The ID of the chapter." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the chapter." + }, + "last_conversion_date_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Last Conversion Date Unix", + "description": "The last conversion date of the chapter." + }, + "conversion_progress": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Conversion Progress", + "description": "The conversion progress of the chapter." + }, + "can_be_downloaded": { + "type": "boolean", + "title": "Can Be Downloaded", + "description": "Whether the chapter can be downloaded." + }, + "state": { + "type": "string", + "enum": [ + "default", + "converting" + ], + "title": "State", + "description": "The state of the chapter." + }, + "has_video": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Has Video", + "description": "Whether the chapter has a video." + }, + "has_visual_content": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Has Visual Content", + "description": "Whether the chapter has any visual content (video, image, or text clips)." + }, + "voice_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Voice Ids", + "description": "List of voice ids used by the chapter" + }, + "statistics": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChapterStatisticsResponseModel" + }, + { + "type": "null" + } + ], + "description": "The statistics of the chapter." + }, + "last_conversion_error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Conversion Error", + "description": "The last conversion error of the chapter." + }, + "content": { + "$ref": "#/components/schemas/ChapterContentResponseModel" + } + }, + "type": "object", + "required": [ + "chapter_id", + "name", + "can_be_downloaded", + "state", + "content" + ], + "title": "ChapterWithContentResponseModel", + "example": { + "can_be_downloaded": true, + "chapter_id": "aw1NgEzBg83R7vgmiJt6", + "content": { + "blocks": [] + }, + "conversion_progress": 0.5, + "last_conversion_date_unix": 1714204800, + "name": "Chapter 1", + "state": "default", + "statistics": { + "characters_converted": 200, + "characters_unconverted": 100, + "paragraphs_converted": 5, + "paragraphs_unconverted": 3 + } + } + }, + "CharacterAlignmentModel": { + "properties": { + "characters": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Characters" + }, + "character_start_times_seconds": { + "items": { + "type": "number" + }, + "type": "array", + "title": "Character Start Times Seconds" + }, + "character_end_times_seconds": { + "items": { + "type": "number" + }, + "type": "array", + "title": "Character End Times Seconds" + } + }, + "type": "object", + "required": [ + "characters", + "character_start_times_seconds", + "character_end_times_seconds" + ], + "title": "CharacterAlignmentModel" + }, + "CharacterAlignmentResponseModel": { + "properties": { + "characters": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Characters" + }, + "character_start_times_seconds": { + "items": { + "type": "number" + }, + "type": "array", + "title": "Character Start Times Seconds" + }, + "character_end_times_seconds": { + "items": { + "type": "number" + }, + "type": "array", + "title": "Character End Times Seconds" + } + }, + "type": "object", + "required": [ + "characters", + "character_start_times_seconds", + "character_end_times_seconds" + ], + "title": "CharacterAlignmentResponseModel" + }, + "CharacterRefreshPeriod": { + "type": "string", + "enum": [ + "monthly_period", + "3_month_period", + "6_month_period", + "annual_period" + ], + "title": "CharacterRefreshPeriod" + }, + "ChatSourceMedium": { + "type": "string", + "enum": [ + "audio", + "text", + "image", + "file" + ], + "title": "ChatSourceMedium" + }, + "CheckServiceAvailabilityParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "check_service_availability", + "title": "Smb Tool Type", + "default": "check_service_availability" + } + }, + "type": "object", + "title": "CheckServiceAvailabilityParams" + }, + "ClientEvent": { + "type": "string", + "enum": [ + "conversation_initiation_metadata", + "asr_initiation_metadata", + "ping", + "audio", + "interruption", + "user_transcript", + "tentative_user_transcript", + "agent_response", + "agent_response_correction", + "client_tool_call", + "mcp_tool_call", + "mcp_connection_status", + "agent_tool_request", + "agent_tool_response", + "agent_tool_response_full_payload", + "agent_response_metadata", + "vad_score", + "agent_chat_response_part", + "client_error", + "guardrail_triggered", + "dtmf_request", + "agent_response_complete", + "internal_turn_probability", + "internal_tentative_agent_response" + ], + "title": "ClientEvent" + }, + "ClientToolConfig-Input": { + "properties": { + "type": { + "type": "string", + "const": "client", + "title": "Type", + "description": "The type of tool", + "default": "client" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does." + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 120, + "minimum": 1, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete. Must be between 1 and 120 seconds (inclusive).", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "parameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Input" + }, + { + "type": "null" + } + ], + "description": "Schema for any parameters to pass to the client" + }, + "expects_response": { + "type": "boolean", + "title": "Expects Response", + "description": "If true, calling this tool should block the conversation until the client responds with some response which is passed to the llm. If false then we will continue the conversation without waiting for the client to respond, this is useful to show content to a user but not block the conversation", + "default": false + }, + "dynamic_variables": { + "$ref": "#/components/schemas/DynamicVariablesConfig-Input", + "description": "Configuration for dynamic variables" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + } + }, + "type": "object", + "required": [ + "name", + "description" + ], + "title": "ClientToolConfig", + "description": "A client tool is one that sends an event to the user's client to trigger something client side", + "example": { + "expects_response": false, + "type": "client" + } + }, + "ClientToolConfig-Output": { + "properties": { + "type": { + "type": "string", + "const": "client", + "title": "Type", + "description": "The type of tool", + "default": "client" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does." + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 120, + "minimum": 1, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete. Must be between 1 and 120 seconds (inclusive).", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "parameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Output" + }, + { + "type": "null" + } + ], + "description": "Schema for any parameters to pass to the client" + }, + "expects_response": { + "type": "boolean", + "title": "Expects Response", + "description": "If true, calling this tool should block the conversation until the client responds with some response which is passed to the llm. If false then we will continue the conversation without waiting for the client to respond, this is useful to show content to a user but not block the conversation", + "default": false + }, + "dynamic_variables": { + "$ref": "#/components/schemas/DynamicVariablesConfig-Output", + "description": "Configuration for dynamic variables" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + } + }, + "type": "object", + "required": [ + "name", + "description" + ], + "title": "ClientToolConfig", + "description": "A client tool is one that sends an event to the user's client to trigger something client side", + "example": { + "expects_response": false, + "type": "client" + } + }, + "ClipAnimation": { + "properties": { + "enter_effect": { + "type": "string", + "enum": [ + "none", + "fade", + "float", + "gentle_float", + "zoom_in", + "drop", + "slide_left", + "slide_right", + "slide_up", + "slide_down", + "pop", + "bounce", + "spin", + "slide_bounce" + ], + "title": "Enter Effect", + "default": "none" + }, + "enter_duration_ms": { + "type": "integer", + "title": "Enter Duration Ms", + "default": 0 + }, + "exit_effect": { + "type": "string", + "enum": [ + "none", + "fade", + "float", + "gentle_float", + "zoom_in", + "drop", + "slide_left", + "slide_right", + "slide_up", + "slide_down", + "pop", + "bounce", + "spin", + "slide_bounce" + ], + "title": "Exit Effect", + "default": "none" + }, + "exit_duration_ms": { + "type": "integer", + "title": "Exit Duration Ms", + "default": 0 + } + }, + "type": "object", + "title": "ClipAnimation" + }, + "CoachedAgentSettings": { + "properties": { + "type": { + "type": "string", + "const": "coached", + "title": "Type", + "default": "coached" + }, + "memory_base_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Memory Base Id" + } + }, + "type": "object", + "title": "CoachedAgentSettings" + }, + "CoachingAgentSettings": { + "properties": { + "type": { + "type": "string", + "const": "coaching", + "title": "Type", + "default": "coaching" + }, + "coached_agent_id": { + "type": "string", + "title": "Coached Agent Id" + }, + "memory_base_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Memory Base Id" + } + }, + "type": "object", + "required": [ + "coached_agent_id" + ], + "title": "CoachingAgentSettings", + "description": "Runtime-only settings for the virtual coach. Not stored in the database." + }, + "CodeToolAllowedDomain": { + "properties": { + "domain": { + "type": "string", + "maxLength": 253, + "minLength": 1, + "title": "Domain", + "description": "Domain pattern that code tools can access. Must be a valid domain (e.g. api.github.com), optionally with a subdomain wildcard (*.example.com) or path glob (api.example.com/v1/*)." + }, + "name": { + "type": "string", + "maxLength": 100, + "minLength": 1, + "title": "Name", + "description": "Human-readable label for this domain entry" + } + }, + "type": "object", + "required": [ + "domain", + "name" + ], + "title": "CodeToolAllowedDomain" + }, + "CodeToolConfig-Input": { + "properties": { + "type": { + "type": "string", + "const": "code", + "title": "Type", + "description": "The type of tool", + "default": "code" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does." + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 120, + "minimum": 5, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive).", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "source_code": { + "type": "string", + "minLength": 1, + "title": "Source Code", + "description": "TypeScript/JavaScript source code that implements the tool logic" + }, + "dependencies": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Dependencies", + "description": "npm dependencies as a package-name → version map (e.g. {\"lodash\": \"^4.17.21\"})" + }, + "parameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Input" + }, + { + "type": "null" + } + ], + "description": "Schema for parameters the LLM provides to the code tool via `args`" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + } + }, + "type": "object", + "required": [ + "name", + "description", + "source_code" + ], + "title": "CodeToolConfig", + "description": "A code tool runs user-provided TypeScript/JavaScript in a sandboxed isolate.", + "x-fern-ignore": true + }, + "CodeToolConfig-Output": { + "properties": { + "type": { + "type": "string", + "const": "code", + "title": "Type", + "description": "The type of tool", + "default": "code" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does." + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 120, + "minimum": 5, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive).", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "source_code": { + "type": "string", + "minLength": 1, + "title": "Source Code", + "description": "TypeScript/JavaScript source code that implements the tool logic" + }, + "dependencies": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Dependencies", + "description": "npm dependencies as a package-name → version map (e.g. {\"lodash\": \"^4.17.21\"})" + }, + "parameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Output" + }, + { + "type": "null" + } + ], + "description": "Schema for parameters the LLM provides to the code tool via `args`" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + } + }, + "type": "object", + "required": [ + "name", + "description", + "source_code" + ], + "title": "CodeToolConfig", + "description": "A code tool runs user-provided TypeScript/JavaScript in a sandboxed isolate.", + "x-fern-ignore": true + }, + "ColumnFilter": { + "properties": { + "column": { + "type": "string", + "title": "Column" + }, + "operation": { + "type": "string", + "enum": [ + "in", + "not_in", + "le", + "ge", + "lt", + "gt", + "eq", + "neq" + ], + "title": "Operation" + }, + "values": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "date-time" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "type": "array", + "title": "Values" + } + }, + "type": "object", + "required": [ + "column", + "operation", + "values" + ], + "title": "ColumnFilter" + }, + "ColumnUnit": { + "type": "string", + "enum": [ + "ms", + "s", + "min", + "duration", + "credits", + "usd", + "eur", + "inr", + "pln", + "ratio", + "rating" + ], + "title": "ColumnUnit" + }, + "ConfigEntityType": { + "type": "string", + "enum": [ + "name", + "name.name_given", + "name.name_family", + "name.name_other", + "email_address", + "contact_number", + "dob", + "age", + "religious_belief", + "political_opinion", + "sexual_orientation", + "ethnicity_race", + "marital_status", + "occupation", + "physical_attribute", + "language", + "username", + "password", + "url", + "organization", + "financial_id", + "financial_id.payment_card", + "financial_id.payment_card.payment_card_number", + "financial_id.payment_card.payment_card_expiration_date", + "financial_id.payment_card.payment_card_cvv", + "financial_id.bank_account", + "financial_id.bank_account.bank_account_number", + "financial_id.bank_account.bank_routing_number", + "financial_id.bank_account.swift_bic_code", + "financial_id.financial_id_other", + "location", + "location.location_address", + "location.location_city", + "location.location_postal_code", + "location.location_coordinate", + "location.location_state", + "location.location_country", + "location.location_other", + "date", + "date_interval", + "unique_id", + "unique_id.government_issued_id", + "unique_id.account_number", + "unique_id.vehicle_id", + "unique_id.healthcare_number", + "unique_id.healthcare_number.medical_record_number", + "unique_id.healthcare_number.health_plan_beneficiary_number", + "unique_id.device_id", + "unique_id.unique_id_other", + "medical", + "medical.medical_condition", + "medical.medication", + "medical.medical_procedure", + "medical.medical_measurement", + "medical.medical_other" + ], + "title": "ConfigEntityType", + "description": "Entity types for the API configuration.\n\nThis enum contains all valid entity type configurations that users can specify:\n- Parent types (e.g., \"name\", \"financial_id\") that expand to all subtypes\n- Specific subtypes using dot notation (e.g., \"name.full_name\")\n- Standalone terminal types (e.g., \"email_address\")\n\nWhen converted for service use, parent types expand to all their terminal subtypes." + }, + "ConstantSchemaOverride": { + "properties": { + "source": { + "type": "string", + "const": "constant", + "title": "Source", + "default": "constant" + }, + "constant_value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "title": "Constant Value", + "description": "The constant value to use" + } + }, + "type": "object", + "required": [ + "constant_value" + ], + "title": "ConstantSchemaOverride" + }, + "ContentConfig": { + "properties": { + "sexual": { + "$ref": "#/components/schemas/ContentThresholdGuardrail" + }, + "violence": { + "$ref": "#/components/schemas/ContentThresholdGuardrail" + }, + "harassment": { + "$ref": "#/components/schemas/ContentThresholdGuardrail" + }, + "self_harm": { + "$ref": "#/components/schemas/ContentThresholdGuardrail" + }, + "profanity": { + "$ref": "#/components/schemas/ContentThresholdGuardrail" + }, + "religion_or_politics": { + "$ref": "#/components/schemas/ContentThresholdGuardrail" + }, + "medical_and_legal_information": { + "$ref": "#/components/schemas/ContentThresholdGuardrail" + } + }, + "type": "object", + "title": "ContentConfig" + }, + "ContentGuardrail-Input": { + "properties": { + "execution_mode": { + "$ref": "#/components/schemas/GuardrailExecutionMode", + "default": "streaming" + }, + "config": { + "$ref": "#/components/schemas/ContentConfig" + }, + "trigger_action": { + "oneOf": [ + { + "$ref": "#/components/schemas/EndCallTriggerAction" + }, + { + "$ref": "#/components/schemas/RetryTriggerAction" + } + ], + "title": "Trigger Action", + "discriminator": { + "propertyName": "type", + "mapping": { + "end_call": "#/components/schemas/EndCallTriggerAction", + "retry": "#/components/schemas/RetryTriggerAction" + } + } + } + }, + "type": "object", + "title": "ContentGuardrail" + }, + "ContentGuardrail-Output": { + "properties": { + "execution_mode": { + "$ref": "#/components/schemas/GuardrailExecutionMode", + "default": "streaming" + }, + "config": { + "$ref": "#/components/schemas/ContentConfig" + }, + "trigger_action": { + "oneOf": [ + { + "$ref": "#/components/schemas/EndCallTriggerAction" + }, + { + "$ref": "#/components/schemas/RetryTriggerAction" + } + ], + "title": "Trigger Action", + "discriminator": { + "propertyName": "type", + "mapping": { + "end_call": "#/components/schemas/EndCallTriggerAction", + "retry": "#/components/schemas/RetryTriggerAction" + } + } + } + }, + "type": "object", + "title": "ContentGuardrail" + }, + "ContentThresholdGuardrail": { + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Is Enabled", + "default": false + }, + "threshold": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + } + ], + "title": "Threshold", + "default": 0.3 + } + }, + "type": "object", + "title": "ContentThresholdGuardrail" + }, + "ContextualUpdateInfo": { + "properties": { + "context_id": { + "type": "string", + "title": "Context Id", + "description": "Client-supplied identifier grouping related contextual updates." + }, + "is_superseded": { + "type": "boolean", + "title": "Is Superseded", + "description": "True when this contextual update has been replaced by a newer update with the same context_id.", + "default": false + } + }, + "type": "object", + "required": [ + "context_id" + ], + "title": "ContextualUpdateInfo" + }, + "Contributor": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "role": { + "type": "string", + "title": "Role" + }, + "bio": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Bio" + }, + "profile_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Profile Id" + } + }, + "type": "object", + "required": [ + "name", + "role" + ], + "title": "Contributor" + }, + "ConvAIDynamicVariable": { + "properties": { + "variable_name": { + "type": "string", + "title": "Variable Name" + } + }, + "type": "object", + "required": [ + "variable_name" + ], + "title": "ConvAIDynamicVariable", + "description": "Used to reference a dynamic variable." + }, + "ConvAIEnvVarLocator": { + "properties": { + "env_var_label": { + "type": "string", + "title": "Env Var Label" + } + }, + "type": "object", + "required": [ + "env_var_label" + ], + "title": "ConvAIEnvVarLocator", + "description": "Used to reference an environment variable by label." + }, + "ConvAIFileUploadResponseModel": { + "properties": { + "file_id": { + "type": "string", + "title": "File Id" + } + }, + "type": "object", + "required": [ + "file_id" + ], + "title": "ConvAIFileUploadResponseModel" + }, + "ConvAISecretLocator": { + "properties": { + "secret_id": { + "type": "string", + "title": "Secret Id" + } + }, + "type": "object", + "required": [ + "secret_id" + ], + "title": "ConvAISecretLocator", + "description": "Used to reference a secret from the agent's secret store." + }, + "ConvAIStoredSecretDependencies": { + "properties": { + "tools": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableToolIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownToolIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableToolIdentifier", + "unknown": "#/components/schemas/DependentUnknownToolIdentifier" + } + } + }, + "type": "array", + "title": "Tools" + }, + "tools_has_more": { + "type": "boolean", + "title": "Tools Has More", + "description": "Whether there are more tool dependents beyond the returned preview", + "default": false + }, + "agents": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableAgentIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownAgentIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableAgentIdentifier", + "unknown": "#/components/schemas/DependentUnknownAgentIdentifier" + } + } + }, + "type": "array", + "title": "Agents" + }, + "agents_has_more": { + "type": "boolean", + "title": "Agents Has More", + "description": "Whether there are more agent dependents beyond the returned preview", + "default": false + }, + "phone_numbers": { + "items": { + "$ref": "#/components/schemas/DependentPhoneNumberIdentifier" + }, + "type": "array", + "title": "Phone Numbers" + }, + "phone_numbers_has_more": { + "type": "boolean", + "title": "Phone Numbers Has More", + "description": "Whether there are more phone number dependents beyond the returned preview", + "default": false + }, + "mcp_servers": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableMCPServerIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownMCPServerIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableMCPServerIdentifier", + "unknown": "#/components/schemas/DependentUnknownMCPServerIdentifier" + } + } + }, + "type": "array", + "title": "Mcp Servers" + }, + "others": { + "items": { + "$ref": "#/components/schemas/SecretDependencyType" + }, + "type": "array", + "title": "Others" + } + }, + "type": "object", + "required": [ + "tools", + "agents", + "others" + ], + "title": "ConvAIStoredSecretDependencies" + }, + "ConvAIUserSecretDBModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "encrypted_value": { + "type": "string", + "title": "Encrypted Value" + }, + "nonce": { + "type": "string", + "title": "Nonce" + } + }, + "type": "object", + "required": [ + "id", + "name", + "encrypted_value", + "nonce" + ], + "title": "ConvAIUserSecretDBModel", + "description": "User-specific secret model that are not shared with other users in a workspace." + }, + "ConvAIWebhooks": { + "properties": { + "post_call_webhook_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Post Call Webhook Id" + }, + "events": { + "items": { + "$ref": "#/components/schemas/WebhookEventType" + }, + "type": "array", + "title": "Events", + "description": "List of event types to send via webhook. Options: transcript, audio, call_initiation_failure." + }, + "transcript_format": { + "$ref": "#/components/schemas/WebhookTranscriptFormat", + "description": "Format for transcript webhooks.", + "default": "json" + }, + "send_audio": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Send Audio", + "description": "DEPRECATED: Use 'events' field instead. Whether to send audio data with post-call webhooks for ConvAI conversations", + "deprecated": true + } + }, + "type": "object", + "title": "ConvAIWebhooks" + }, + "ConvAIWorkspaceStoredSecretConfig": { + "properties": { + "type": { + "type": "string", + "const": "stored", + "title": "Type" + }, + "secret_id": { + "type": "string", + "title": "Secret Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "used_by": { + "$ref": "#/components/schemas/ConvAIStoredSecretDependencies" + } + }, + "type": "object", + "required": [ + "type", + "secret_id", + "name", + "used_by" + ], + "title": "ConvAIWorkspaceStoredSecretConfig" + }, + "ConversationASRUsageModel": { + "properties": { + "asr_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Asr Model" + }, + "total_transcription_calls": { + "type": "integer", + "title": "Total Transcription Calls", + "default": 0 + }, + "total_audio_input_seconds": { + "type": "number", + "title": "Total Audio Input Seconds", + "default": 0 + } + }, + "type": "object", + "title": "ConversationASRUsageModel", + "description": "Aggregated ASR usage for a conversation (analytics-only, not billing)." + }, + "ConversationChargingCommonModel": { + "properties": { + "dev_discount": { + "type": "boolean", + "title": "Dev Discount", + "default": false + }, + "is_burst": { + "type": "boolean", + "title": "Is Burst", + "default": false + }, + "tier": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tier" + }, + "llm_usage": { + "$ref": "#/components/schemas/LLMCategoryUsage" + }, + "llm_price": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Llm Price" + }, + "llm_charge": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Llm Charge" + }, + "call_charge": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Call Charge" + }, + "free_minutes_consumed": { + "type": "number", + "title": "Free Minutes Consumed", + "default": 0 + }, + "free_llm_dollars_consumed": { + "type": "number", + "title": "Free Llm Dollars Consumed", + "default": 0 + }, + "tts_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTTSUsageModel" + }, + { + "type": "null" + } + ] + }, + "asr_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationASRUsageModel" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "ConversationChargingCommonModel" + }, + "ConversationConfig-Input": { + "properties": { + "text_only": { + "type": "boolean", + "title": "Text Only", + "description": "If enabled audio will not be processed and only text will be used, use to avoid audio pricing.", + "default": false, + "x-convai-client-override": true + }, + "max_duration_seconds": { + "type": "integer", + "title": "Max Duration Seconds", + "description": "The maximum duration of a conversation in seconds", + "default": 600 + }, + "client_events": { + "items": { + "$ref": "#/components/schemas/ClientEvent" + }, + "type": "array", + "title": "Client Events", + "description": "The events that will be sent to the client" + }, + "file_input": { + "$ref": "#/components/schemas/FileInputConfig", + "description": "Configuration for file input (image/PDF uploads) during conversations.", + "x-convai-client-override": true + }, + "monitoring_enabled": { + "type": "boolean", + "title": "Monitoring Enabled", + "description": "Enable real-time monitoring of conversations via WebSocket", + "default": false + }, + "monitoring_events": { + "items": { + "$ref": "#/components/schemas/ClientEvent" + }, + "type": "array", + "title": "Monitoring Events", + "description": "The events that will be sent to monitoring connections." + }, + "source_attribution": { + "type": "boolean", + "title": "Source Attribution", + "description": "When enabled and knowledge base content is present, the LLM is instructed to report which sources it used.", + "default": false + } + }, + "type": "object", + "title": "ConversationConfig", + "example": { + "client_events": [ + "audio", + "interruption" + ], + "max_duration_seconds": 600 + } + }, + "ConversationConfig-Output": { + "properties": { + "text_only": { + "type": "boolean", + "title": "Text Only", + "description": "If enabled audio will not be processed and only text will be used, use to avoid audio pricing.", + "default": false, + "x-convai-client-override": true + }, + "max_duration_seconds": { + "type": "integer", + "title": "Max Duration Seconds", + "description": "The maximum duration of a conversation in seconds", + "default": 600 + }, + "client_events": { + "items": { + "$ref": "#/components/schemas/ClientEvent" + }, + "type": "array", + "title": "Client Events", + "description": "The events that will be sent to the client" + }, + "file_input": { + "$ref": "#/components/schemas/FileInputConfig", + "description": "Configuration for file input (image/PDF uploads) during conversations.", + "x-convai-client-override": true + }, + "monitoring_enabled": { + "type": "boolean", + "title": "Monitoring Enabled", + "description": "Enable real-time monitoring of conversations via WebSocket", + "default": false + }, + "monitoring_events": { + "items": { + "$ref": "#/components/schemas/ClientEvent" + }, + "type": "array", + "title": "Monitoring Events", + "description": "The events that will be sent to monitoring connections." + }, + "source_attribution": { + "type": "boolean", + "title": "Source Attribution", + "description": "When enabled and knowledge base content is present, the LLM is instructed to report which sources it used.", + "default": false + } + }, + "type": "object", + "title": "ConversationConfig", + "example": { + "client_events": [ + "audio", + "interruption" + ], + "max_duration_seconds": 600 + } + }, + "ConversationConfigClientOverride-Input": { + "properties": { + "asr": { + "anyOf": [ + { + "$ref": "#/components/schemas/ASRConversationalConfigOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational transcription" + }, + "turn": { + "anyOf": [ + { + "$ref": "#/components/schemas/TurnConfigOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for turn detection" + }, + "tts": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSConversationalConfigOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational text to speech" + }, + "conversation": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationConfigOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational events" + }, + "agent": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentConfigOverride-Input" + }, + { + "type": "null" + } + ], + "description": "Agent specific configuration" + } + }, + "type": "object", + "title": "ConversationConfigClientOverride", + "example": { + "agent": { + "first_message": "Hello, how can I help you today?", + "language": "en", + "prompt": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "tool_ids": [] + } + }, + "asr": { + "keywords": [ + "hello", + "world" + ] + }, + "tts": { + "similarity_boost": 0.8, + "speed": 1, + "stability": 0.5, + "voice_id": "cjVigY5qzO86Huf0OWal" + }, + "turn": { + "soft_timeout_config": { + "message": "Hhmmmm...yeah." + } + } + } + }, + "ConversationConfigClientOverride-Output": { + "properties": { + "asr": { + "anyOf": [ + { + "$ref": "#/components/schemas/ASRConversationalConfigOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational transcription" + }, + "turn": { + "anyOf": [ + { + "$ref": "#/components/schemas/TurnConfigOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for turn detection" + }, + "tts": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSConversationalConfigOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational text to speech" + }, + "conversation": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationConfigOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational events" + }, + "agent": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentConfigOverride-Output" + }, + { + "type": "null" + } + ], + "description": "Agent specific configuration" + } + }, + "type": "object", + "title": "ConversationConfigClientOverride", + "example": { + "agent": { + "first_message": "Hello, how can I help you today?", + "language": "en", + "prompt": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "tool_ids": [] + } + }, + "asr": { + "keywords": [ + "hello", + "world" + ] + }, + "tts": { + "similarity_boost": 0.8, + "speed": 1, + "stability": 0.5, + "voice_id": "cjVigY5qzO86Huf0OWal" + }, + "turn": { + "soft_timeout_config": { + "message": "Hhmmmm...yeah." + } + } + } + }, + "ConversationConfigClientOverrideConfig-Input": { + "properties": { + "asr": { + "$ref": "#/components/schemas/ASRConversationalConfigOverrideConfig", + "description": "Configures overrides for nested fields." + }, + "turn": { + "$ref": "#/components/schemas/TurnConfigOverrideConfig", + "description": "Configures overrides for nested fields." + }, + "tts": { + "$ref": "#/components/schemas/TTSConversationalConfigOverrideConfig", + "description": "Configures overrides for nested fields." + }, + "conversation": { + "$ref": "#/components/schemas/ConversationConfigOverrideConfig", + "description": "Configures overrides for nested fields." + }, + "agent": { + "$ref": "#/components/schemas/AgentConfigOverrideConfig", + "description": "Configures overrides for nested fields." + } + }, + "type": "object", + "title": "ConversationConfigClientOverrideConfig" + }, + "ConversationConfigClientOverrideConfig-Output": { + "properties": { + "asr": { + "$ref": "#/components/schemas/ASRConversationalConfigOverrideConfig", + "description": "Configures overrides for nested fields." + }, + "turn": { + "$ref": "#/components/schemas/TurnConfigOverrideConfig", + "description": "Configures overrides for nested fields." + }, + "tts": { + "$ref": "#/components/schemas/TTSConversationalConfigOverrideConfig", + "description": "Configures overrides for nested fields." + }, + "conversation": { + "$ref": "#/components/schemas/ConversationConfigOverrideConfig", + "description": "Configures overrides for nested fields." + }, + "agent": { + "$ref": "#/components/schemas/AgentConfigOverrideConfig", + "description": "Configures overrides for nested fields." + } + }, + "type": "object", + "title": "ConversationConfigClientOverrideConfig" + }, + "ConversationConfigOverride": { + "properties": { + "text_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Text Only", + "description": "If enabled audio will not be processed and only text will be used, use to avoid audio pricing.", + "x-convai-client-override": true + } + }, + "type": "object", + "title": "ConversationConfigOverride" + }, + "ConversationConfigOverrideConfig": { + "properties": { + "text_only": { + "type": "boolean", + "title": "Text Only", + "description": "Whether to allow overriding the text_only field.", + "default": false + } + }, + "type": "object", + "title": "ConversationConfigOverrideConfig" + }, + "ConversationConfigWorkflowOverride-Input": { + "properties": { + "text_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Text Only", + "description": "If enabled audio will not be processed and only text will be used, use to avoid audio pricing.", + "x-convai-client-override": true + }, + "max_duration_seconds": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Duration Seconds", + "description": "The maximum duration of a conversation in seconds" + }, + "client_events": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ClientEvent" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Client Events", + "description": "The events that will be sent to the client" + }, + "file_input": { + "anyOf": [ + { + "$ref": "#/components/schemas/FileInputConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for file input (image/PDF uploads) during conversations.", + "x-convai-client-override": true + }, + "monitoring_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Monitoring Enabled", + "description": "Enable real-time monitoring of conversations via WebSocket" + }, + "monitoring_events": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ClientEvent" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Monitoring Events", + "description": "The events that will be sent to monitoring connections." + }, + "source_attribution": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Source Attribution", + "description": "When enabled and knowledge base content is present, the LLM is instructed to report which sources it used." + } + }, + "type": "object", + "title": "ConversationConfigWorkflowOverride", + "example": { + "client_events": [ + "audio", + "interruption" + ], + "max_duration_seconds": 600 + } + }, + "ConversationConfigWorkflowOverride-Output": { + "properties": { + "text_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Text Only", + "description": "If enabled audio will not be processed and only text will be used, use to avoid audio pricing.", + "x-convai-client-override": true + }, + "max_duration_seconds": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Duration Seconds", + "description": "The maximum duration of a conversation in seconds" + }, + "client_events": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ClientEvent" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Client Events", + "description": "The events that will be sent to the client" + }, + "file_input": { + "anyOf": [ + { + "$ref": "#/components/schemas/FileInputConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for file input (image/PDF uploads) during conversations.", + "x-convai-client-override": true + }, + "monitoring_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Monitoring Enabled", + "description": "Enable real-time monitoring of conversations via WebSocket" + }, + "monitoring_events": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ClientEvent" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Monitoring Events", + "description": "The events that will be sent to monitoring connections." + }, + "source_attribution": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Source Attribution", + "description": "When enabled and knowledge base content is present, the LLM is instructed to report which sources it used." + } + }, + "type": "object", + "title": "ConversationConfigWorkflowOverride", + "example": { + "client_events": [ + "audio", + "interruption" + ], + "max_duration_seconds": 600 + } + }, + "ConversationDeletionSettings": { + "properties": { + "deletion_time_unix_secs": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Deletion Time Unix Secs" + }, + "deleted_logs_at_time_unix_secs": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Deleted Logs At Time Unix Secs" + }, + "deleted_audio_at_time_unix_secs": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Deleted Audio At Time Unix Secs" + }, + "deleted_transcript_at_time_unix_secs": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Deleted Transcript At Time Unix Secs" + }, + "delete_transcript_and_pii": { + "type": "boolean", + "title": "Delete Transcript And Pii", + "default": false + }, + "delete_audio": { + "type": "boolean", + "title": "Delete Audio", + "default": false + } + }, + "type": "object", + "title": "ConversationDeletionSettings" + }, + "ConversationFeedbackRequestModel": { + "properties": { + "feedback": { + "anyOf": [ + { + "$ref": "#/components/schemas/UserFeedbackScore" + }, + { + "type": "null" + } + ], + "description": "Either 'like' or 'dislike' to indicate the feedback for the conversation.", + "examples": [ + "like" + ] + } + }, + "type": "object", + "title": "ConversationFeedbackRequestModel", + "examples": [ + { + "feedback": "like" + } + ] + }, + "ConversationFeedbackType": { + "type": "string", + "enum": [ + "thumbs", + "rating" + ], + "title": "ConversationFeedbackType" + }, + "ConversationHistoryAnalysisCommonModel": { + "properties": { + "evaluation_criteria_results": { + "additionalProperties": { + "$ref": "#/components/schemas/ConversationHistoryEvaluationCriteriaResultCommonModel" + }, + "type": "object", + "title": "Evaluation Criteria Results" + }, + "data_collection_results": { + "additionalProperties": { + "$ref": "#/components/schemas/DataCollectionResultCommonModel" + }, + "type": "object", + "title": "Data Collection Results" + }, + "evaluation_criteria_results_list": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryEvaluationCriteriaResultCommonModel" + }, + "type": "array", + "title": "Evaluation Criteria Results List" + }, + "data_collection_results_list": { + "items": { + "$ref": "#/components/schemas/DataCollectionResultCommonModel" + }, + "type": "array", + "title": "Data Collection Results List" + }, + "call_successful": { + "$ref": "#/components/schemas/EvaluationSuccessResult" + }, + "transcript_summary": { + "type": "string", + "title": "Transcript Summary" + }, + "call_summary_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Call Summary Title" + }, + "scoped": { + "items": { + "$ref": "#/components/schemas/ScopedAnalysisResult" + }, + "type": "array", + "title": "Scoped" + } + }, + "type": "object", + "required": [ + "call_successful", + "transcript_summary" + ], + "title": "ConversationHistoryAnalysisCommonModel" + }, + "ConversationHistoryBatchCallModel": { + "properties": { + "batch_call_id": { + "type": "string", + "title": "Batch Call Id" + }, + "batch_call_recipient_id": { + "type": "string", + "title": "Batch Call Recipient Id" + } + }, + "type": "object", + "required": [ + "batch_call_id", + "batch_call_recipient_id" + ], + "title": "ConversationHistoryBatchCallModel" + }, + "ConversationHistoryElevenAssistantCommonModel": { + "properties": { + "is_eleven_assistant": { + "type": "boolean", + "title": "Is Eleven Assistant", + "default": false + } + }, + "type": "object", + "title": "ConversationHistoryElevenAssistantCommonModel" + }, + "ConversationHistoryErrorCommonModel": { + "properties": { + "code": { + "type": "integer", + "title": "Code" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + } + }, + "type": "object", + "required": [ + "code" + ], + "title": "ConversationHistoryErrorCommonModel" + }, + "ConversationHistoryEvaluationCriteriaResultCommonModel": { + "properties": { + "criteria_id": { + "type": "string", + "title": "Criteria Id" + }, + "result": { + "$ref": "#/components/schemas/EvaluationSuccessResult" + }, + "rationale": { + "type": "string", + "title": "Rationale" + } + }, + "type": "object", + "required": [ + "criteria_id", + "result", + "rationale" + ], + "title": "ConversationHistoryEvaluationCriteriaResultCommonModel" + }, + "ConversationHistoryFeedbackCommonModel": { + "properties": { + "type": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationFeedbackType" + }, + { + "type": "null" + } + ] + }, + "overall_score": { + "anyOf": [ + { + "$ref": "#/components/schemas/UserFeedbackScore" + }, + { + "type": "null" + } + ] + }, + "likes": { + "type": "integer", + "title": "Likes", + "default": 0 + }, + "dislikes": { + "type": "integer", + "title": "Dislikes", + "default": 0 + }, + "rating": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Rating" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Comment" + } + }, + "type": "object", + "title": "ConversationHistoryFeedbackCommonModel" + }, + "ConversationHistoryMetadataCommonModel": { + "properties": { + "start_time_unix_secs": { + "type": "integer", + "title": "Start Time Unix Secs" + }, + "accepted_time_unix_secs": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Accepted Time Unix Secs" + }, + "call_duration_secs": { + "type": "integer", + "title": "Call Duration Secs" + }, + "cost": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Cost" + }, + "deletion_settings": { + "$ref": "#/components/schemas/ConversationDeletionSettings" + }, + "feedback": { + "$ref": "#/components/schemas/ConversationHistoryFeedbackCommonModel" + }, + "authorization_method": { + "$ref": "#/components/schemas/AuthorizationMethod", + "default": "public" + }, + "charging": { + "$ref": "#/components/schemas/ConversationChargingCommonModel" + }, + "phone_call": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryTwilioPhoneCallModel" + }, + { + "$ref": "#/components/schemas/ConversationHistorySIPTrunkingPhoneCallModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "sip_trunking": "#/components/schemas/ConversationHistorySIPTrunkingPhoneCallModel", + "twilio": "#/components/schemas/ConversationHistoryTwilioPhoneCallModel" + } + } + }, + { + "type": "null" + } + ], + "title": "Phone Call" + }, + "batch_call": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryBatchCallModel" + }, + { + "type": "null" + } + ] + }, + "termination_reason": { + "type": "string", + "title": "Termination Reason", + "default": "" + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryErrorCommonModel" + }, + { + "type": "null" + } + ] + }, + "warnings": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Warnings" + }, + "main_language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Main Language" + }, + "rag_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryRagUsageCommonModel" + }, + { + "type": "null" + } + ] + }, + "text_only": { + "type": "boolean", + "title": "Text Only", + "default": false + }, + "features_usage": { + "$ref": "#/components/schemas/FeaturesUsageCommonModel" + }, + "eleven_assistant": { + "$ref": "#/components/schemas/ConversationHistoryElevenAssistantCommonModel" + }, + "initiator_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Initiator Id" + }, + "conversation_initiation_source": { + "$ref": "#/components/schemas/ConversationInitiationSource", + "default": "unknown" + }, + "conversation_initiation_source_version": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "Conversation Initiation Source Version" + }, + "timezone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Timezone" + }, + "async_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/AsyncConversationMetadata" + }, + { + "type": "null" + } + ] + }, + "whatsapp": { + "anyOf": [ + { + "$ref": "#/components/schemas/WhatsAppConversationInfo" + }, + { + "type": "null" + } + ] + }, + "sms": { + "anyOf": [ + { + "$ref": "#/components/schemas/SMSConversationInfo" + }, + { + "type": "null" + } + ] + }, + "agent_created_from": { + "$ref": "#/components/schemas/AgentDefinitionSource", + "default": "unknown" + }, + "agent_last_updated_from": { + "$ref": "#/components/schemas/AgentDefinitionSource", + "default": "unknown" + }, + "voice_rewards": { + "items": { + "$ref": "#/components/schemas/ConversationVoiceRewardModel" + }, + "type": "array", + "title": "Voice Rewards" + } + }, + "type": "object", + "required": [ + "start_time_unix_secs", + "call_duration_secs" + ], + "title": "ConversationHistoryMetadataCommonModel" + }, + "ConversationHistoryMultivoiceMessageModel": { + "properties": { + "parts": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryMultivoiceMessagePartModel" + }, + "type": "array", + "title": "Parts" + } + }, + "type": "object", + "required": [ + "parts" + ], + "title": "ConversationHistoryMultivoiceMessageModel", + "description": "Represents a message from a multi-voice agent." + }, + "ConversationHistoryMultivoiceMessagePartModel": { + "properties": { + "text": { + "type": "string", + "title": "Text" + }, + "voice_label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Label" + }, + "time_in_call_secs": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Time In Call Secs" + } + }, + "type": "object", + "required": [ + "text", + "voice_label", + "time_in_call_secs" + ], + "title": "ConversationHistoryMultivoiceMessagePartModel", + "description": "Represents a single voice part of a multi-voice message." + }, + "ConversationHistoryRagUsageCommonModel": { + "properties": { + "usage_count": { + "type": "integer", + "title": "Usage Count" + }, + "embedding_model": { + "type": "string", + "title": "Embedding Model" + } + }, + "type": "object", + "required": [ + "usage_count", + "embedding_model" + ], + "title": "ConversationHistoryRagUsageCommonModel" + }, + "ConversationHistoryRedactionConfig": { + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "description": "Whether conversation history redaction is enabled", + "default": false + }, + "entities": { + "items": { + "$ref": "#/components/schemas/ConfigEntityType" + }, + "type": "array", + "title": "Entities", + "description": "The entities to redact from the conversation transcript, audio and analysis. Use top-level types like 'name', 'email_address', or dot notation for specific subtypes like 'name.full_name'." + } + }, + "type": "object", + "title": "ConversationHistoryRedactionConfig" + }, + "ConversationHistorySIPTrunkingPhoneCallModel": { + "properties": { + "direction": { + "$ref": "#/components/schemas/TelephonyDirection" + }, + "phone_number_id": { + "type": "string", + "title": "Phone Number Id" + }, + "agent_number": { + "type": "string", + "title": "Agent Number" + }, + "external_number": { + "type": "string", + "title": "External Number" + }, + "type": { + "type": "string", + "const": "sip_trunking", + "title": "Type" + }, + "call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Call Id" + }, + "call_sid": { + "type": "string", + "title": "Call Sid" + }, + "sip_header_dynamic_variables": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Sip Header Dynamic Variables" + } + }, + "type": "object", + "required": [ + "direction", + "phone_number_id", + "agent_number", + "external_number", + "type", + "call_sid" + ], + "title": "ConversationHistorySIPTrunkingPhoneCallModel" + }, + "ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Input": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "result_value": { + "type": "string", + "title": "Result Value" + }, + "is_error": { + "type": "boolean", + "title": "Is Error" + }, + "is_blocked": { + "type": "boolean", + "title": "Is Blocked", + "default": false + }, + "tool_has_been_called": { + "type": "boolean", + "title": "Tool Has Been Called" + }, + "tool_latency_secs": { + "type": "number", + "title": "Tool Latency Secs", + "default": 0 + }, + "error_type": { + "type": "string", + "title": "Error Type", + "default": "" + }, + "raw_error_message": { + "type": "string", + "title": "Raw Error Message", + "default": "" + }, + "dynamic_variable_updates": { + "items": { + "$ref": "#/components/schemas/DynamicVariableUpdateCommonModel" + }, + "type": "array", + "title": "Dynamic Variable Updates" + }, + "type": { + "type": "string", + "const": "api_integration_webhook", + "title": "Type" + }, + "integration_id": { + "type": "string", + "title": "Integration Id", + "default": "" + }, + "credential_id": { + "type": "string", + "title": "Credential Id", + "default": "" + }, + "integration_connection_id": { + "type": "string", + "title": "Integration Connection Id", + "default": "" + } + }, + "type": "object", + "required": [ + "request_id", + "tool_name", + "result_value", + "is_error", + "tool_has_been_called", + "type" + ], + "title": "ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel" + }, + "ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Output": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "result_value": { + "type": "string", + "title": "Result Value" + }, + "is_error": { + "type": "boolean", + "title": "Is Error" + }, + "is_blocked": { + "type": "boolean", + "title": "Is Blocked", + "default": false + }, + "tool_has_been_called": { + "type": "boolean", + "title": "Tool Has Been Called" + }, + "tool_latency_secs": { + "type": "number", + "title": "Tool Latency Secs", + "default": 0 + }, + "error_type": { + "type": "string", + "title": "Error Type", + "default": "" + }, + "raw_error_message": { + "type": "string", + "title": "Raw Error Message", + "default": "" + }, + "dynamic_variable_updates": { + "items": { + "$ref": "#/components/schemas/DynamicVariableUpdateCommonModel" + }, + "type": "array", + "title": "Dynamic Variable Updates" + }, + "type": { + "type": "string", + "const": "api_integration_webhook", + "title": "Type" + }, + "integration_id": { + "type": "string", + "title": "Integration Id", + "default": "" + }, + "credential_id": { + "type": "string", + "title": "Credential Id", + "default": "" + }, + "integration_connection_id": { + "type": "string", + "title": "Integration Connection Id", + "default": "" + } + }, + "type": "object", + "required": [ + "request_id", + "tool_name", + "result_value", + "is_error", + "is_blocked", + "tool_has_been_called", + "tool_latency_secs", + "error_type", + "raw_error_message", + "dynamic_variable_updates", + "type", + "integration_id", + "credential_id", + "integration_connection_id" + ], + "title": "ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel" + }, + "ConversationHistoryTranscriptCommonModel-Input": { + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "agent" + ], + "title": "Role" + }, + "agent_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentMetadata" + }, + { + "type": "null" + } + ] + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + }, + "multivoice_message": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryMultivoiceMessageModel" + }, + { + "type": "null" + } + ] + }, + "tool_calls": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallCommonModel-Input" + }, + "type": "array", + "title": "Tool Calls" + }, + "tool_results": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptOtherToolsResultCommonModel" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptSystemToolResultCommonModel-Input" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Input" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Input" + } + ] + }, + "type": "array", + "title": "Tool Results" + }, + "feedback": { + "anyOf": [ + { + "$ref": "#/components/schemas/UserFeedback" + }, + { + "type": "null" + } + ] + }, + "llm_override": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Override" + }, + "time_in_call_secs": { + "type": "integer", + "title": "Time In Call Secs" + }, + "conversation_turn_metrics": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTurnMetrics" + }, + { + "type": "null" + } + ] + }, + "rag_retrieval_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/RagRetrievalInfo" + }, + { + "type": "null" + } + ] + }, + "llm_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLMUsage-Input" + }, + { + "type": "null" + } + ] + }, + "interrupted": { + "type": "boolean", + "title": "Interrupted", + "default": false + }, + "original_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Original Message" + }, + "source_medium": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChatSourceMedium" + }, + { + "type": "null" + } + ] + }, + "source_event_id": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Source Event Id" + }, + "used_static_kb_document_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Used Static Kb Document Ids" + } + }, + "type": "object", + "required": [ + "role", + "time_in_call_secs" + ], + "title": "ConversationHistoryTranscriptCommonModel" + }, + "ConversationHistoryTranscriptCommonModel-Output": { + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "agent" + ], + "title": "Role" + }, + "agent_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentMetadata" + }, + { + "type": "null" + } + ] + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + }, + "multivoice_message": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryMultivoiceMessageModel" + }, + { + "type": "null" + } + ] + }, + "tool_calls": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallCommonModel-Output" + }, + "type": "array", + "title": "Tool Calls" + }, + "tool_results": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptOtherToolsResultCommonModel" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptSystemToolResultCommonModel-Output" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Output" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Output" + } + ] + }, + "type": "array", + "title": "Tool Results" + }, + "feedback": { + "anyOf": [ + { + "$ref": "#/components/schemas/UserFeedback" + }, + { + "type": "null" + } + ] + }, + "llm_override": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Override" + }, + "time_in_call_secs": { + "type": "integer", + "title": "Time In Call Secs" + }, + "conversation_turn_metrics": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTurnMetrics" + }, + { + "type": "null" + } + ] + }, + "rag_retrieval_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/RagRetrievalInfo" + }, + { + "type": "null" + } + ] + }, + "llm_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLMUsage-Output" + }, + { + "type": "null" + } + ] + }, + "interrupted": { + "type": "boolean", + "title": "Interrupted", + "default": false + }, + "original_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Original Message" + }, + "source_medium": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChatSourceMedium" + }, + { + "type": "null" + } + ] + }, + "source_event_id": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Source Event Id" + }, + "used_static_kb_document_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Used Static Kb Document Ids" + } + }, + "type": "object", + "required": [ + "role", + "time_in_call_secs" + ], + "title": "ConversationHistoryTranscriptCommonModel" + }, + "ConversationHistoryTranscriptFileInputResponseModel": { + "properties": { + "file_id": { + "type": "string", + "title": "File Id" + }, + "original_filename": { + "type": "string", + "title": "Original Filename" + }, + "mime_type": { + "type": "string", + "title": "Mime Type" + }, + "file_url": { + "type": "string", + "title": "File Url" + } + }, + "type": "object", + "required": [ + "file_id", + "original_filename", + "mime_type", + "file_url" + ], + "title": "ConversationHistoryTranscriptFileInputResponseModel" + }, + "ConversationHistoryTranscriptOtherToolsResultCommonModel": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "result_value": { + "type": "string", + "title": "Result Value" + }, + "is_error": { + "type": "boolean", + "title": "Is Error" + }, + "is_blocked": { + "type": "boolean", + "title": "Is Blocked", + "default": false + }, + "tool_has_been_called": { + "type": "boolean", + "title": "Tool Has Been Called" + }, + "tool_latency_secs": { + "type": "number", + "title": "Tool Latency Secs", + "default": 0 + }, + "error_type": { + "type": "string", + "title": "Error Type", + "default": "" + }, + "raw_error_message": { + "type": "string", + "title": "Raw Error Message", + "default": "" + }, + "dynamic_variable_updates": { + "items": { + "$ref": "#/components/schemas/DynamicVariableUpdateCommonModel" + }, + "type": "array", + "title": "Dynamic Variable Updates" + }, + "type": { + "anyOf": [ + { + "type": "string", + "enum": [ + "client", + "webhook", + "mcp" + ] + }, + { + "type": "null" + } + ], + "title": "Type" + } + }, + "type": "object", + "required": [ + "request_id", + "tool_name", + "result_value", + "is_error", + "tool_has_been_called" + ], + "title": "ConversationHistoryTranscriptOtherToolsResultCommonModel" + }, + "ConversationHistoryTranscriptResponseModel": { + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "agent" + ], + "title": "Role" + }, + "agent_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentMetadata" + }, + { + "type": "null" + } + ] + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + }, + "multivoice_message": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryMultivoiceMessageModel" + }, + { + "type": "null" + } + ] + }, + "tool_calls": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallCommonModel-Output" + }, + "type": "array", + "title": "Tool Calls" + }, + "tool_results": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptOtherToolsResultCommonModel" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptSystemToolResultCommonModel-Output" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Output" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Output" + } + ] + }, + "type": "array", + "title": "Tool Results" + }, + "feedback": { + "anyOf": [ + { + "$ref": "#/components/schemas/UserFeedback" + }, + { + "type": "null" + } + ] + }, + "llm_override": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Override" + }, + "time_in_call_secs": { + "type": "integer", + "title": "Time In Call Secs" + }, + "conversation_turn_metrics": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTurnMetrics" + }, + { + "type": "null" + } + ] + }, + "rag_retrieval_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/RagRetrievalInfo" + }, + { + "type": "null" + } + ] + }, + "llm_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLMUsage-Output" + }, + { + "type": "null" + } + ] + }, + "interrupted": { + "type": "boolean", + "title": "Interrupted", + "default": false + }, + "original_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Original Message" + }, + "source_medium": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChatSourceMedium" + }, + { + "type": "null" + } + ] + }, + "source_event_id": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Source Event Id" + }, + "used_static_kb_document_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Used Static Kb Document Ids" + }, + "file_input": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptFileInputResponseModel" + }, + { + "type": "null" + } + ] + }, + "contextual_update_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/ContextualUpdateInfo" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "role", + "time_in_call_secs" + ], + "title": "ConversationHistoryTranscriptResponseModel" + }, + "ConversationHistoryTranscriptSystemToolResultCommonModel-Input": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "result_value": { + "type": "string", + "title": "Result Value" + }, + "is_error": { + "type": "boolean", + "title": "Is Error" + }, + "is_blocked": { + "type": "boolean", + "title": "Is Blocked", + "default": false + }, + "tool_has_been_called": { + "type": "boolean", + "title": "Tool Has Been Called" + }, + "tool_latency_secs": { + "type": "number", + "title": "Tool Latency Secs", + "default": 0 + }, + "error_type": { + "type": "string", + "title": "Error Type", + "default": "" + }, + "raw_error_message": { + "type": "string", + "title": "Raw Error Message", + "default": "" + }, + "dynamic_variable_updates": { + "items": { + "$ref": "#/components/schemas/DynamicVariableUpdateCommonModel" + }, + "type": "array", + "title": "Dynamic Variable Updates" + }, + "type": { + "type": "string", + "const": "system", + "title": "Type" + }, + "result": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/EndCallToolResultModel" + }, + { + "$ref": "#/components/schemas/LanguageDetectionToolResultModel" + }, + { + "$ref": "#/components/schemas/TransferToAgentToolResultSuccessModel" + }, + { + "$ref": "#/components/schemas/TransferToAgentToolResultErrorModel" + }, + { + "$ref": "#/components/schemas/TransferToNumberResultTwilioSuccessModel" + }, + { + "$ref": "#/components/schemas/TransferToNumberResultSipSuccessModel" + }, + { + "$ref": "#/components/schemas/TransferToNumberResultErrorModel" + }, + { + "$ref": "#/components/schemas/SkipTurnToolResponseModel" + }, + { + "$ref": "#/components/schemas/PlayDTMFResultSuccessModel" + }, + { + "$ref": "#/components/schemas/PlayDTMFResultErrorModel" + }, + { + "$ref": "#/components/schemas/VoiceMailDetectionResultSuccessModel" + }, + { + "$ref": "#/components/schemas/TestToolResultModel" + }, + { + "$ref": "#/components/schemas/KnowledgeBaseRagToolResultModel" + } + ], + "discriminator": { + "propertyName": "result_type", + "mapping": { + "end_call_success": "#/components/schemas/EndCallToolResultModel", + "knowledge_base_rag_success": "#/components/schemas/KnowledgeBaseRagToolResultModel", + "language_detection_success": "#/components/schemas/LanguageDetectionToolResultModel", + "play_dtmf_error": "#/components/schemas/PlayDTMFResultErrorModel", + "play_dtmf_success": "#/components/schemas/PlayDTMFResultSuccessModel", + "skip_turn_success": "#/components/schemas/SkipTurnToolResponseModel", + "testing_tool_result": "#/components/schemas/TestToolResultModel", + "transfer_to_agent_error": "#/components/schemas/TransferToAgentToolResultErrorModel", + "transfer_to_agent_success": "#/components/schemas/TransferToAgentToolResultSuccessModel", + "transfer_to_number_error": "#/components/schemas/TransferToNumberResultErrorModel", + "transfer_to_number_sip_success": "#/components/schemas/TransferToNumberResultSipSuccessModel", + "transfer_to_number_twilio_success": "#/components/schemas/TransferToNumberResultTwilioSuccessModel", + "voicemail_detection_success": "#/components/schemas/VoiceMailDetectionResultSuccessModel" + } + } + }, + { + "type": "null" + } + ], + "title": "Result" + } + }, + "type": "object", + "required": [ + "request_id", + "tool_name", + "result_value", + "is_error", + "tool_has_been_called", + "type" + ], + "title": "ConversationHistoryTranscriptSystemToolResultCommonModel" + }, + "ConversationHistoryTranscriptSystemToolResultCommonModel-Output": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "result_value": { + "type": "string", + "title": "Result Value" + }, + "is_error": { + "type": "boolean", + "title": "Is Error" + }, + "is_blocked": { + "type": "boolean", + "title": "Is Blocked", + "default": false + }, + "tool_has_been_called": { + "type": "boolean", + "title": "Tool Has Been Called" + }, + "tool_latency_secs": { + "type": "number", + "title": "Tool Latency Secs", + "default": 0 + }, + "error_type": { + "type": "string", + "title": "Error Type", + "default": "" + }, + "raw_error_message": { + "type": "string", + "title": "Raw Error Message", + "default": "" + }, + "dynamic_variable_updates": { + "items": { + "$ref": "#/components/schemas/DynamicVariableUpdateCommonModel" + }, + "type": "array", + "title": "Dynamic Variable Updates" + }, + "type": { + "type": "string", + "const": "system", + "title": "Type" + }, + "result": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/EndCallToolResultModel" + }, + { + "$ref": "#/components/schemas/LanguageDetectionToolResultModel" + }, + { + "$ref": "#/components/schemas/TransferToAgentToolResultSuccessModel" + }, + { + "$ref": "#/components/schemas/TransferToAgentToolResultErrorModel" + }, + { + "$ref": "#/components/schemas/TransferToNumberResultTwilioSuccessModel" + }, + { + "$ref": "#/components/schemas/TransferToNumberResultSipSuccessModel" + }, + { + "$ref": "#/components/schemas/TransferToNumberResultErrorModel" + }, + { + "$ref": "#/components/schemas/SkipTurnToolResponseModel" + }, + { + "$ref": "#/components/schemas/PlayDTMFResultSuccessModel" + }, + { + "$ref": "#/components/schemas/PlayDTMFResultErrorModel" + }, + { + "$ref": "#/components/schemas/VoiceMailDetectionResultSuccessModel" + }, + { + "$ref": "#/components/schemas/TestToolResultModel" + }, + { + "$ref": "#/components/schemas/KnowledgeBaseRagToolResultModel" + } + ], + "discriminator": { + "propertyName": "result_type", + "mapping": { + "end_call_success": "#/components/schemas/EndCallToolResultModel", + "knowledge_base_rag_success": "#/components/schemas/KnowledgeBaseRagToolResultModel", + "language_detection_success": "#/components/schemas/LanguageDetectionToolResultModel", + "play_dtmf_error": "#/components/schemas/PlayDTMFResultErrorModel", + "play_dtmf_success": "#/components/schemas/PlayDTMFResultSuccessModel", + "skip_turn_success": "#/components/schemas/SkipTurnToolResponseModel", + "testing_tool_result": "#/components/schemas/TestToolResultModel", + "transfer_to_agent_error": "#/components/schemas/TransferToAgentToolResultErrorModel", + "transfer_to_agent_success": "#/components/schemas/TransferToAgentToolResultSuccessModel", + "transfer_to_number_error": "#/components/schemas/TransferToNumberResultErrorModel", + "transfer_to_number_sip_success": "#/components/schemas/TransferToNumberResultSipSuccessModel", + "transfer_to_number_twilio_success": "#/components/schemas/TransferToNumberResultTwilioSuccessModel", + "voicemail_detection_success": "#/components/schemas/VoiceMailDetectionResultSuccessModel" + } + } + }, + { + "type": "null" + } + ], + "title": "Result" + } + }, + "type": "object", + "required": [ + "request_id", + "tool_name", + "result_value", + "is_error", + "tool_has_been_called", + "type" + ], + "title": "ConversationHistoryTranscriptSystemToolResultCommonModel" + }, + "ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Input": { + "properties": { + "type": { + "type": "string", + "const": "api_integration_webhook", + "title": "Type", + "default": "api_integration_webhook" + }, + "integration_id": { + "type": "string", + "title": "Integration Id", + "default": "" + }, + "credential_id": { + "type": "string", + "title": "Credential Id", + "default": "" + }, + "integration_connection_id": { + "type": "string", + "title": "Integration Connection Id", + "default": "" + }, + "webhook_details": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails" + } + }, + "type": "object", + "required": [ + "webhook_details" + ], + "title": "ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails" + }, + "ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Output": { + "properties": { + "type": { + "type": "string", + "const": "api_integration_webhook", + "title": "Type", + "default": "api_integration_webhook" + }, + "integration_id": { + "type": "string", + "title": "Integration Id", + "default": "" + }, + "credential_id": { + "type": "string", + "title": "Credential Id", + "default": "" + }, + "integration_connection_id": { + "type": "string", + "title": "Integration Connection Id", + "default": "" + }, + "webhook_details": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails" + } + }, + "type": "object", + "required": [ + "type", + "integration_id", + "credential_id", + "integration_connection_id", + "webhook_details" + ], + "title": "ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails" + }, + "ConversationHistoryTranscriptToolCallClientDetails": { + "properties": { + "type": { + "type": "string", + "const": "client", + "title": "Type", + "default": "client" + }, + "parameters": { + "type": "string", + "title": "Parameters" + } + }, + "type": "object", + "required": [ + "parameters" + ], + "title": "ConversationHistoryTranscriptToolCallClientDetails" + }, + "ConversationHistoryTranscriptToolCallCommonModel-Input": { + "properties": { + "type": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolType" + }, + { + "type": "null" + } + ] + }, + "request_id": { + "type": "string", + "title": "Request Id" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "params_as_json": { + "type": "string", + "title": "Params As Json" + }, + "tool_has_been_called": { + "type": "boolean", + "title": "Tool Has Been Called" + }, + "tool_details": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallClientDetails" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallMCPDetails" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Input" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "api_integration_webhook": "#/components/schemas/ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Input", + "client": "#/components/schemas/ConversationHistoryTranscriptToolCallClientDetails", + "mcp": "#/components/schemas/ConversationHistoryTranscriptToolCallMCPDetails", + "webhook": "#/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails" + } + } + }, + { + "type": "null" + } + ], + "title": "Tool Details" + } + }, + "type": "object", + "required": [ + "request_id", + "tool_name", + "params_as_json", + "tool_has_been_called" + ], + "title": "ConversationHistoryTranscriptToolCallCommonModel" + }, + "ConversationHistoryTranscriptToolCallCommonModel-Output": { + "properties": { + "type": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolType" + }, + { + "type": "null" + } + ] + }, + "request_id": { + "type": "string", + "title": "Request Id" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "params_as_json": { + "type": "string", + "title": "Params As Json" + }, + "tool_has_been_called": { + "type": "boolean", + "title": "Tool Has Been Called" + }, + "tool_details": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallClientDetails" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallMCPDetails" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Output" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "api_integration_webhook": "#/components/schemas/ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Output", + "client": "#/components/schemas/ConversationHistoryTranscriptToolCallClientDetails", + "mcp": "#/components/schemas/ConversationHistoryTranscriptToolCallMCPDetails", + "webhook": "#/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails" + } + } + }, + { + "type": "null" + } + ], + "title": "Tool Details" + } + }, + "type": "object", + "required": [ + "request_id", + "tool_name", + "params_as_json", + "tool_has_been_called" + ], + "title": "ConversationHistoryTranscriptToolCallCommonModel" + }, + "ConversationHistoryTranscriptToolCallMCPDetails": { + "properties": { + "type": { + "type": "string", + "const": "mcp", + "title": "Type", + "default": "mcp" + }, + "mcp_server_id": { + "type": "string", + "title": "Mcp Server Id" + }, + "mcp_server_name": { + "type": "string", + "title": "Mcp Server Name" + }, + "integration_type": { + "type": "string", + "title": "Integration Type" + }, + "parameters": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Parameters" + }, + "approval_policy": { + "type": "string", + "title": "Approval Policy" + }, + "requires_approval": { + "type": "boolean", + "title": "Requires Approval", + "default": false + }, + "mcp_tool_name": { + "type": "string", + "title": "Mcp Tool Name", + "default": "" + }, + "mcp_tool_description": { + "type": "string", + "title": "Mcp Tool Description", + "default": "" + } + }, + "type": "object", + "required": [ + "mcp_server_id", + "mcp_server_name", + "integration_type", + "approval_policy" + ], + "title": "ConversationHistoryTranscriptToolCallMCPDetails" + }, + "ConversationHistoryTranscriptToolCallWebhookDetails": { + "properties": { + "type": { + "type": "string", + "const": "webhook", + "title": "Type", + "default": "webhook" + }, + "method": { + "type": "string", + "title": "Method" + }, + "url": { + "type": "string", + "title": "Url" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Headers" + }, + "path_params": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Path Params" + }, + "query_params": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Query Params" + }, + "body": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Body" + } + }, + "type": "object", + "required": [ + "method", + "url" + ], + "title": "ConversationHistoryTranscriptToolCallWebhookDetails" + }, + "ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Input": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "result_value": { + "type": "string", + "title": "Result Value" + }, + "is_error": { + "type": "boolean", + "title": "Is Error" + }, + "is_blocked": { + "type": "boolean", + "title": "Is Blocked", + "default": false + }, + "tool_has_been_called": { + "type": "boolean", + "title": "Tool Has Been Called" + }, + "tool_latency_secs": { + "type": "number", + "title": "Tool Latency Secs", + "default": 0 + }, + "error_type": { + "type": "string", + "title": "Error Type", + "default": "" + }, + "raw_error_message": { + "type": "string", + "title": "Raw Error Message", + "default": "" + }, + "dynamic_variable_updates": { + "items": { + "$ref": "#/components/schemas/DynamicVariableUpdateCommonModel" + }, + "type": "array", + "title": "Dynamic Variable Updates" + }, + "type": { + "type": "string", + "const": "workflow", + "title": "Type" + }, + "result": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowToolResponseModel-Input" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "request_id", + "tool_name", + "result_value", + "is_error", + "tool_has_been_called", + "type" + ], + "title": "ConversationHistoryTranscriptWorkflowToolsResultCommonModel" + }, + "ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Output": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "result_value": { + "type": "string", + "title": "Result Value" + }, + "is_error": { + "type": "boolean", + "title": "Is Error" + }, + "is_blocked": { + "type": "boolean", + "title": "Is Blocked", + "default": false + }, + "tool_has_been_called": { + "type": "boolean", + "title": "Tool Has Been Called" + }, + "tool_latency_secs": { + "type": "number", + "title": "Tool Latency Secs", + "default": 0 + }, + "error_type": { + "type": "string", + "title": "Error Type", + "default": "" + }, + "raw_error_message": { + "type": "string", + "title": "Raw Error Message", + "default": "" + }, + "dynamic_variable_updates": { + "items": { + "$ref": "#/components/schemas/DynamicVariableUpdateCommonModel" + }, + "type": "array", + "title": "Dynamic Variable Updates" + }, + "type": { + "type": "string", + "const": "workflow", + "title": "Type" + }, + "result": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowToolResponseModel-Output" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "request_id", + "tool_name", + "result_value", + "is_error", + "tool_has_been_called", + "type" + ], + "title": "ConversationHistoryTranscriptWorkflowToolsResultCommonModel" + }, + "ConversationHistoryTwilioPhoneCallModel": { + "properties": { + "direction": { + "$ref": "#/components/schemas/TelephonyDirection" + }, + "phone_number_id": { + "type": "string", + "title": "Phone Number Id" + }, + "agent_number": { + "type": "string", + "title": "Agent Number" + }, + "external_number": { + "type": "string", + "title": "External Number" + }, + "type": { + "type": "string", + "const": "twilio", + "title": "Type" + }, + "stream_sid": { + "type": "string", + "title": "Stream Sid" + }, + "call_sid": { + "type": "string", + "title": "Call Sid" + } + }, + "type": "object", + "required": [ + "direction", + "phone_number_id", + "agent_number", + "external_number", + "type", + "stream_sid", + "call_sid" + ], + "title": "ConversationHistoryTwilioPhoneCallModel" + }, + "ConversationInitiationClientDataConfig-Input": { + "properties": { + "conversation_config_override": { + "$ref": "#/components/schemas/ConversationConfigClientOverrideConfig-Input", + "description": "Overrides for the conversation configuration" + }, + "custom_llm_extra_body": { + "type": "boolean", + "title": "Custom Llm Extra Body", + "description": "Whether to include custom LLM extra body", + "default": false + }, + "enable_conversation_initiation_client_data_from_webhook": { + "type": "boolean", + "title": "Enable Conversation Initiation Client Data From Webhook", + "description": "Whether to enable conversation initiation client data from webhooks", + "default": false + }, + "enable_starting_workflow_node_id_from_client": { + "type": "boolean", + "title": "Enable Starting Workflow Node Id From Client", + "description": "Whether clients may pass starting_workflow_node_id in initiation client data; if false, sending it fails conversation start.", + "default": false + } + }, + "type": "object", + "title": "ConversationInitiationClientDataConfig", + "example": { + "custom_llm_extra_body": true, + "enable_conversation_initiation_client_data_from_webhook": true, + "enable_starting_workflow_node_id_from_client": true + } + }, + "ConversationInitiationClientDataConfig-Output": { + "properties": { + "conversation_config_override": { + "$ref": "#/components/schemas/ConversationConfigClientOverrideConfig-Output", + "description": "Overrides for the conversation configuration" + }, + "custom_llm_extra_body": { + "type": "boolean", + "title": "Custom Llm Extra Body", + "description": "Whether to include custom LLM extra body", + "default": false + }, + "enable_conversation_initiation_client_data_from_webhook": { + "type": "boolean", + "title": "Enable Conversation Initiation Client Data From Webhook", + "description": "Whether to enable conversation initiation client data from webhooks", + "default": false + }, + "enable_starting_workflow_node_id_from_client": { + "type": "boolean", + "title": "Enable Starting Workflow Node Id From Client", + "description": "Whether clients may pass starting_workflow_node_id in initiation client data; if false, sending it fails conversation start.", + "default": false + } + }, + "type": "object", + "title": "ConversationInitiationClientDataConfig", + "example": { + "custom_llm_extra_body": true, + "enable_conversation_initiation_client_data_from_webhook": true, + "enable_starting_workflow_node_id_from_client": true + } + }, + "ConversationInitiationClientDataInternal": { + "properties": { + "conversation_config_override": { + "$ref": "#/components/schemas/ConversationConfigClientOverride-Output" + }, + "custom_llm_extra_body": { + "additionalProperties": true, + "type": "object", + "title": "Custom Llm Extra Body" + }, + "user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Id", + "description": "ID of the end user participating in this conversation (for agent owner's user identification)" + }, + "source_info": { + "$ref": "#/components/schemas/ConversationInitiationSourceInfo" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id", + "description": "ID of the agent branch to use for this conversation" + }, + "environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment", + "description": "Environment to use for resolving environment variables" + }, + "starting_workflow_node_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Starting Workflow Node Id", + "description": "If set, start the workflow at this node id instead of the default entry" + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Output" + }, + "type": "object", + "title": "Dynamic Variables" + }, + "tool_mock_config": { + "$ref": "#/components/schemas/OrchestratorToolMockBehaviorConfig", + "description": "Configuration for which tools to mock and fallback behavior" + } + }, + "type": "object", + "title": "ConversationInitiationClientDataInternal" + }, + "ConversationInitiationClientDataRequest-Input": { + "properties": { + "conversation_config_override": { + "$ref": "#/components/schemas/ConversationConfigClientOverride-Input" + }, + "custom_llm_extra_body": { + "additionalProperties": true, + "type": "object", + "title": "Custom Llm Extra Body" + }, + "user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Id", + "description": "ID of the end user participating in this conversation (for agent owner's user identification)" + }, + "source_info": { + "$ref": "#/components/schemas/ConversationInitiationSourceInfo" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id", + "description": "ID of the agent branch to use for this conversation" + }, + "environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment", + "description": "Environment to use for resolving environment variables" + }, + "starting_workflow_node_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Starting Workflow Node Id", + "description": "If set, start the workflow at this node id instead of the default entry" + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Input" + }, + "type": "object", + "title": "Dynamic Variables" + } + }, + "type": "object", + "title": "ConversationInitiationClientDataRequest" + }, + "ConversationInitiationClientDataRequest-Output": { + "properties": { + "conversation_config_override": { + "$ref": "#/components/schemas/ConversationConfigClientOverride-Output" + }, + "custom_llm_extra_body": { + "additionalProperties": true, + "type": "object", + "title": "Custom Llm Extra Body" + }, + "user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Id", + "description": "ID of the end user participating in this conversation (for agent owner's user identification)" + }, + "source_info": { + "$ref": "#/components/schemas/ConversationInitiationSourceInfo" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id", + "description": "ID of the agent branch to use for this conversation" + }, + "environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment", + "description": "Environment to use for resolving environment variables" + }, + "starting_workflow_node_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Starting Workflow Node Id", + "description": "If set, start the workflow at this node id instead of the default entry" + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Output" + }, + "type": "object", + "title": "Dynamic Variables" + } + }, + "type": "object", + "title": "ConversationInitiationClientDataRequest" + }, + "ConversationInitiationClientDataWebhook": { + "properties": { + "url": { + "type": "string", + "title": "Url", + "description": "The URL to send the webhook to" + }, + "request_headers": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAISecretLocator" + } + ] + }, + "type": "object", + "title": "Request Headers", + "description": "The headers to send with the webhook request" + } + }, + "type": "object", + "required": [ + "url", + "request_headers" + ], + "title": "ConversationInitiationClientDataWebhook", + "example": { + "request_headers": { + "Content-Type": "application/json" + }, + "url": "https://example.com/webhook" + } + }, + "ConversationInitiationSource": { + "type": "string", + "enum": [ + "unknown", + "android_sdk", + "node_js_sdk", + "react_native_sdk", + "react_sdk", + "js_sdk", + "python_sdk", + "widget", + "sip_trunk", + "twilio", + "genesys", + "swift_sdk", + "whatsapp", + "twilio_sms", + "flutter_sdk", + "zendesk_integration", + "slack_integration", + "intercom_integration", + "template_preview", + "genesys_bot_connector" + ], + "title": "ConversationInitiationSource", + "description": "Enum representing the possible sources for conversation initiation.", + "default": "unknown" + }, + "ConversationInitiationSourceInfo": { + "properties": { + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationSource" + }, + { + "type": "null" + } + ], + "description": "Source of the conversation initiation" + }, + "version": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "Version", + "description": "The SDK version number" + } + }, + "type": "object", + "title": "ConversationInitiationSourceInfo", + "description": "Information about the source of conversation initiation" + }, + "ConversationSignedUrlResponseModel": { + "properties": { + "signed_url": { + "type": "string", + "title": "Signed Url" + } + }, + "type": "object", + "required": [ + "signed_url" + ], + "title": "ConversationSignedUrlResponseModel" + }, + "ConversationSimulationSpecification": { + "properties": { + "simulated_user_config": { + "$ref": "#/components/schemas/AgentConfigAPIModel-Input" + }, + "tool_mock_config": { + "additionalProperties": { + "$ref": "#/components/schemas/ToolMockConfig" + }, + "type": "object", + "title": "Tool Mock Config" + }, + "partial_conversation_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Input" + }, + "type": "array", + "title": "Partial Conversation History", + "description": "A partial conversation history to start the simulation from. If empty, simulation starts fresh." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Input" + }, + "type": "object", + "title": "Dynamic Variables" + } + }, + "type": "object", + "required": [ + "simulated_user_config" + ], + "title": "ConversationSimulationSpecification", + "description": "A specification that will be used to simulate a conversation between an agent and an AI user." + }, + "ConversationSource": { + "properties": { + "type": { + "type": "string", + "const": "conversation", + "title": "Type", + "default": "conversation" + }, + "conversation_id": { + "type": "string", + "title": "Conversation Id" + } + }, + "type": "object", + "required": [ + "conversation_id" + ], + "title": "ConversationSource" + }, + "ConversationSummaryResponseModel": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + }, + "version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id" + }, + "agent_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Name" + }, + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "start_time_unix_secs": { + "type": "integer", + "title": "Start Time Unix Secs" + }, + "call_duration_secs": { + "type": "integer", + "title": "Call Duration Secs" + }, + "message_count": { + "type": "integer", + "title": "Message Count" + }, + "status": { + "type": "string", + "enum": [ + "initiated", + "in-progress", + "processing", + "done", + "failed" + ], + "title": "Status" + }, + "termination_reason": { + "type": "string", + "title": "Termination Reason", + "default": "" + }, + "call_successful": { + "$ref": "#/components/schemas/EvaluationSuccessResult" + }, + "transcript_summary": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Transcript Summary" + }, + "call_summary_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Call Summary Title" + }, + "main_language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Main Language" + }, + "conversation_initiation_source": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationSource" + }, + { + "type": "null" + } + ] + }, + "tool_names": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tool Names" + }, + "direction": { + "anyOf": [ + { + "$ref": "#/components/schemas/TelephonyDirection" + }, + { + "type": "null" + } + ] + }, + "rating": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Rating" + } + }, + "type": "object", + "required": [ + "agent_id", + "conversation_id", + "start_time_unix_secs", + "call_duration_secs", + "message_count", + "status", + "call_successful" + ], + "title": "ConversationSummaryResponseModel" + }, + "ConversationTTSUsageModel": { + "properties": { + "primary_tts_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Primary Tts Model" + }, + "total_audio_output_seconds": { + "type": "number", + "title": "Total Audio Output Seconds", + "default": 0 + }, + "total_characters": { + "type": "integer", + "title": "Total Characters", + "default": 0 + }, + "per_voice_usage": { + "items": { + "$ref": "#/components/schemas/ConversationVoiceUsageModel" + }, + "type": "array", + "title": "Per Voice Usage" + } + }, + "type": "object", + "title": "ConversationTTSUsageModel", + "description": "Aggregated TTS usage for a conversation (analytics-only, not billing)." + }, + "ConversationTagResponseModel": { + "properties": { + "tag_id": { + "type": "string", + "title": "Tag Id" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + }, + "owner_user_id": { + "type": "string", + "title": "Owner User Id" + }, + "title": { + "type": "string", + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs" + } + }, + "type": "object", + "required": [ + "tag_id", + "workspace_id", + "owner_user_id", + "title", + "description", + "created_at_unix_secs" + ], + "title": "ConversationTagResponseModel" + }, + "ConversationTokenPurpose": { + "type": "string", + "enum": [ + "signed_url", + "shareable_link" + ], + "title": "ConversationTokenPurpose" + }, + "ConversationTokenResponseModel": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "The ID of the agent" + }, + "conversation_token": { + "type": "string", + "title": "Conversation Token", + "description": "The token for the agent" + }, + "expiration_time_unix_secs": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Expiration Time Unix Secs", + "description": "The expiration time of the token in unix seconds" + }, + "conversation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Conversation Id", + "description": "The ID of the conversation" + }, + "purpose": { + "$ref": "#/components/schemas/ConversationTokenPurpose", + "description": "The purpose of the token" + }, + "token_requester_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Token Requester User Id", + "description": "The user ID of the entity who requested the token" + } + }, + "type": "object", + "required": [ + "agent_id", + "conversation_token", + "purpose" + ], + "title": "ConversationTokenResponseModel" + }, + "ConversationTurnMetrics": { + "properties": { + "metrics": { + "additionalProperties": { + "$ref": "#/components/schemas/MetricRecord" + }, + "type": "object", + "title": "Metrics" + }, + "convai_asr_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Convai Asr Provider" + }, + "convai_tts_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Convai Tts Model" + }, + "convai_tts_cascade": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Convai Tts Cascade" + } + }, + "type": "object", + "title": "ConversationTurnMetrics" + }, + "ConversationUserResponseModel": { + "properties": { + "user_id": { + "type": "string", + "title": "User Id" + }, + "last_contact_unix_secs": { + "type": "integer", + "title": "Last Contact Unix Secs" + }, + "first_contact_unix_secs": { + "type": "integer", + "title": "First Contact Unix Secs" + }, + "conversation_count": { + "type": "integer", + "title": "Conversation Count" + }, + "last_contact_agent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Contact Agent Id" + }, + "last_contact_conversation_id": { + "type": "string", + "title": "Last Contact Conversation Id" + }, + "last_contact_agent_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Contact Agent Name" + } + }, + "type": "object", + "required": [ + "user_id", + "last_contact_unix_secs", + "first_contact_unix_secs", + "conversation_count", + "last_contact_conversation_id" + ], + "title": "ConversationUserResponseModel" + }, + "ConversationVoiceRewardModel": { + "properties": { + "voice_id": { + "type": "string", + "title": "Voice Id" + }, + "reward_usd_cents": { + "type": "number", + "title": "Reward Usd Cents" + } + }, + "type": "object", + "required": [ + "voice_id", + "reward_usd_cents" + ], + "title": "ConversationVoiceRewardModel" + }, + "ConversationVoiceUsageModel": { + "properties": { + "voice_id": { + "type": "string", + "title": "Voice Id" + }, + "audio_output_seconds": { + "type": "number", + "title": "Audio Output Seconds", + "default": 0 + } + }, + "type": "object", + "required": [ + "voice_id" + ], + "title": "ConversationVoiceUsageModel" + }, + "ConversationalConfigAPIModel-Input": { + "properties": { + "asr": { + "$ref": "#/components/schemas/ASRConversationalConfig", + "description": "Configuration for conversational transcription" + }, + "turn": { + "$ref": "#/components/schemas/TurnConfig", + "description": "Configuration for turn detection" + }, + "tts": { + "$ref": "#/components/schemas/TTSConversationalConfig-Input", + "description": "Configuration for conversational text to speech" + }, + "conversation": { + "$ref": "#/components/schemas/ConversationConfig-Input", + "description": "Configuration for conversational events" + }, + "language_presets": { + "additionalProperties": { + "$ref": "#/components/schemas/LanguagePreset-Input" + }, + "type": "object", + "title": "Language Presets", + "description": "Language presets for conversations" + }, + "vad": { + "$ref": "#/components/schemas/VADConfig", + "description": "Configuration for voice activity detection" + }, + "agent": { + "$ref": "#/components/schemas/AgentConfigAPIModel-Input", + "description": "Agent specific configuration" + } + }, + "type": "object", + "title": "ConversationalConfigAPIModel" + }, + "ConversationalConfigAPIModel-Output": { + "properties": { + "asr": { + "$ref": "#/components/schemas/ASRConversationalConfig", + "description": "Configuration for conversational transcription" + }, + "turn": { + "$ref": "#/components/schemas/TurnConfig", + "description": "Configuration for turn detection" + }, + "tts": { + "$ref": "#/components/schemas/TTSConversationalConfig-Output", + "description": "Configuration for conversational text to speech" + }, + "conversation": { + "$ref": "#/components/schemas/ConversationConfig-Output", + "description": "Configuration for conversational events" + }, + "language_presets": { + "additionalProperties": { + "$ref": "#/components/schemas/LanguagePreset-Output" + }, + "type": "object", + "title": "Language Presets", + "description": "Language presets for conversations" + }, + "vad": { + "$ref": "#/components/schemas/VADConfig", + "description": "Configuration for voice activity detection" + }, + "agent": { + "$ref": "#/components/schemas/AgentConfigAPIModel-Output", + "description": "Agent specific configuration" + } + }, + "type": "object", + "title": "ConversationalConfigAPIModel" + }, + "ConversationalConfigAPIModelWorkflowOverride-Input": { + "properties": { + "asr": { + "anyOf": [ + { + "$ref": "#/components/schemas/ASRConversationalConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational transcription" + }, + "turn": { + "anyOf": [ + { + "$ref": "#/components/schemas/TurnConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for turn detection" + }, + "tts": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSConversationalConfigWorkflowOverride-Input" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational text to speech" + }, + "conversation": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationConfigWorkflowOverride-Input" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational events" + }, + "language_presets": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/LanguagePreset-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Language Presets", + "description": "Language presets for conversations" + }, + "vad": { + "anyOf": [ + { + "$ref": "#/components/schemas/VADConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for voice activity detection" + }, + "agent": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentConfigAPIModelWorkflowOverride-Input" + }, + { + "type": "null" + } + ], + "description": "Agent specific configuration" + } + }, + "type": "object", + "title": "ConversationalConfigAPIModelWorkflowOverride", + "example": { + "agent": { + "disable_first_message_interruptions": false, + "dynamic_variables": { + "dynamic_variable_placeholders": { + "user_name": "John Doe" + } + }, + "first_message": "Hello, how can I help you today?", + "language": "en", + "prompt": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "max_tokens": -1, + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "temperature": 0, + "tool_ids": [], + "tools": [] + } + }, + "asr": { + "keywords": [ + "hello", + "world" + ], + "provider": "elevenlabs", + "quality": "high", + "user_input_audio_format": "pcm_16000" + }, + "conversation": { + "client_events": [ + "audio", + "interruption" + ], + "max_duration_seconds": 600 + }, + "tts": { + "agent_output_audio_format": "pcm_16000", + "model_id": "eleven_turbo_v2", + "optimize_streaming_latency": 3, + "pronunciation_dictionary_locators": [], + "similarity_boost": 0.8, + "speed": 1, + "stability": 0.5, + "voice_id": "cjVigY5qzO86Huf0OWal" + }, + "turn": { + "interruption_ignore_terms": [], + "mode": "turn", + "retranscribe_on_turn_timeout": false, + "silence_end_call_timeout": -1, + "soft_timeout_config": { + "message": "Hhmmmm...yeah.", + "timeout_seconds": -1, + "use_llm_generated_message": false + }, + "speculative_turn": false, + "spelling_patience": "auto", + "turn_eagerness": "normal", + "turn_timeout": 7 + }, + "vad": { + "background_voice_detection": false + } + } + }, + "ConversationalConfigAPIModelWorkflowOverride-Output": { + "properties": { + "asr": { + "anyOf": [ + { + "$ref": "#/components/schemas/ASRConversationalConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational transcription" + }, + "turn": { + "anyOf": [ + { + "$ref": "#/components/schemas/TurnConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for turn detection" + }, + "tts": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSConversationalConfigWorkflowOverride-Output" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational text to speech" + }, + "conversation": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationConfigWorkflowOverride-Output" + }, + { + "type": "null" + } + ], + "description": "Configuration for conversational events" + }, + "language_presets": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/LanguagePreset-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Language Presets", + "description": "Language presets for conversations" + }, + "vad": { + "anyOf": [ + { + "$ref": "#/components/schemas/VADConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for voice activity detection" + }, + "agent": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentConfigAPIModelWorkflowOverride-Output" + }, + { + "type": "null" + } + ], + "description": "Agent specific configuration" + } + }, + "type": "object", + "title": "ConversationalConfigAPIModelWorkflowOverride", + "example": { + "agent": { + "disable_first_message_interruptions": false, + "dynamic_variables": { + "dynamic_variable_placeholders": { + "user_name": "John Doe" + } + }, + "first_message": "Hello, how can I help you today?", + "language": "en", + "prompt": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "max_tokens": -1, + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "temperature": 0, + "tool_ids": [], + "tools": [] + } + }, + "asr": { + "keywords": [ + "hello", + "world" + ], + "provider": "elevenlabs", + "quality": "high", + "user_input_audio_format": "pcm_16000" + }, + "conversation": { + "client_events": [ + "audio", + "interruption" + ], + "max_duration_seconds": 600 + }, + "tts": { + "agent_output_audio_format": "pcm_16000", + "model_id": "eleven_turbo_v2", + "optimize_streaming_latency": 3, + "pronunciation_dictionary_locators": [], + "similarity_boost": 0.8, + "speed": 1, + "stability": 0.5, + "voice_id": "cjVigY5qzO86Huf0OWal" + }, + "turn": { + "interruption_ignore_terms": [], + "mode": "turn", + "retranscribe_on_turn_timeout": false, + "silence_end_call_timeout": -1, + "soft_timeout_config": { + "message": "Hhmmmm...yeah.", + "timeout_seconds": -1, + "use_llm_generated_message": false + }, + "speculative_turn": false, + "spelling_patience": "auto", + "turn_eagerness": "normal", + "turn_timeout": 7 + }, + "vad": { + "background_voice_detection": false + } + } + }, + "ConvertChapterResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the studio chapter conversion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "ConvertChapterResponseModel", + "example": { + "status": "ok" + } + }, + "ConvertProjectResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the studio project conversion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "ConvertProjectResponseModel", + "example": { + "status": "ok" + } + }, + "CreateAgentBranchResponseModel": { + "properties": { + "created_branch_id": { + "type": "string", + "title": "Created Branch Id", + "description": "ID of the created branch" + }, + "created_version_id": { + "type": "string", + "title": "Created Version Id", + "description": "ID of the first version on the created branch" + } + }, + "type": "object", + "required": [ + "created_branch_id", + "created_version_id" + ], + "title": "CreateAgentBranchResponseModel" + }, + "CreateAgentResponseModel": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "ID of the created agent" + } + }, + "type": "object", + "required": [ + "agent_id" + ], + "title": "CreateAgentResponseModel", + "example": { + "agent_id": "J3Pbu5gP6NNKBscdCdwB" + } + }, + "CreateAgentRuleParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "create_agent_rule", + "title": "Smb Tool Type", + "default": "create_agent_rule" + } + }, + "type": "object", + "title": "CreateAgentRuleParams" + }, + "CreateAgentTestFolderResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "CreateAgentTestFolderResponseModel" + }, + "CreateAgentTestResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "CreateAgentTestResponseModel" + }, + "CreateAssetParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "create_asset", + "title": "Smb Tool Type", + "default": "create_asset" + } + }, + "type": "object", + "title": "CreateAssetParams" + }, + "CreateAuthConnectionEnvironmentVariableRequest": { + "properties": { + "type": { + "type": "string", + "const": "auth_connection", + "title": "Type" + }, + "label": { + "type": "string", + "title": "Label", + "description": "Unique label for the environment variable." + }, + "values": { + "additionalProperties": { + "$ref": "#/components/schemas/EnvironmentVariableAuthConnectionValueRequest" + }, + "type": "object", + "title": "Values", + "description": "Environment-specific auth connection references. Must include 'production' key." + } + }, + "type": "object", + "required": [ + "type", + "label", + "values" + ], + "title": "CreateAuthConnectionEnvironmentVariableRequest" + }, + "CreateBasicAuthRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "basic_auth", + "title": "Auth Type", + "default": "basic_auth" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "username": { + "type": "string", + "title": "Username" + }, + "password": { + "type": "string", + "title": "Password" + } + }, + "type": "object", + "required": [ + "name", + "provider", + "username", + "password" + ], + "title": "CreateBasicAuthRequest", + "description": "Request model for creating Basic Auth connections - inherits common settings and includes sensitive fields" + }, + "CreateBearerAuthRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "bearer_auth", + "title": "Auth Type", + "default": "bearer_auth" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "token": { + "type": "string", + "title": "Token" + } + }, + "type": "object", + "required": [ + "name", + "provider", + "token" + ], + "title": "CreateBearerAuthRequest", + "description": "Request model for creating Bearer Auth connections - inherits common settings and includes sensitive fields" + }, + "CreateClientAppointmentParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "create_client_appointment", + "title": "Smb Tool Type", + "default": "create_client_appointment" + } + }, + "type": "object", + "title": "CreateClientAppointmentParams" + }, + "CreateClientInteractionParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "create_client_interaction", + "title": "Smb Tool Type", + "default": "create_client_interaction" + } + }, + "type": "object", + "title": "CreateClientInteractionParams" + }, + "CreateClientParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "create_client", + "title": "Smb Tool Type", + "default": "create_client" + } + }, + "type": "object", + "title": "CreateClientParams", + "description": "Create a new client in the system." + }, + "CreateConversationTagRequestModel": { + "properties": { + "title": { + "type": "string", + "maxLength": 120, + "minLength": 1, + "title": "Title", + "description": "Display title of the tag." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 1000 + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Optional free-text description." + } + }, + "type": "object", + "required": [ + "title" + ], + "title": "CreateConversationTagRequestModel" + }, + "CreateCustomHeaderAuthRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "custom_header_auth", + "title": "Auth Type", + "default": "custom_header_auth" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "header_name": { + "type": "string", + "title": "Header Name", + "description": "The name of the header to use for authentication (e.g., 'x-api-key')" + }, + "token": { + "type": "string", + "title": "Token" + } + }, + "type": "object", + "required": [ + "name", + "provider", + "header_name", + "token" + ], + "title": "CreateCustomHeaderAuthRequest" + }, + "CreateHolidayParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "create_holiday", + "title": "Smb Tool Type", + "default": "create_holiday" + } + }, + "type": "object", + "title": "CreateHolidayParams" + }, + "CreateLocationParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "create_location", + "title": "Smb Tool Type", + "default": "create_location" + } + }, + "type": "object", + "title": "CreateLocationParams" + }, + "CreateMTLSAuthRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "mtls", + "title": "Auth Type", + "default": "mtls" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "client_certificate": { + "type": "string", + "title": "Client Certificate" + }, + "client_key": { + "type": "string", + "title": "Client Key" + }, + "ca_certificate": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ca Certificate" + }, + "key_passphrase": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Key Passphrase" + } + }, + "type": "object", + "required": [ + "name", + "provider", + "client_certificate", + "client_key" + ], + "title": "CreateMTLSAuthRequest", + "description": "Request model for creating mTLS auth connections." + }, + "CreateOAuth2ClientCredsRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "oauth2_client_credentials", + "title": "Auth Type", + "default": "oauth2_client_credentials" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "client_id": { + "type": "string", + "title": "Client Id" + }, + "token_url": { + "type": "string", + "title": "Token Url" + }, + "scopes": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Scopes", + "default": [] + }, + "extra_params": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Extra Params", + "default": {} + }, + "basic_auth_in_header": { + "type": "boolean", + "title": "Basic Auth In Header", + "description": "If True, send client credentials in Authorization header as Basic Auth instead of request body", + "default": false + }, + "client_secret": { + "type": "string", + "title": "Client Secret" + }, + "custom_headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Custom Headers", + "default": {} + } + }, + "type": "object", + "required": [ + "name", + "provider", + "client_id", + "token_url", + "client_secret" + ], + "title": "CreateOAuth2ClientCredsRequest", + "description": "Request model for creating auth connections - inherits common settings and includes sensitive fields" + }, + "CreateOAuth2JWTRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "oauth2_jwt", + "title": "Auth Type", + "default": "oauth2_jwt" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "algorithm": { + "type": "string", + "enum": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512" + ], + "title": "Algorithm", + "description": "JWT signing algorithm", + "default": "HS256" + }, + "key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Key Id", + "description": "Key ID (kid) for JWT header - useful for key rotation" + }, + "issuer": { + "type": "string", + "title": "Issuer", + "description": "JWT issuer (iss claim)" + }, + "audience": { + "type": "string", + "title": "Audience", + "description": "JWT audience (aud claim)" + }, + "subject": { + "type": "string", + "title": "Subject", + "description": "JWT subject (sub claim)" + }, + "expiration_seconds": { + "type": "integer", + "maximum": 86400, + "minimum": 60, + "title": "Expiration Seconds", + "description": "Token expiration time in seconds", + "default": 3600 + }, + "extra_params": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Extra Params", + "description": "Additional custom claims to include in the JWT" + }, + "token_url": { + "type": "string", + "title": "Token Url", + "description": "Token endpoint URL for exchanging JWT for access token" + }, + "scopes": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Scopes", + "description": "OAuth2 scopes to request when exchanging JWT for access token" + }, + "token_response_field": { + "type": "string", + "enum": [ + "access_token", + "id_token" + ], + "title": "Token Response Field", + "description": "Token field to extract from the token endpoint response.", + "default": "access_token" + }, + "secret_key": { + "type": "string", + "title": "Secret Key" + } + }, + "type": "object", + "required": [ + "name", + "provider", + "issuer", + "audience", + "subject", + "token_url", + "secret_key" + ], + "title": "CreateOAuth2JWTRequest", + "description": "Request model for creating OAuth2 JWT auth connections - inherits common settings and includes sensitive fields" + }, + "CreateOrderRequest": { + "properties": { + "sandbox": { + "type": "boolean", + "title": "Sandbox", + "description": "When true, creates a sandbox order that auto-progresses without producer intervention.", + "default": false + } + }, + "type": "object", + "title": "CreateOrderRequest", + "example": { + "sandbox": false + } + }, + "CreateOrderResponse": { + "properties": { + "order_id": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the newly created order." + }, + "sandbox": { + "type": "boolean", + "title": "Sandbox", + "description": "Whether this is a sandbox order.", + "default": false + } + }, + "type": "object", + "required": [ + "order_id" + ], + "title": "CreateOrderResponse", + "example": { + "order_id": "prodorder_01jgatk6h0fwxrtbjade61yqhx", + "sandbox": false + } + }, + "CreatePhoneNumberResponseModel": { + "properties": { + "phone_number_id": { + "type": "string", + "title": "Phone Number Id", + "description": "Phone entity ID" + } + }, + "type": "object", + "required": [ + "phone_number_id" + ], + "title": "CreatePhoneNumberResponseModel" + }, + "CreatePrivateKeyJWTRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "private_key_jwt", + "title": "Auth Type", + "default": "private_key_jwt" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "algorithm": { + "type": "string", + "enum": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512" + ], + "title": "Algorithm", + "description": "JWT signing algorithm", + "default": "HS256" + }, + "key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Key Id", + "description": "Key ID (kid) for JWT header - useful for key rotation" + }, + "issuer": { + "type": "string", + "title": "Issuer", + "description": "JWT issuer (iss claim)" + }, + "audience": { + "type": "string", + "title": "Audience", + "description": "JWT audience (aud claim)" + }, + "subject": { + "type": "string", + "title": "Subject", + "description": "JWT subject (sub claim)" + }, + "expiration_seconds": { + "type": "integer", + "maximum": 86400, + "minimum": 60, + "title": "Expiration Seconds", + "description": "Token expiration time in seconds", + "default": 3600 + }, + "extra_params": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Extra Params", + "description": "Additional custom claims to include in the JWT" + }, + "secret_key": { + "type": "string", + "title": "Secret Key" + } + }, + "type": "object", + "required": [ + "name", + "provider", + "issuer", + "audience", + "subject", + "secret_key" + ], + "title": "CreatePrivateKeyJWTRequest", + "description": "Request model for creating Private Key JWT auth connections - inherits common settings and includes sensitive fields" + }, + "CreateProductParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "create_product", + "title": "Smb Tool Type", + "default": "create_product" + } + }, + "type": "object", + "title": "CreateProductParams" + }, + "CreatePronunciationDictionaryResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the create pronunciation dictionary request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "CreatePronunciationDictionaryResponseModel", + "example": { + "status": "ok" + } + }, + "CreateResponseUnitTestRequest": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Input" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Input" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Input" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "llm", + "title": "Type", + "default": "llm" + }, + "success_condition": { + "type": "string", + "title": "Success Condition", + "description": "A prompt that evaluates whether the agent's response is successful. Should return True or False.", + "default": "" + }, + "success_examples": { + "items": { + "$ref": "#/components/schemas/AgentSuccessfulResponseExample" + }, + "type": "array", + "maxItems": 5, + "title": "Success Examples", + "description": "Non-empty list of example responses that should be considered successful" + }, + "failure_examples": { + "items": { + "$ref": "#/components/schemas/AgentFailureResponseExample" + }, + "type": "array", + "maxItems": 5, + "title": "Failure Examples", + "description": "Non-empty list of example responses that should be considered failures" + }, + "name": { + "type": "string", + "title": "Name" + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "The ID of the parent folder. If not provided, the test will be created at the root level." + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CreateResponseUnitTestRequest" + }, + "CreateSIPTrunkPhoneNumberRequestV2": { + "properties": { + "phone_number": { + "type": "string", + "title": "Phone Number", + "description": "Phone number" + }, + "label": { + "type": "string", + "title": "Label", + "description": "Label for the phone number" + }, + "supports_inbound": { + "type": "boolean", + "title": "Supports Inbound", + "description": "This field is deprecated and will be removed in the future. Whether this phone number supports inbound calls", + "default": true, + "deprecated": true + }, + "supports_outbound": { + "type": "boolean", + "title": "Supports Outbound", + "description": "This field is deprecated and will be removed in the future. Whether this phone number supports outbound calls", + "default": true, + "deprecated": true + }, + "provider": { + "type": "string", + "const": "sip_trunk", + "title": "Provider", + "default": "sip_trunk" + }, + "inbound_trunk_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/InboundSIPTrunkConfigRequestModel" + }, + { + "type": "null" + } + ] + }, + "outbound_trunk_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OutboundSIPTrunkConfigRequestModel" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "phone_number", + "label" + ], + "title": "CreateSIPTrunkPhoneNumberRequestV2" + }, + "CreateSecretEnvironmentVariableRequest": { + "properties": { + "type": { + "type": "string", + "const": "secret", + "title": "Type" + }, + "label": { + "type": "string", + "title": "Label", + "description": "Unique label for the environment variable." + }, + "values": { + "additionalProperties": { + "$ref": "#/components/schemas/EnvironmentVariableSecretValueRequest" + }, + "type": "object", + "title": "Values", + "description": "Environment-specific secret references. Must include 'production' key." + } + }, + "type": "object", + "required": [ + "type", + "label", + "values" + ], + "title": "CreateSecretEnvironmentVariableRequest" + }, + "CreateServiceParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "create_service", + "title": "Smb Tool Type", + "default": "create_service" + } + }, + "type": "object", + "title": "CreateServiceParams", + "description": "Create a new service (classic, rental, or group) in the system." + }, + "CreateSimulationTestRequest": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Input" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Input" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Input" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "simulation", + "title": "Type", + "default": "simulation" + }, + "success_condition": { + "type": "string", + "title": "Success Condition", + "description": "A prompt that evaluates whether the agent's response is successful. Should return True or False.", + "default": "" + }, + "simulation_scenario": { + "type": "string", + "title": "Simulation Scenario", + "description": "Description of the simulation scenario and user persona for simulation tests.", + "default": "" + }, + "simulation_max_turns": { + "type": "integer", + "maximum": 50, + "minimum": 1, + "title": "Simulation Max Turns", + "description": "Maximum number of conversation turns for simulation tests.", + "default": 5 + }, + "simulation_environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Simulation Environment", + "description": "The environment to use when running this simulation test. If not provided, defaults to 'production'." + }, + "tool_mock_config": { + "$ref": "#/components/schemas/SimulationToolMockBehaviorConfig", + "description": "Configuration for which tools to mock and fallback behavior." + }, + "evaluation_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "LLM model to use for evaluating simulation results. Defaults to Claude Sonnet 4.6." + }, + "simulated_user_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "LLM model for the simulated user. Defaults to Claude Sonnet 4.6." + }, + "name": { + "type": "string", + "title": "Name" + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "The ID of the parent folder. If not provided, the test will be created at the root level." + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CreateSimulationTestRequest" + }, + "CreateSpeechEngineRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Name of the speech engine", + "default": "Speech Engine" + }, + "speech_engine": { + "$ref": "#/components/schemas/SpeechEngineConfig", + "description": "Speech engine WebSocket configuration" + }, + "asr": { + "$ref": "#/components/schemas/ASRConversationalConfig", + "description": "ASR configuration" + }, + "tts": { + "$ref": "#/components/schemas/TTSConversationalConfig-Input", + "description": "TTS configuration" + }, + "turn": { + "$ref": "#/components/schemas/BaseTurnConfig", + "description": "Turn detection configuration" + }, + "conversation": { + "$ref": "#/components/schemas/ConversationConfig-Input", + "description": "Conversation configuration (client events, etc.)" + }, + "privacy": { + "$ref": "#/components/schemas/PrivacyConfig-Input", + "description": "Privacy settings (recording, retention, zero retention mode)" + }, + "call_limits": { + "$ref": "#/components/schemas/AgentCallLimits", + "description": "Concurrency and daily conversation limits for this speech engine" + }, + "language": { + "type": "string", + "title": "Language", + "description": "Language for the speech engine", + "default": "en" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tags", + "description": "Tags for categorization" + }, + "overrides": { + "$ref": "#/components/schemas/SpeechEngineConversationInitiationClientDataConfig", + "description": "Override settings the client may set during conversation initiation" + } + }, + "type": "object", + "required": [ + "speech_engine" + ], + "title": "CreateSpeechEngineRequest" + }, + "CreateStaffParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "create_staff", + "title": "Smb Tool Type", + "default": "create_staff" + } + }, + "type": "object", + "title": "CreateStaffParams", + "description": "Create a new staff member in the system." + }, + "CreateStringEnvironmentVariableRequest": { + "properties": { + "type": { + "type": "string", + "const": "string", + "title": "Type" + }, + "label": { + "type": "string", + "title": "Label", + "description": "Unique label for the environment variable." + }, + "values": { + "additionalProperties": { + "type": "string", + "minLength": 1 + }, + "type": "object", + "title": "Values", + "description": "Environment-specific values. Must include 'production' key." + } + }, + "type": "object", + "required": [ + "type", + "label", + "values" + ], + "title": "CreateStringEnvironmentVariableRequest" + }, + "CreateToolCallUnitTestRequest": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Input" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Input" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Input" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "tool", + "title": "Type", + "default": "tool" + }, + "tool_call_parameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/UnitTestToolCallEvaluationModel-Input" + }, + { + "type": "null" + } + ], + "description": "How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated." + }, + "check_any_tool_matches": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Check Any Tool Matches", + "description": "If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent." + }, + "name": { + "type": "string", + "title": "Name" + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "The ID of the parent folder. If not provided, the test will be created at the root level." + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CreateToolCallUnitTestRequest" + }, + "CreateTwilioPhoneNumberRequest": { + "properties": { + "phone_number": { + "type": "string", + "title": "Phone Number", + "description": "Phone number" + }, + "label": { + "type": "string", + "title": "Label", + "description": "Label for the phone number" + }, + "supports_inbound": { + "type": "boolean", + "title": "Supports Inbound", + "description": "This field is deprecated and will be removed in the future. Whether this phone number supports inbound calls", + "default": true, + "deprecated": true + }, + "supports_outbound": { + "type": "boolean", + "title": "Supports Outbound", + "description": "This field is deprecated and will be removed in the future. Whether this phone number supports outbound calls", + "default": true, + "deprecated": true + }, + "provider": { + "type": "string", + "const": "twilio", + "title": "Provider", + "default": "twilio" + }, + "sid": { + "type": "string", + "title": "Sid", + "description": "Twilio Account SID" + }, + "token": { + "type": "string", + "title": "Token", + "description": "Twilio Auth Token" + }, + "region_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegionConfigRequest" + }, + { + "type": "null" + } + ], + "description": "Twilio Additional Region Configuration" + } + }, + "type": "object", + "required": [ + "phone_number", + "label", + "sid", + "token" + ], + "title": "CreateTwilioPhoneNumberRequest" + }, + "CueOptionsRequest": { + "properties": { + "min_duration_ms": { + "type": "integer", + "maximum": 2000, + "title": "Min Duration Ms", + "description": "Minimum duration of each cue in milliseconds.", + "default": 1000 + }, + "max_duration_ms": { + "type": "integer", + "minimum": 4000, + "title": "Max Duration Ms", + "description": "Maximum duration of each cue in milliseconds.", + "default": 7000 + }, + "max_lines_per_cue": { + "type": "integer", + "maximum": 3, + "minimum": 1, + "title": "Max Lines Per Cue", + "description": "Maximum number of lines per cue.", + "default": 2 + }, + "max_chars_per_line": { + "type": "integer", + "maximum": 50, + "minimum": 16, + "title": "Max Chars Per Line", + "description": "Maximum number of characters per line in a cue.", + "default": 42 + }, + "max_chars_per_s": { + "anyOf": [ + { + "type": "integer", + "maximum": 30, + "minimum": 15 + }, + { + "type": "null" + } + ], + "title": "Max Chars Per S", + "description": "Maximum characters per second reading speed. If not set, no reading speed limit is applied." + }, + "min_gap_between_cues_frames": { + "anyOf": [ + { + "type": "integer", + "maximum": 6, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Min Gap Between Cues Frames", + "description": "Minimum gap between consecutive cues in frames. If not set, no minimum gap is enforced." + } + }, + "type": "object", + "title": "CueOptionsRequest", + "example": { + "max_chars_per_line": 42, + "max_duration_ms": 7000, + "max_lines_per_cue": 2, + "min_duration_ms": 1000 + } + }, + "Currency": { + "type": "string", + "enum": [ + "usd", + "eur", + "inr", + "pln" + ], + "title": "Currency" + }, + "CustomGuardrail-Input": { + "properties": { + "config": { + "$ref": "#/components/schemas/CustomGuardrailsConfig-Input" + } + }, + "type": "object", + "title": "CustomGuardrail", + "description": "Container for custom guardrails, matching ModerationGuardrail pattern" + }, + "CustomGuardrail-Output": { + "properties": { + "config": { + "$ref": "#/components/schemas/CustomGuardrailsConfig-Output" + } + }, + "type": "object", + "title": "CustomGuardrail", + "description": "Container for custom guardrails, matching ModerationGuardrail pattern" + }, + "CustomGuardrailConfig": { + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Is Enabled", + "default": false + }, + "name": { + "type": "string", + "maxLength": 500, + "minLength": 1, + "title": "Name", + "description": "User-facing name for this guardrail" + }, + "prompt": { + "type": "string", + "maxLength": 10000, + "minLength": 1, + "title": "Prompt", + "description": "Instruction describing what to block, e.g. 'don't talk about politics'" + }, + "execution_mode": { + "$ref": "#/components/schemas/GuardrailExecutionMode", + "default": "streaming" + }, + "trigger_action": { + "oneOf": [ + { + "$ref": "#/components/schemas/EndCallTriggerAction" + }, + { + "$ref": "#/components/schemas/RetryTriggerAction" + } + ], + "title": "Trigger Action", + "discriminator": { + "propertyName": "type", + "mapping": { + "end_call": "#/components/schemas/EndCallTriggerAction", + "retry": "#/components/schemas/RetryTriggerAction" + } + } + } + }, + "type": "object", + "required": [ + "name", + "prompt" + ], + "title": "CustomGuardrailConfig", + "description": "Single custom guardrail configuration" + }, + "CustomGuardrailsConfig-Input": { + "properties": { + "configs": { + "items": { + "$ref": "#/components/schemas/CustomGuardrailConfig" + }, + "type": "array", + "title": "Configs" + } + }, + "type": "object", + "title": "CustomGuardrailsConfig", + "description": "Config container for custom guardrails list" + }, + "CustomGuardrailsConfig-Output": { + "properties": { + "configs": { + "items": { + "$ref": "#/components/schemas/CustomGuardrailConfig" + }, + "type": "array", + "title": "Configs" + } + }, + "type": "object", + "title": "CustomGuardrailsConfig", + "description": "Config container for custom guardrails list" + }, + "CustomHeaderAuthResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "custom_header_auth", + "title": "Auth Type", + "default": "custom_header_auth" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "header_name": { + "type": "string", + "title": "Header Name", + "description": "The name of the header to use for authentication (e.g., 'x-api-key')" + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "name", + "provider", + "header_name", + "id" + ], + "title": "CustomHeaderAuthResponse", + "description": "Response model for Custom Header Auth auth connections" + }, + "CustomLLM": { + "properties": { + "url": { + "type": "string", + "title": "Url", + "description": "The URL of the Chat Completions compatible endpoint" + }, + "model_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Model Id", + "description": "The model ID to be used if URL serves multiple models" + }, + "api_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "$ref": "#/components/schemas/ConvAIEnvVarLocator" + }, + { + "type": "null" + } + ], + "title": "Api Key", + "description": "The API key for authentication. Either a workspace secret reference {'secret_id': '...'} or an environment variable reference {'env_var_label': '...'}." + }, + "request_headers": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "$ref": "#/components/schemas/ConvAIDynamicVariable" + }, + { + "$ref": "#/components/schemas/ConvAIEnvVarLocator" + } + ] + }, + "type": "object", + "title": "Request Headers", + "description": "Headers that should be included in the request" + }, + "api_version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Api Version", + "description": "The API version to use for the request" + }, + "api_type": { + "$ref": "#/components/schemas/CustomLLMAPIType", + "description": "The API type to use (chat_completions or responses)", + "default": "chat_completions" + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "CustomLLM" + }, + "CustomLLMAPIType": { + "type": "string", + "enum": [ + "chat_completions", + "responses" + ], + "title": "CustomLLMAPIType", + "default": "chat_completions" + }, + "CustomSIPHeader": { + "properties": { + "type": { + "type": "string", + "const": "static", + "title": "Type", + "default": "static" + }, + "key": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$", + "title": "Key", + "description": "The SIP header name (e.g., 'X-Customer-ID')" + }, + "value": { + "type": "string", + "maxLength": 512, + "minLength": 1, + "pattern": "^[\\x09\\x20-\\x7E]+$", + "title": "Value", + "description": "The header value" + } + }, + "type": "object", + "required": [ + "key", + "value" + ], + "title": "CustomSIPHeader", + "description": "Custom SIP header for phone transfers with a static (validated) value." + }, + "CustomSIPHeaderWithDynamicVariable": { + "properties": { + "type": { + "type": "string", + "const": "dynamic", + "title": "Type" + }, + "key": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$", + "title": "Key", + "description": "The SIP header name (e.g., 'X-Customer-ID')" + }, + "value": { + "type": "string", + "minLength": 1, + "title": "Value", + "description": "The dynamic variable name to resolve" + } + }, + "type": "object", + "required": [ + "type", + "key", + "value" + ], + "title": "CustomSIPHeaderWithDynamicVariable", + "description": "Custom SIP header for phone transfers with a dynamic variable reference.\nThe value is a variable name that will be resolved at runtime.\nValue is not validated here since it will be substituted with actual value later." + }, + "DTMFInputConfig": { + "properties": { + "dtmf_input_timeout": { + "type": "number", + "maximum": 10, + "minimum": 0.5, + "title": "Dtmf Input Timeout", + "description": "Timeout in seconds to wait for additional DTMF digits", + "default": 2 + }, + "hash_terminator": { + "type": "boolean", + "title": "Hash Terminator", + "description": "If true, pressing # immediately completes DTMF input", + "default": true + } + }, + "type": "object", + "title": "DTMFInputConfig", + "description": "Configuration for DTMF (keypad) input collection during phone calls." + }, + "DashboardCallSuccessChartModel": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "const": "call_success", + "title": "Type", + "default": "call_success" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "DashboardCallSuccessChartModel" + }, + "DashboardCriteriaChartModel": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "const": "criteria", + "title": "Type", + "default": "criteria" + }, + "criteria_id": { + "type": "string", + "title": "Criteria Id" + } + }, + "type": "object", + "required": [ + "name", + "criteria_id" + ], + "title": "DashboardCriteriaChartModel" + }, + "DashboardDataCollectionChartModel": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "const": "data_collection", + "title": "Type", + "default": "data_collection" + }, + "data_collection_id": { + "type": "string", + "title": "Data Collection Id" + } + }, + "type": "object", + "required": [ + "name", + "data_collection_id" + ], + "title": "DashboardDataCollectionChartModel" + }, + "DataCollectionResultCommonModel": { + "properties": { + "data_collection_id": { + "type": "string", + "title": "Data Collection Id" + }, + "value": { + "title": "Value" + }, + "json_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralJsonSchemaProperty" + }, + { + "type": "null" + } + ] + }, + "rationale": { + "type": "string", + "title": "Rationale" + } + }, + "type": "object", + "required": [ + "data_collection_id", + "rationale" + ], + "title": "DataCollectionResultCommonModel" + }, + "DefaultSharingGroupResponseModel": { + "properties": { + "group": { + "$ref": "#/components/schemas/WorkspaceGroupResponseModel", + "description": "The group to share with by default" + }, + "permission_level": { + "type": "string", + "enum": [ + "admin", + "editor", + "viewer" + ], + "title": "Permission Level", + "description": "The permission level to grant to the group" + } + }, + "type": "object", + "required": [ + "group", + "permission_level" + ], + "title": "DefaultSharingGroupResponseModel" + }, + "DeleteAgentRuleParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_agent_rule", + "title": "Smb Tool Type", + "default": "delete_agent_rule" + } + }, + "type": "object", + "title": "DeleteAgentRuleParams" + }, + "DeleteAssetParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_asset", + "title": "Smb Tool Type", + "default": "delete_asset" + } + }, + "type": "object", + "title": "DeleteAssetParams" + }, + "DeleteCalendarEventParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_calendar_event", + "title": "Smb Tool Type", + "default": "delete_calendar_event" + } + }, + "type": "object", + "title": "DeleteCalendarEventParams", + "description": "Permanently remove a previously-cancelled calendar event.\n\nThis delete tool is the irreversible follow-up to cancel_calendar_event.\nThe backend rejects the call (422) if the event hasn't been\ncancelled yet, so the only safe path is cancel-then-delete." + }, + "DeleteChapterResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the studio chapter deletion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "DeleteChapterResponseModel", + "example": { + "status": "ok" + } + }, + "DeleteClientInteractionParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_client_interaction", + "title": "Smb Tool Type", + "default": "delete_client_interaction" + } + }, + "type": "object", + "title": "DeleteClientInteractionParams" + }, + "DeleteClientParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_client", + "title": "Smb Tool Type", + "default": "delete_client" + } + }, + "type": "object", + "title": "DeleteClientParams", + "description": "Delete an existing client from the system." + }, + "DeleteDubbingResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the dubbing project. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "DeleteDubbingResponseModel", + "example": { + "status": "ok" + } + }, + "DeleteGroupSessionParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_group_session", + "title": "Smb Tool Type", + "default": "delete_group_session" + } + }, + "type": "object", + "title": "DeleteGroupSessionParams", + "description": "Permanently remove a previously-cancelled group session.\n\nGroup analogue of ``delete_calendar_event``: cancel\n(``cancel_group_session_for_all``) is the soft, history-preserving step;\nthis tool is the irreversible follow-up that drops the row from Mongo\nand the staff Google Calendar entirely. The backend rejects the call\n(422) if the session hasn't been cancelled yet, so the only safe path\nis cancel-then-delete." + }, + "DeleteHistoryItemResponse": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the deletion request. If the request was successful, the status will be 'ok'. Otherwise an error message with http code 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "DeleteHistoryItemResponse", + "example": { + "status": "ok" + } + }, + "DeleteHolidayParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_holiday", + "title": "Smb Tool Type", + "default": "delete_holiday" + } + }, + "type": "object", + "title": "DeleteHolidayParams" + }, + "DeleteLocationParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_location", + "title": "Smb Tool Type", + "default": "delete_location" + } + }, + "type": "object", + "title": "DeleteLocationParams" + }, + "DeleteProductParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_product", + "title": "Smb Tool Type", + "default": "delete_product" + } + }, + "type": "object", + "title": "DeleteProductParams" + }, + "DeleteProjectResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the studio project deletion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "DeleteProjectResponseModel", + "example": { + "status": "ok" + } + }, + "DeleteSampleResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the sample deletion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "DeleteSampleResponseModel", + "example": { + "status": "ok" + } + }, + "DeleteServiceParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_service", + "title": "Smb Tool Type", + "default": "delete_service" + } + }, + "type": "object", + "title": "DeleteServiceParams", + "description": "Delete an existing service from the system." + }, + "DeleteStaffParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "delete_staff", + "title": "Smb Tool Type", + "default": "delete_staff" + } + }, + "type": "object", + "title": "DeleteStaffParams", + "description": "Delete an existing staff member from the system." + }, + "DeleteVoiceResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the voice deletion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "DeleteVoiceResponseModel", + "example": { + "status": "ok" + } + }, + "DeleteVoiceSampleResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the voice sample deletion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "DeleteVoiceSampleResponseModel", + "example": { + "status": "ok" + } + }, + "DeleteWorkspaceGroupMemberResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the workspace group member deletion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "DeleteWorkspaceGroupMemberResponseModel", + "example": { + "status": "ok" + } + }, + "DeleteWorkspaceInviteResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the workspace invite deletion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "DeleteWorkspaceInviteResponseModel", + "example": { + "status": "ok" + } + }, + "DeleteWorkspaceWebhookResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the workspace webhook deletion request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "DeleteWorkspaceWebhookResponseModel", + "example": { + "status": "ok" + } + }, + "DeliverableInfo": { + "properties": { + "signed_url": { + "type": "string", + "title": "Signed Url", + "description": "A time-limited URL to download the delivered file." + }, + "content_type": { + "type": "string", + "title": "Content Type", + "description": "The MIME type of the delivered file (e.g. 'video/mp4')." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the delivered file." + }, + "version": { + "type": "integer", + "title": "Version", + "description": "The version number of the deliverable.", + "default": 1 + } + }, + "type": "object", + "required": [ + "signed_url", + "content_type", + "name" + ], + "title": "DeliverableInfo", + "example": { + "content_type": "video/mp4", + "name": "[fr][mp4] Item #cbaba1fe", + "signed_url": "https://storage.googleapis.com/example-bucket/deliverables/output_fr.mp4?X-Goog-Signature=...", + "version": 1 + } + }, + "DependentAvailableAgentIdentifier": { + "properties": { + "referenced_resource_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Referenced Resource Ids", + "description": "If the agent is a transitive dependent, contains IDs of the resources that the agent depends on directly." + }, + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "const": "available", + "title": "Type", + "default": "available" + }, + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs" + }, + "access_level": { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ], + "title": "Access Level" + } + }, + "type": "object", + "required": [ + "id", + "name", + "created_at_unix_secs", + "access_level" + ], + "title": "DependentAvailableAgentIdentifier" + }, + "DependentAvailableMCPServerIdentifier": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "const": "available", + "title": "Type", + "default": "available" + }, + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs" + }, + "access_level": { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ], + "title": "Access Level" + } + }, + "type": "object", + "required": [ + "id", + "name", + "created_at_unix_secs", + "access_level" + ], + "title": "DependentAvailableMCPServerIdentifier" + }, + "DependentAvailableToolIdentifier": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "const": "available", + "title": "Type", + "default": "available" + }, + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs" + }, + "access_level": { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ], + "title": "Access Level" + } + }, + "type": "object", + "required": [ + "id", + "name", + "created_at_unix_secs", + "access_level" + ], + "title": "DependentAvailableToolIdentifier" + }, + "DependentBranchInfo": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "agent_name": { + "type": "string", + "title": "Agent Name" + }, + "branch_id": { + "type": "string", + "title": "Branch Id" + }, + "branch_name": { + "type": "string", + "title": "Branch Name" + }, + "is_main": { + "type": "boolean", + "title": "Is Main" + } + }, + "type": "object", + "required": [ + "agent_id", + "agent_name", + "branch_id", + "branch_name", + "is_main" + ], + "title": "DependentBranchInfo" + }, + "DependentIntegrationConnectionIdentifier": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "DependentIntegrationConnectionIdentifier", + "description": "Identifier for an integration connection that depends on an auth connection" + }, + "DependentPhoneNumberIdentifier": { + "properties": { + "phone_number_id": { + "type": "string", + "title": "Phone Number Id" + }, + "phone_number": { + "type": "string", + "title": "Phone Number" + }, + "label": { + "type": "string", + "title": "Label" + }, + "provider": { + "$ref": "#/components/schemas/TelephonyProvider" + } + }, + "type": "object", + "required": [ + "phone_number_id", + "phone_number", + "label", + "provider" + ], + "title": "DependentPhoneNumberIdentifier" + }, + "DependentUnknownAgentIdentifier": { + "properties": { + "referenced_resource_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Referenced Resource Ids", + "description": "If the agent is a transitive dependent, contains IDs of the resources that the agent depends on directly." + }, + "id": { + "type": "string", + "title": "Id" + }, + "type": { + "type": "string", + "const": "unknown", + "title": "Type", + "default": "unknown" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "DependentUnknownAgentIdentifier", + "description": "A model that represents an agent dependent on a knowledge base/tools\nto which the user has no direct access." + }, + "DependentUnknownMCPServerIdentifier": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "type": { + "type": "string", + "const": "unknown", + "title": "Type", + "default": "unknown" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "DependentUnknownMCPServerIdentifier" + }, + "DependentUnknownToolIdentifier": { + "properties": { + "type": { + "type": "string", + "const": "unknown", + "title": "Type", + "default": "unknown" + }, + "id": { + "type": "string", + "title": "Id" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "DependentUnknownToolIdentifier", + "description": "A model that represents an tool dependent on a knowledge base/tools\nto which the user has no direct access." + }, + "DetailedMusicResponse": { + "properties": { + "composition_plan": { + "$ref": "#/components/schemas/MusicPrompt", + "description": "The composition plan used to generate the song" + }, + "song_metadata": { + "$ref": "#/components/schemas/SongMetadata", + "description": "The metadata of the generated song" + }, + "words_timestamps": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/WordTimestamp" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Words Timestamps", + "description": "The timestamps of the words in the generated song" + } + }, + "type": "object", + "required": [ + "composition_plan", + "song_metadata", + "words_timestamps" + ], + "title": "DetailedMusicResponse", + "description": "Response model for structured music generation endpoint", + "example": { + "composition_plan": { + "negative_global_styles": [ + "metal", + "hip-hop", + "country" + ], + "positive_global_styles": [ + "pop", + "rock", + "jazz" + ], + "sections": [ + { + "duration_ms": 10000, + "lines": [ + "Verse 1 lyrics" + ], + "negative_local_styles": [ + "metal", + "hip-hop", + "country" + ], + "positive_local_styles": [ + "pop", + "rock", + "jazz" + ], + "section_name": "Verse 1" + } + ] + }, + "song_metadata": { + "description": "My Song Description", + "genres": [ + "pop", + "rock", + "jazz" + ], + "is_explicit": false, + "languages": [ + "en", + "fr" + ], + "title": "My Song" + }, + "words_timestamps": [ + { + "end_ms": 1000, + "start_ms": 0, + "word": "Verse" + }, + { + "end_ms": 2000, + "start_ms": 1000, + "word": "1" + }, + { + "end_ms": 3000, + "start_ms": 2000, + "word": "lyrics" + } + ] + } + }, + "DetectedEntity": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The text that was identified as an entity." + }, + "entity_type": { + "type": "string", + "title": "Entity Type", + "description": "The type of entity detected (e.g., 'credit_card', 'email_address', 'person_name')." + }, + "start_char": { + "type": "integer", + "title": "Start Char", + "description": "Start character position in the transcript text." + }, + "end_char": { + "type": "integer", + "title": "End Char", + "description": "End character position in the transcript text." + } + }, + "type": "object", + "required": [ + "text", + "entity_type", + "start_char", + "end_char" + ], + "title": "DetectedEntity" + }, + "DeviceModel": { + "properties": { + "ip": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ip", + "description": "IP address" + }, + "hostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Hostname", + "description": "Device hostname" + }, + "type_id": { + "type": "integer", + "title": "Type Id", + "description": "Device type ID (99 = Unknown)", + "default": 99 + } + }, + "additionalProperties": false, + "type": "object", + "title": "DeviceModel", + "description": "Device information.\n\nSpec: https://schema.ocsf.io/1.6.0/objects/device" + }, + "DialogueInput": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The text to be converted into speech." + }, + "voice_id": { + "type": "string", + "title": "Voice Id", + "description": "The ID of the voice to be used for the generation." + } + }, + "type": "object", + "required": [ + "text", + "voice_id" + ], + "title": "DialogueInput" + }, + "DialogueInputResponseModel": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The text of the dialogue input line." + }, + "voice_id": { + "type": "string", + "title": "Voice Id", + "description": "The ID of the voice used for this dialogue input line." + }, + "voice_name": { + "type": "string", + "title": "Voice Name", + "description": "The name of the voice used for this dialogue input line." + } + }, + "type": "object", + "required": [ + "text", + "voice_id", + "voice_name" + ], + "title": "DialogueInputResponseModel" + }, + "DirectPublishingReadResponseModel": { + "properties": { + "read_id": { + "type": "string", + "title": "Read Id" + }, + "created_at_unix": { + "type": "integer", + "title": "Created At Unix" + }, + "updated_at_unix": { + "type": "integer", + "title": "Updated At Unix" + }, + "word_count": { + "type": "integer", + "title": "Word Count" + }, + "char_count": { + "type": "integer", + "title": "Char Count" + }, + "chapters": { + "items": { + "$ref": "#/components/schemas/ReadMetadataChapterDBModel" + }, + "type": "array", + "title": "Chapters" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "author": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Author" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "article_image_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Article Image Url" + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language" + }, + "locale": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Locale" + }, + "display_mode": { + "anyOf": [ + { + "type": "string", + "enum": [ + "text", + "audio-only", + "text-with-audio" + ] + }, + { + "type": "null" + } + ], + "title": "Display Mode" + }, + "genre": { + "anyOf": [ + { + "items": { + "type": "string", + "enum": [ + "Fantasy", + "Romance", + "Science Fiction", + "Mystery and Thriller", + "Action and Adventure", + "Dystopia", + "Business and Economics", + "Technology", + "Christian & Inspirational", + "Horror", + "Biography and Memoir", + "Education and Learning", + "History", + "Children's Literature", + "Young Adult", + "Fairy Tales and Folklore", + "Fan Fiction", + "General Fiction", + "Health and Wellness", + "Historical Fiction", + "Humor", + "Literary Classics", + "Philosophy", + "Poetry", + "Politics and Government", + "Psychology", + "Science and Nature", + "Self-Help", + "Spirituality and Religion", + "Travel", + "True Crime", + "Other" + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Genre" + }, + "fiction": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Fiction" + }, + "content_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type" + }, + "original_file_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Original File Type" + }, + "target_audience": { + "anyOf": [ + { + "type": "string", + "enum": [ + "children", + "young adult", + "adult", + "all ages" + ] + }, + { + "type": "null" + } + ], + "title": "Target Audience" + }, + "mature_content": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Mature Content" + }, + "origin": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Origin" + }, + "publication_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Publication Date" + }, + "isbn": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Isbn" + }, + "ean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ean" + }, + "legal_terms": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReadLegalTerms" + }, + { + "type": "null" + } + ] + }, + "content_guidelines_terms": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReadLegalTerms" + }, + { + "type": "null" + } + ] + }, + "last_updated_from_project_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Last Updated From Project Unix" + }, + "publishing_project_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Publishing Project Id" + }, + "publishing_state": { + "type": "string", + "title": "Publishing State", + "default": "published" + }, + "publisher_profile_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Publisher Profile Id" + }, + "quality_score": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Quality Score" + }, + "publisher": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Publisher" + }, + "copyright": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Copyright" + }, + "subtitle": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Subtitle" + }, + "distribution_territories": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Distribution Territories" + }, + "edition": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Edition" + }, + "contributors": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Contributor" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Contributors" + }, + "payout_type": { + "anyOf": [ + { + "type": "string", + "enum": [ + "none", + "engagement_based", + "fixed_payout" + ] + }, + { + "type": "null" + } + ], + "title": "Payout Type" + }, + "list_price": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "List Price" + }, + "currency": { + "anyOf": [ + { + "type": "string", + "const": "usd" + }, + { + "type": "null" + } + ], + "title": "Currency" + }, + "original_audio_project_export_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Original Audio Project Export Id" + }, + "original_audio_document_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Original Audio Document Id" + }, + "series_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Series Id" + }, + "volume": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Volume" + }, + "published_at_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Published At Unix" + }, + "read_slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Read Slug" + }, + "preview_audio_object": { + "anyOf": [ + { + "$ref": "#/components/schemas/PreviewAudioDBModel" + }, + { + "type": "null" + } + ] + }, + "sample_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/SampleConfigDBModel" + }, + { + "type": "null" + } + ] + }, + "review": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReviewResponseModel" + }, + { + "type": "null" + } + ] + }, + "voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Id" + }, + "can_use_assistant": { + "type": "boolean", + "title": "Can Use Assistant", + "default": true + }, + "is_voice_changer_on": { + "type": "boolean", + "title": "Is Voice Changer On", + "default": false + } + }, + "type": "object", + "required": [ + "read_id", + "created_at_unix", + "updated_at_unix", + "word_count", + "char_count", + "chapters" + ], + "title": "DirectPublishingReadResponseModel" + }, + "DiscountResponseModel": { + "properties": { + "discount_percent_off": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Discount Percent Off", + "description": "The discount applied to the invoice. E.g. [20.0f] for 20% off." + }, + "discount_amount_off": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Discount Amount Off", + "description": "The discount applied to the invoice. E.g. [20.0f] for 20 cents off." + } + }, + "type": "object", + "title": "DiscountResponseModel" + }, + "DoDubbingResponseModel": { + "properties": { + "dubbing_id": { + "type": "string", + "title": "Dubbing Id", + "description": "The ID of the dubbing project." + }, + "expected_duration_sec": { + "type": "number", + "title": "Expected Duration Sec", + "description": "The expected duration of the dubbing project in seconds." + } + }, + "type": "object", + "required": [ + "dubbing_id", + "expected_duration_sec" + ], + "title": "DoDubbingResponseModel", + "example": { + "dubbing_id": "21m00Tcm4TlvDq8ikWAM", + "expected_duration_sec": 127.5 + } + }, + "DocumentUsageModeEnum": { + "type": "string", + "enum": [ + "prompt", + "auto" + ], + "title": "DocumentUsageModeEnum", + "default": "auto" + }, + "DocxExportOptions": { + "properties": { + "include_speakers": { + "type": "boolean", + "title": "Include Speakers", + "default": true + }, + "include_timestamps": { + "type": "boolean", + "title": "Include Timestamps", + "default": true + }, + "format": { + "type": "string", + "const": "docx", + "title": "Format" + }, + "segment_on_silence_longer_than_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Segment On Silence Longer Than S" + }, + "max_segment_duration_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Segment Duration S" + }, + "max_segment_chars": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Segment Chars" + } + }, + "type": "object", + "required": [ + "format" + ], + "title": "DocxExportOptions" + }, + "DubOrderItemRequest": { + "properties": { + "kind": { + "type": "string", + "const": "dub", + "title": "Kind", + "description": "The type of order item.", + "default": "dub" + }, + "media_id": { + "$ref": "#/components/schemas/MediaId", + "description": "The ID of the uploaded media file to dub." + }, + "source_language": { + "type": "string", + "title": "Source Language", + "description": "The language code of the source media (e.g. 'en', 'es')." + }, + "destination_languages": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Destination Languages", + "description": "List of target language codes to dub the media into." + }, + "include_captions": { + "type": "boolean", + "title": "Include Captions", + "description": "Whether to generate captions for the dubbed outputs." + }, + "include_source_captions": { + "type": "boolean", + "title": "Include Source Captions", + "description": "Whether to generate captions for the source language." + }, + "instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Instructions", + "description": "Optional free-text instructions for the dubbing team." + }, + "captions_sdh": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Captions Sdh", + "description": "Whether captions should use SDH format, which includes descriptions for deaf and hard-of-hearing viewers." + } + }, + "type": "object", + "required": [ + "media_id", + "source_language", + "destination_languages", + "include_captions", + "include_source_captions" + ], + "title": "DubOrderItemRequest", + "example": { + "captions_sdh": false, + "destination_languages": [ + "hi", + "fr-FR", + "de" + ], + "include_captions": true, + "include_source_captions": false, + "instructions": "Voices don't need to match the originals, prioritize native-sounding voices", + "kind": "dub", + "media_id": "prodmedia_01jgatk6h0fwxrtbjade61yqhx", + "source_language": "en" + } + }, + "DubbedSegment": { + "properties": { + "start_time": { + "type": "number", + "title": "Start Time" + }, + "end_time": { + "type": "number", + "title": "End Time" + }, + "text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text" + }, + "subtitles": { + "items": { + "$ref": "#/components/schemas/SegmentSubtitleFrame" + }, + "type": "array", + "title": "Subtitles" + }, + "audio_stale": { + "type": "boolean", + "title": "Audio Stale" + }, + "media_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/DubbingMediaReference" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "start_time", + "end_time", + "text", + "subtitles", + "audio_stale", + "media_ref" + ], + "title": "DubbedSegment" + }, + "DubbingMediaMetadata": { + "properties": { + "content_type": { + "type": "string", + "title": "Content Type", + "description": "The content type of the media." + }, + "duration": { + "type": "number", + "title": "Duration", + "description": "The duration of the media in seconds." + } + }, + "type": "object", + "required": [ + "content_type", + "duration" + ], + "title": "DubbingMediaMetadata" + }, + "DubbingMediaReference": { + "properties": { + "src": { + "type": "string", + "title": "Src" + }, + "content_type": { + "type": "string", + "title": "Content Type" + }, + "bucket_name": { + "type": "string", + "title": "Bucket Name" + }, + "random_path_slug": { + "type": "string", + "title": "Random Path Slug" + }, + "duration_secs": { + "type": "number", + "title": "Duration Secs" + }, + "is_audio": { + "type": "boolean", + "title": "Is Audio" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "type": "object", + "required": [ + "src", + "content_type", + "bucket_name", + "random_path_slug", + "duration_secs", + "is_audio", + "url" + ], + "title": "DubbingMediaReference" + }, + "DubbingMetadataPageResponseModel": { + "properties": { + "dubs": { + "items": { + "$ref": "#/components/schemas/DubbingMetadataResponse" + }, + "type": "array", + "title": "Dubs" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "dubs", + "next_cursor", + "has_more" + ], + "title": "DubbingMetadataPageResponseModel" + }, + "DubbingMetadataResponse": { + "properties": { + "dubbing_id": { + "type": "string", + "title": "Dubbing Id", + "description": "The ID of the dubbing project." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the dubbing project." + }, + "status": { + "type": "string", + "title": "Status", + "description": "The state this dub is in.", + "examples": [ + "preparing", + "queued", + "dubbing", + "dubbed", + "failed", + "cloning" + ] + }, + "source_language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Language", + "description": "Once dubbing has completed, the ISO-639-1 code of the original media's source language." + }, + "target_languages": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Target Languages", + "description": "The ISO-639-1 code of the languages this media has been dubbed into." + }, + "editable": { + "type": "boolean", + "title": "Editable", + "description": "Whether this dubbing project is editable in Dubbing Studio.", + "default": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At", + "description": "Timestamp this dub was created." + }, + "media_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/DubbingMediaMetadata" + }, + { + "type": "null" + } + ], + "description": "Metadata, such as the length in seconds and content type, of the dubbed content." + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error", + "description": "Error message indicate, if this dub has failed, what happened." + } + }, + "type": "object", + "required": [ + "dubbing_id", + "name", + "status", + "source_language", + "target_languages", + "created_at" + ], + "title": "DubbingMetadataResponse", + "example": { + "created_at": "2025-07-15T14:49:41.149000", + "dubbing_id": "21m00Tcm4TlvDq8ikWAM", + "editable": true, + "media_metadata": { + "content_type": "video/mp4", + "duration": 127.5 + }, + "name": "My Dubbing Project", + "source_language": "en", + "status": "dubbed", + "target_languages": [ + "es", + "fr", + "de" + ] + } + }, + "DubbingRenderResponseModel": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + }, + "render_id": { + "type": "string", + "title": "Render Id" + } + }, + "type": "object", + "required": [ + "version", + "render_id" + ], + "title": "DubbingRenderResponseModel" + }, + "DubbingResource": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "version": { + "type": "integer", + "title": "Version" + }, + "source_language": { + "type": "string", + "title": "Source Language" + }, + "target_languages": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Target Languages" + }, + "input": { + "$ref": "#/components/schemas/DubbingMediaReference" + }, + "background": { + "anyOf": [ + { + "$ref": "#/components/schemas/DubbingMediaReference" + }, + { + "type": "null" + } + ] + }, + "foreground": { + "anyOf": [ + { + "$ref": "#/components/schemas/DubbingMediaReference" + }, + { + "type": "null" + } + ] + }, + "speaker_tracks": { + "additionalProperties": { + "$ref": "#/components/schemas/SpeakerTrack" + }, + "type": "object", + "title": "Speaker Tracks" + }, + "speaker_segments": { + "additionalProperties": { + "$ref": "#/components/schemas/SpeakerSegment" + }, + "type": "object", + "title": "Speaker Segments" + }, + "renders": { + "additionalProperties": { + "$ref": "#/components/schemas/Render" + }, + "type": "object", + "title": "Renders" + } + }, + "type": "object", + "required": [ + "id", + "version", + "source_language", + "target_languages", + "input", + "background", + "foreground", + "speaker_tracks", + "speaker_segments", + "renders" + ], + "title": "DubbingResource" + }, + "DubbingTranscript": { + "properties": { + "language": { + "type": "string", + "title": "Language" + }, + "utterances": { + "items": { + "$ref": "#/components/schemas/DubbingTranscriptUtterance" + }, + "type": "array", + "title": "Utterances" + } + }, + "type": "object", + "required": [ + "language", + "utterances" + ], + "title": "DubbingTranscript" + }, + "DubbingTranscriptCharacter": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "default": "" + }, + "start_s": { + "type": "number", + "title": "Start S", + "default": 0 + }, + "end_s": { + "type": "number", + "title": "End S", + "default": 0 + } + }, + "type": "object", + "title": "DubbingTranscriptCharacter" + }, + "DubbingTranscriptResponseModel": { + "properties": { + "language": { + "type": "string", + "title": "Language" + }, + "utterances": { + "items": { + "$ref": "#/components/schemas/DubbingTranscriptUtterance" + }, + "type": "array", + "title": "Utterances" + } + }, + "type": "object", + "required": [ + "language", + "utterances" + ], + "title": "DubbingTranscriptResponseModel" + }, + "DubbingTranscriptUtterance": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "default": "" + }, + "speaker_id": { + "type": "string", + "title": "Speaker Id", + "default": "unknown" + }, + "start_s": { + "type": "number", + "title": "Start S", + "default": 0 + }, + "end_s": { + "type": "number", + "title": "End S", + "default": 0 + }, + "words": { + "items": { + "$ref": "#/components/schemas/DubbingTranscriptWord" + }, + "type": "array", + "title": "Words" + } + }, + "type": "object", + "title": "DubbingTranscriptUtterance" + }, + "DubbingTranscriptWord": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "default": "" + }, + "word_type": { + "type": "string", + "title": "Word Type", + "default": "unknown" + }, + "start_s": { + "type": "number", + "title": "Start S", + "default": 0 + }, + "end_s": { + "type": "number", + "title": "End S", + "default": 0 + }, + "characters": { + "items": { + "$ref": "#/components/schemas/DubbingTranscriptCharacter" + }, + "type": "array", + "title": "Characters" + } + }, + "type": "object", + "title": "DubbingTranscriptWord" + }, + "DubbingTranscriptsResponseModel": { + "properties": { + "transcript_format": { + "type": "string", + "enum": [ + "srt", + "webvtt", + "json" + ], + "title": "Transcript Format" + }, + "srt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Srt" + }, + "webvtt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Webvtt" + }, + "json": { + "anyOf": [ + { + "$ref": "#/components/schemas/DubbingTranscript" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "transcript_format" + ], + "title": "DubbingTranscriptsResponseModel" + }, + "DynamicVariableAssignment": { + "properties": { + "source": { + "type": "string", + "const": "response", + "title": "Source", + "description": "The source to extract the value from. Currently only 'response' is supported.", + "default": "response" + }, + "dynamic_variable": { + "type": "string", + "title": "Dynamic Variable", + "description": "The name of the dynamic variable to assign the extracted value to" + }, + "value_path": { + "type": "string", + "title": "Value Path", + "description": "Dot notation path to extract the value from the source (e.g., 'user.name' or 'data.0.id')" + }, + "sanitize": { + "type": "boolean", + "title": "Sanitize", + "description": "If true, this assignment's value will be removed from the tool response before sending to the LLM and transcript, but still processed for variable assignment.", + "default": false + }, + "preserve_native_type": { + "type": "boolean", + "title": "Preserve Native Type", + "description": "If true, non-scalar values (lists, objects) extracted from the tool response are stored as their native type instead of being stringified to JSON. Enable this to use extracted arrays directly as list dynamic variables.", + "default": false + } + }, + "type": "object", + "required": [ + "dynamic_variable", + "value_path" + ], + "title": "DynamicVariableAssignment", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables.", + "example": { + "dynamic_variable": "user_name", + "preserve_native_type": false, + "sanitize": false, + "source": "response", + "value_path": "user.name" + } + }, + "DynamicVariableNestedValueType-Input": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "items": { + "$ref": "#/components/schemas/DynamicVariableNestedValueType-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "DynamicVariableNestedValueType-Output": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "items": { + "$ref": "#/components/schemas/DynamicVariableNestedValueType-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "DynamicVariableSchemaOverride": { + "properties": { + "source": { + "type": "string", + "const": "dynamic_variable", + "title": "Source", + "default": "dynamic_variable" + }, + "dynamic_variable": { + "type": "string", + "minLength": 1, + "title": "Dynamic Variable", + "description": "The name of the dynamic variable to use" + } + }, + "type": "object", + "required": [ + "dynamic_variable" + ], + "title": "DynamicVariableSchemaOverride" + }, + "DynamicVariableUpdateCommonModel": { + "properties": { + "variable_name": { + "type": "string", + "title": "Variable Name" + }, + "old_value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Value" + }, + "new_value": { + "type": "string", + "title": "New Value" + }, + "updated_at": { + "type": "number", + "title": "Updated At" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "tool_request_id": { + "type": "string", + "title": "Tool Request Id" + } + }, + "type": "object", + "required": [ + "variable_name", + "old_value", + "new_value", + "updated_at", + "tool_name", + "tool_request_id" + ], + "title": "DynamicVariableUpdateCommonModel", + "description": "Tracks a dynamic variable update that occurred during tool execution." + }, + "DynamicVariableValueType-Input": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "boolean" + }, + { + "items": { + "$ref": "#/components/schemas/DynamicVariableNestedValueType-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "DynamicVariableValueType-Output": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "boolean" + }, + { + "items": { + "$ref": "#/components/schemas/DynamicVariableNestedValueType-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "DynamicVariablesConfig-Input": { + "properties": { + "dynamic_variable_placeholders": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Input" + }, + "type": "object", + "title": "Dynamic Variable Placeholders", + "description": "A dictionary of dynamic variable placeholders and their values" + } + }, + "type": "object", + "title": "DynamicVariablesConfig", + "example": { + "dynamic_variable_placeholders": { + "user_name": "John Doe" + } + } + }, + "DynamicVariablesConfig-Output": { + "properties": { + "dynamic_variable_placeholders": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Output" + }, + "type": "object", + "title": "Dynamic Variable Placeholders", + "description": "A dictionary of dynamic variable placeholders and their values" + } + }, + "type": "object", + "title": "DynamicVariablesConfig", + "example": { + "dynamic_variable_placeholders": { + "user_name": "John Doe" + } + } + }, + "DynamicVariablesConfigWorkflowOverride-Input": { + "properties": { + "dynamic_variable_placeholders": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Dynamic Variable Placeholders", + "description": "A dictionary of dynamic variable placeholders and their values" + } + }, + "type": "object", + "title": "DynamicVariablesConfigWorkflowOverride", + "example": { + "dynamic_variable_placeholders": { + "user_name": "John Doe" + } + } + }, + "DynamicVariablesConfigWorkflowOverride-Output": { + "properties": { + "dynamic_variable_placeholders": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Dynamic Variable Placeholders", + "description": "A dictionary of dynamic variable placeholders and their values" + } + }, + "type": "object", + "title": "DynamicVariablesConfigWorkflowOverride", + "example": { + "dynamic_variable_placeholders": { + "user_name": "John Doe" + } + } + }, + "EditChapterResponseModel": { + "properties": { + "chapter": { + "$ref": "#/components/schemas/ChapterWithContentResponseModel" + } + }, + "type": "object", + "required": [ + "chapter" + ], + "title": "EditChapterResponseModel" + }, + "EditProjectResponseModel": { + "properties": { + "project": { + "$ref": "#/components/schemas/ProjectResponseModel" + } + }, + "type": "object", + "required": [ + "project" + ], + "title": "EditProjectResponseModel" + }, + "EditVoiceResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the voice edit request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "EditVoiceResponseModel", + "example": { + "status": "ok" + } + }, + "EditVoiceSettingsResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the voice settings edit request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "EditVoiceSettingsResponseModel", + "example": { + "status": "ok" + } + }, + "EmbedVariant": { + "type": "string", + "enum": [ + "tiny", + "compact", + "full", + "expandable" + ], + "title": "EmbedVariant", + "default": "full" + }, + "EmbeddingModelEnum": { + "type": "string", + "enum": [ + "e5_mistral_7b_instruct", + "multilingual_e5_large_instruct" + ], + "title": "EmbeddingModelEnum", + "default": "e5_mistral_7b_instruct" + }, + "EndCallToolConfig": { + "properties": { + "system_tool_type": { + "type": "string", + "const": "end_call", + "title": "System Tool Type", + "default": "end_call" + } + }, + "type": "object", + "title": "EndCallToolConfig" + }, + "EndCallToolResultModel": { + "properties": { + "result_type": { + "type": "string", + "const": "end_call_success", + "title": "Result Type", + "default": "end_call_success" + }, + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + } + }, + "type": "object", + "title": "EndCallToolResultModel" + }, + "EndCallTriggerAction": { + "properties": { + "type": { + "type": "string", + "const": "end_call", + "title": "Type", + "default": "end_call" + } + }, + "type": "object", + "title": "EndCallTriggerAction" + }, + "EntityManagementActivityId": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 99 + ], + "title": "EntityManagementActivityId", + "description": "OCSF Activity IDs for Entity Management [3004] events.\n\nSpec: https://schema.ocsf.io/1.6.0/classes/entity_management" + }, + "EnvironmentAuthConnectionLocator": { + "properties": { + "env_var_label": { + "type": "string", + "title": "Env Var Label" + } + }, + "type": "object", + "required": [ + "env_var_label" + ], + "title": "EnvironmentAuthConnectionLocator", + "description": "References an environment variable of type 'auth_connection' by label.\nAt runtime, resolves to the auth connection for the current environment,\nfalling back to the default environment." + }, + "EnvironmentVariableAuthConnectionValue": { + "properties": { + "auth_connection_id": { + "type": "string", + "title": "Auth Connection Id" + } + }, + "type": "object", + "required": [ + "auth_connection_id" + ], + "title": "EnvironmentVariableAuthConnectionValue" + }, + "EnvironmentVariableAuthConnectionValueRequest": { + "properties": { + "auth_connection_id": { + "type": "string", + "title": "Auth Connection Id" + } + }, + "type": "object", + "required": [ + "auth_connection_id" + ], + "title": "EnvironmentVariableAuthConnectionValueRequest" + }, + "EnvironmentVariableResponse": { + "properties": { + "label": { + "type": "string", + "title": "Label" + }, + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs" + }, + "updated_at_unix_secs": { + "type": "integer", + "title": "Updated At Unix Secs" + }, + "created_by_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created By User Id" + }, + "type": { + "type": "string", + "enum": [ + "string", + "secret", + "auth_connection" + ], + "title": "Type" + }, + "id": { + "type": "string", + "title": "Id" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + }, + "values": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "additionalProperties": { + "$ref": "#/components/schemas/EnvironmentVariableSecretValue" + }, + "type": "object" + }, + { + "additionalProperties": { + "$ref": "#/components/schemas/EnvironmentVariableAuthConnectionValue" + }, + "type": "object" + } + ], + "title": "Values" + } + }, + "type": "object", + "required": [ + "label", + "created_at_unix_secs", + "updated_at_unix_secs", + "type", + "id", + "workspace_id", + "values" + ], + "title": "EnvironmentVariableResponse" + }, + "EnvironmentVariableSecretValue": { + "properties": { + "secret_id": { + "type": "string", + "title": "Secret Id" + } + }, + "type": "object", + "required": [ + "secret_id" + ], + "title": "EnvironmentVariableSecretValue" + }, + "EnvironmentVariableSecretValueRequest": { + "properties": { + "secret_id": { + "type": "string", + "title": "Secret Id" + } + }, + "type": "object", + "required": [ + "secret_id" + ], + "title": "EnvironmentVariableSecretValueRequest" + }, + "EnvironmentVariablesListResponse": { + "properties": { + "environment_variables": { + "items": { + "$ref": "#/components/schemas/EnvironmentVariableResponse" + }, + "type": "array", + "title": "Environment Variables" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "environment_variables", + "has_more" + ], + "title": "EnvironmentVariablesListResponse" + }, + "EvaluationSettings-Input": { + "properties": { + "criteria": { + "items": { + "$ref": "#/components/schemas/PromptEvaluationCriteria" + }, + "type": "array", + "title": "Criteria", + "description": "Individual criteria that the agent should be evaluated against" + } + }, + "type": "object", + "title": "EvaluationSettings", + "description": "Settings to evaluate an agent's performance.\nAgents are evaluated against a set of criteria, with success being defined as meeting some combination of those criteria." + }, + "EvaluationSettings-Output": { + "properties": { + "criteria": { + "items": { + "$ref": "#/components/schemas/PromptEvaluationCriteria" + }, + "type": "array", + "title": "Criteria", + "description": "Individual criteria that the agent should be evaluated against" + } + }, + "type": "object", + "title": "EvaluationSettings", + "description": "Settings to evaluate an agent's performance.\nAgents are evaluated against a set of criteria, with success being defined as meeting some combination of those criteria." + }, + "EvaluationSuccessResult": { + "type": "string", + "enum": [ + "success", + "failure", + "unknown" + ], + "title": "EvaluationSuccessResult" + }, + "ExactParameterEvaluationStrategy": { + "properties": { + "type": { + "type": "string", + "const": "exact", + "title": "Type" + }, + "expected_value": { + "type": "string", + "title": "Expected Value", + "description": "The exact string value that the parameter must match." + } + }, + "type": "object", + "required": [ + "type", + "expected_value" + ], + "title": "ExactParameterEvaluationStrategy" + }, + "ExportOptions": { + "oneOf": [ + { + "$ref": "#/components/schemas/SegmentedJsonExportOptions" + }, + { + "$ref": "#/components/schemas/DocxExportOptions" + }, + { + "$ref": "#/components/schemas/PdfExportOptions" + }, + { + "$ref": "#/components/schemas/TxtExportOptions" + }, + { + "$ref": "#/components/schemas/HtmlExportOptions" + }, + { + "$ref": "#/components/schemas/SrtExportOptions" + } + ], + "title": "ExportOptions", + "discriminator": { + "propertyName": "format", + "mapping": { + "docx": "#/components/schemas/DocxExportOptions", + "html": "#/components/schemas/HtmlExportOptions", + "pdf": "#/components/schemas/PdfExportOptions", + "segmented_json": "#/components/schemas/SegmentedJsonExportOptions", + "srt": "#/components/schemas/SrtExportOptions", + "txt": "#/components/schemas/TxtExportOptions" + } + } + }, + "ExtendedSubscriptionResponseModel": { + "properties": { + "tier": { + "type": "string", + "title": "Tier", + "description": "The tier of the user's subscription." + }, + "character_count": { + "type": "integer", + "title": "Character Count", + "description": "The number of characters used by the user." + }, + "character_limit": { + "type": "integer", + "title": "Character Limit", + "description": "The maximum number of characters allowed in the current billing period." + }, + "max_character_limit_extension": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Character Limit Extension", + "description": "Deprecated: use `max_credit_limit_extension`. Maximum number of characters that the character limit can be exceeded by. Managed by the workspace admin." + }, + "max_credit_limit_extension": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string", + "const": "unlimited" + } + ], + "title": "Max Credit Limit Extension", + "description": "Maximum number of credits that the credit limit can be exceeded by. Managed by the workspace admin. `\"unlimited\"` means no cap, `0` means usage-based billing is disabled." + }, + "can_extend_character_limit": { + "type": "boolean", + "title": "Can Extend Character Limit", + "description": "Whether the workspace is entitled to enter overages (usage-based billing)." + }, + "allowed_to_extend_character_limit": { + "type": "boolean", + "title": "Allowed To Extend Character Limit", + "description": "Deprecated: use `max_credit_limit_extension != 0`. Whether the user is allowed to extend their character limit." + }, + "next_character_count_reset_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Next Character Count Reset Unix", + "description": "The Unix timestamp of the next character count reset." + }, + "voice_slots_used": { + "type": "integer", + "title": "Voice Slots Used", + "description": "The number of voice slots used by the user." + }, + "professional_voice_slots_used": { + "type": "integer", + "title": "Professional Voice Slots Used", + "description": "The number of professional voice slots used by the workspace/user if single seat." + }, + "voice_limit": { + "type": "integer", + "title": "Voice Limit", + "description": "The maximum number of voice slots allowed for the user." + }, + "max_voice_add_edits": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Voice Add Edits", + "description": "The maximum number of voice add/edits allowed for the user." + }, + "voice_add_edit_counter": { + "type": "integer", + "title": "Voice Add Edit Counter", + "description": "The number of voice add/edits used by the user." + }, + "professional_voice_limit": { + "type": "integer", + "title": "Professional Voice Limit", + "description": "The maximum number of professional voices allowed for the user." + }, + "can_extend_voice_limit": { + "type": "boolean", + "title": "Can Extend Voice Limit", + "description": "Whether the user can extend their voice limit." + }, + "can_use_instant_voice_cloning": { + "type": "boolean", + "title": "Can Use Instant Voice Cloning", + "description": "Whether the user can use instant voice cloning." + }, + "can_use_professional_voice_cloning": { + "type": "boolean", + "title": "Can Use Professional Voice Cloning", + "description": "Whether the user can use professional voice cloning." + }, + "currency": { + "anyOf": [ + { + "$ref": "#/components/schemas/Currency" + }, + { + "type": "null" + } + ], + "description": "The currency of the user's subscription." + }, + "current_overage": { + "$ref": "#/components/schemas/Price", + "description": "The current usage-based overage cost." + }, + "status": { + "$ref": "#/components/schemas/SubscriptionStatusType", + "description": "The status of the user's subscription." + }, + "billing_period": { + "anyOf": [ + { + "$ref": "#/components/schemas/BillingPeriod" + }, + { + "type": "null" + } + ], + "description": "The billing period of the user's subscription." + }, + "character_refresh_period": { + "anyOf": [ + { + "$ref": "#/components/schemas/CharacterRefreshPeriod" + }, + { + "type": "null" + } + ], + "description": "The character refresh period of the user's subscription." + }, + "next_invoice": { + "anyOf": [ + { + "$ref": "#/components/schemas/InvoiceResponseModel" + }, + { + "type": "null" + } + ], + "description": "The next invoice for the user." + }, + "open_invoices": { + "items": { + "$ref": "#/components/schemas/InvoiceResponseModel" + }, + "type": "array", + "title": "Open Invoices", + "description": "The open invoices for the user." + }, + "has_open_invoices": { + "type": "boolean", + "title": "Has Open Invoices", + "description": "Whether the user has open invoices." + }, + "pending_change": { + "anyOf": [ + { + "$ref": "#/components/schemas/PendingSubscriptionSwitchResponseModel" + }, + { + "$ref": "#/components/schemas/PendingCancellationResponseModel" + }, + { + "type": "null" + } + ], + "title": "Pending Change", + "description": "The pending change for the user." + }, + "has_used_starter_coupon_on_account": { + "type": "boolean", + "title": "Has Used Starter Coupon On Account", + "description": "True if any workspace owned by this user's auth account has redeemed the starter first-month discount coupon.", + "default": false + }, + "has_used_creator_coupon_on_account": { + "type": "boolean", + "title": "Has Used Creator Coupon On Account", + "description": "True if any workspace owned by this user's auth account has redeemed the creator first-month discount coupon.", + "default": false + } + }, + "type": "object", + "required": [ + "tier", + "character_count", + "character_limit", + "max_character_limit_extension", + "max_credit_limit_extension", + "can_extend_character_limit", + "allowed_to_extend_character_limit", + "voice_slots_used", + "professional_voice_slots_used", + "voice_limit", + "voice_add_edit_counter", + "professional_voice_limit", + "can_extend_voice_limit", + "can_use_instant_voice_cloning", + "can_use_professional_voice_cloning", + "current_overage", + "status", + "open_invoices", + "has_open_invoices" + ], + "title": "ExtendedSubscriptionResponseModel", + "example": { + "allowed_to_extend_character_limit": true, + "billing_period": "monthly_period", + "can_extend_character_limit": true, + "can_extend_voice_limit": true, + "can_use_instant_voice_cloning": true, + "can_use_professional_voice_cloning": true, + "character_count": 1000, + "character_limit": 10000, + "character_refresh_period": "monthly_period", + "currency": "usd", + "current_overage": { + "amount": "0", + "currency": "usd" + }, + "has_open_invoices": true, + "has_used_creator_coupon_on_account": false, + "has_used_starter_coupon_on_account": false, + "max_character_limit_extension": 10000, + "max_credit_limit_extension": 10000, + "next_character_count_reset_unix": 1738356858, + "next_invoice": { + "amount_due_cents": 1000, + "discounts": [ + { + "discount_percent_off": 20 + } + ], + "next_payment_attempt_unix": 1738356858, + "payment_intent_status": "processing", + "payment_intent_statusses": [ + "processing", + "succeeded" + ], + "subtotal_cents": 900, + "tax_cents": 100 + }, + "open_invoices": [ + { + "amount_due_cents": 1000, + "discounts": [ + { + "discount_percent_off": 20 + } + ], + "next_payment_attempt_unix": 1738356858, + "payment_intent_status": "processing", + "payment_intent_statusses": [ + "processing", + "succeeded" + ], + "subtotal_cents": 900, + "tax_cents": 100 + } + ], + "professional_voice_limit": 1, + "professional_voice_slots_used": 0, + "status": "active", + "tier": "starter", + "voice_add_edit_counter": 0, + "voice_limit": 10, + "voice_slots_used": 1 + } + }, + "FeatureStatusCommonModel": { + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "default": false + }, + "used": { + "type": "boolean", + "title": "Used", + "default": false + } + }, + "type": "object", + "title": "FeatureStatusCommonModel" + }, + "FeaturesUsageCommonModel": { + "properties": { + "language_detection": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "transfer_to_agent": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "transfer_to_number": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "multivoice": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "dtmf_tones": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "external_mcp_servers": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "pii_zrm_workspace": { + "type": "boolean", + "title": "Pii Zrm Workspace", + "default": false + }, + "pii_zrm_agent": { + "type": "boolean", + "title": "Pii Zrm Agent", + "default": false + }, + "tool_dynamic_variable_updates": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "is_livekit": { + "type": "boolean", + "title": "Is Livekit", + "default": false + }, + "voicemail_detection": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "dtmf_input": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "workflow": { + "$ref": "#/components/schemas/WorkflowFeaturesUsageCommonModel" + }, + "agent_testing": { + "$ref": "#/components/schemas/TestsFeatureUsageCommonModel" + }, + "versioning": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "file_input": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + } + }, + "type": "object", + "title": "FeaturesUsageCommonModel" + }, + "FeedbackResponseModel": { + "properties": { + "thumbs_up": { + "type": "boolean", + "title": "Thumbs Up", + "description": "Whether the user liked the generated item." + }, + "feedback": { + "type": "string", + "title": "Feedback", + "description": "The feedback text provided by the user." + }, + "emotions": { + "type": "boolean", + "title": "Emotions", + "description": "Whether the user provided emotions." + }, + "inaccurate_clone": { + "type": "boolean", + "title": "Inaccurate Clone", + "description": "Whether the user thinks the clone is inaccurate." + }, + "glitches": { + "type": "boolean", + "title": "Glitches", + "description": "Whether the user thinks there are glitches in the audio." + }, + "audio_quality": { + "type": "boolean", + "title": "Audio Quality", + "description": "Whether the user thinks the audio quality is good." + }, + "other": { + "type": "boolean", + "title": "Other", + "description": "Whether the user provided other feedback." + }, + "review_status": { + "type": "string", + "title": "Review Status", + "description": "The review status of the item. Defaults to 'not_reviewed'.", + "default": "not_reviewed" + } + }, + "type": "object", + "required": [ + "thumbs_up", + "feedback", + "emotions", + "inaccurate_clone", + "glitches", + "audio_quality", + "other" + ], + "title": "FeedbackResponseModel", + "example": { + "audio_quality": true, + "emotions": true, + "feedback": "This is an example of test feedback.", + "glitches": true, + "inaccurate_clone": false, + "other": false, + "review_status": "not_reviewed", + "thumbs_up": true + } + }, + "FileInputConfig": { + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "description": "When enabled, users may attach images or PDFs in chat when the LLM supports multimodal input.", + "default": true + }, + "max_files_per_conversation": { + "type": "integer", + "maximum": 10, + "minimum": 1, + "title": "Max Files Per Conversation", + "description": "Maximum number of files that can be uploaded per conversation.", + "default": 10 + } + }, + "type": "object", + "title": "FileInputConfig" + }, + "FileInputConfigWorkflowOverride": { + "properties": { + "enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enabled", + "description": "When enabled, users may attach images or PDFs in chat when the LLM supports multimodal input." + }, + "max_files_per_conversation": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Files Per Conversation", + "description": "Maximum number of files that can be uploaded per conversation." + } + }, + "type": "object", + "title": "FileInputConfigWorkflowOverride" + }, + "FineTuningResponseModel": { + "properties": { + "is_allowed_to_fine_tune": { + "type": "boolean", + "title": "Is Allowed To Fine Tune", + "description": "Whether the user is allowed to fine-tune the voice." + }, + "state": { + "additionalProperties": { + "type": "string", + "enum": [ + "not_started", + "queued", + "fine_tuning", + "fine_tuned", + "failed", + "delayed" + ] + }, + "type": "object", + "title": "State", + "description": "The state of the fine-tuning process for each model." + }, + "verification_failures": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Verification Failures", + "description": "List of verification failures in the fine-tuning process." + }, + "verification_attempts_count": { + "type": "integer", + "title": "Verification Attempts Count", + "description": "The number of verification attempts in the fine-tuning process." + }, + "manual_verification_requested": { + "type": "boolean", + "title": "Manual Verification Requested", + "description": "Whether a manual verification was requested for the fine-tuning process." + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "The language of the fine-tuning process." + }, + "progress": { + "anyOf": [ + { + "additionalProperties": { + "type": "number" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Progress", + "description": "The progress of the fine-tuning process." + }, + "message": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Message", + "description": "The message of the fine-tuning process." + }, + "dataset_duration_seconds": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Dataset Duration Seconds", + "description": "The duration of the dataset in seconds." + }, + "verification_attempts": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/VerificationAttemptResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Verification Attempts", + "description": "The number of verification attempts." + }, + "slice_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Slice Ids", + "description": "List of slice IDs." + }, + "manual_verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/ManualVerificationResponseModel" + }, + { + "type": "null" + } + ], + "description": "The manual verification of the fine-tuning process." + }, + "max_verification_attempts": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Verification Attempts", + "description": "The maximum number of verification attempts." + }, + "next_max_verification_attempts_reset_unix_ms": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Next Max Verification Attempts Reset Unix Ms", + "description": "The next maximum verification attempts reset time in Unix milliseconds." + } + }, + "type": "object", + "required": [ + "is_allowed_to_fine_tune", + "state", + "verification_failures", + "verification_attempts_count", + "manual_verification_requested" + ], + "title": "FineTuningResponseModel", + "example": { + "is_allowed_to_fine_tune": true, + "manual_verification_requested": false, + "state": { + "eleven_multilingual_v2": "fine_tuned" + }, + "verification_attempts_count": 2, + "verification_failures": [] + } + }, + "FocusGuardrail": { + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Is Enabled", + "default": false + } + }, + "type": "object", + "title": "FocusGuardrail" + }, + "ForcedAlignmentCharacterResponseModel": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The character that was transcribed." + }, + "start": { + "type": "number", + "title": "Start", + "description": "The start time of the character in seconds." + }, + "end": { + "type": "number", + "title": "End", + "description": "The end time of the character in seconds." + } + }, + "type": "object", + "required": [ + "text", + "start", + "end" + ], + "title": "ForcedAlignmentCharacterResponseModel", + "description": "Model representing a single character with its timing information from the aligner.", + "example": { + "end": 0.02, + "start": 0, + "text": "H" + } + }, + "ForcedAlignmentResponseModel": { + "properties": { + "characters": { + "items": { + "$ref": "#/components/schemas/ForcedAlignmentCharacterResponseModel" + }, + "type": "array", + "title": "Characters", + "description": "List of characters with their timing information." + }, + "words": { + "items": { + "$ref": "#/components/schemas/ForcedAlignmentWordResponseModel" + }, + "type": "array", + "title": "Words", + "description": "List of words with their timing information." + }, + "loss": { + "type": "number", + "title": "Loss", + "description": "The average alignment loss/confidence score for the entire transcript, calculated from all characters." + } + }, + "type": "object", + "required": [ + "characters", + "words", + "loss" + ], + "title": "ForcedAlignmentResponseModel", + "description": "Model representing the response from the aligner service." + }, + "ForcedAlignmentWordResponseModel": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The word that was transcribed." + }, + "start": { + "type": "number", + "title": "Start", + "description": "The start time of the word in seconds." + }, + "end": { + "type": "number", + "title": "End", + "description": "The end time of the word in seconds." + }, + "loss": { + "type": "number", + "title": "Loss", + "description": "The average alignment loss/confidence score for this word, calculated from its constituent characters." + } + }, + "type": "object", + "required": [ + "text", + "start", + "end", + "loss" + ], + "title": "ForcedAlignmentWordResponseModel", + "description": "Model representing a single word with its timing information from the aligner.", + "example": { + "end": 1.02, + "loss": 0.12, + "start": 0, + "text": "Hello" + } + }, + "GenerationSourceContext": { + "properties": { + "source_type": { + "type": "string", + "const": "generation", + "title": "Source Type", + "default": "generation" + }, + "generation_id": { + "type": "string", + "title": "Generation Id" + }, + "prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt" + }, + "model_id": { + "type": "string", + "title": "Model Id" + }, + "model_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Model Provider" + }, + "generation_session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Generation Session Id" + }, + "session_iteration_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Iteration Id" + }, + "model_parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Model Parameters" + }, + "extend_video": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceVideo" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "generation_id", + "model_id" + ], + "title": "GenerationSourceContext" + }, + "GenesysRegion": { + "type": "string", + "enum": [ + "us_east_1", + "eu_west_1", + "ap_southeast_2", + "ap_northeast_1", + "eu_central_1", + "us_west_2", + "ca_central_1", + "ap_northeast_2", + "eu_west_2", + "ap_south_1", + "us_east_2", + "sa_east_1", + "me_central_1", + "ap_northeast_3", + "eu_central_2", + "mx_central_1", + "ap_southeast_1" + ], + "title": "GenesysRegion" + }, + "GetAgentEmbedResponseModel": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "widget_config": { + "$ref": "#/components/schemas/WidgetConfigResponseModel" + } + }, + "type": "object", + "required": [ + "agent_id", + "widget_config" + ], + "title": "GetAgentEmbedResponseModel" + }, + "GetAgentKnowledgebaseSizeResponseModel": { + "properties": { + "number_of_pages": { + "type": "number", + "title": "Number Of Pages" + } + }, + "type": "object", + "required": [ + "number_of_pages" + ], + "title": "GetAgentKnowledgebaseSizeResponseModel" + }, + "GetAgentLinkResponseModel": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "The ID of the agent" + }, + "token": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTokenResponseModel" + }, + { + "type": "null" + } + ], + "description": "The token data for the agent" + } + }, + "type": "object", + "required": [ + "agent_id" + ], + "title": "GetAgentLinkResponseModel", + "example": { + "agent_id": "J3Pbu5gP6NNKBscdCdwB" + } + }, + "GetAgentResponseModel": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "The ID of the agent" + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the agent" + }, + "conversation_config": { + "$ref": "#/components/schemas/ConversationalConfigAPIModel-Output", + "description": "The conversation configuration of the agent" + }, + "metadata": { + "$ref": "#/components/schemas/AgentMetadataResponseModel", + "description": "The metadata of the agent" + }, + "platform_settings": { + "$ref": "#/components/schemas/AgentPlatformSettingsResponseModel", + "description": "The platform settings of the agent" + }, + "phone_numbers": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetPhoneNumberTwilioResponseModel" + }, + { + "$ref": "#/components/schemas/GetPhoneNumberSIPTrunkResponseModel" + } + ], + "discriminator": { + "propertyName": "provider", + "mapping": { + "sip_trunk": "#/components/schemas/GetPhoneNumberSIPTrunkResponseModel", + "twilio": "#/components/schemas/GetPhoneNumberTwilioResponseModel" + } + } + }, + "type": "array", + "title": "Phone Numbers", + "description": "The phone numbers of the agent" + }, + "whatsapp_accounts": { + "items": { + "$ref": "#/components/schemas/GetWhatsAppAccountResponse" + }, + "type": "array", + "title": "Whatsapp Accounts", + "description": "WhatsApp accounts assigned to the agent" + }, + "workflow": { + "$ref": "#/components/schemas/AgentWorkflowResponseModel", + "description": "The workflow of the agent" + }, + "access_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + { + "type": "null" + } + ], + "description": "The access information of the agent for the user" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tags", + "description": "Agent tags used to categorize the agent" + }, + "version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id", + "description": "The ID of the version the agent is on" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id", + "description": "The ID of the branch the agent is on" + }, + "main_branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Main Branch Id", + "description": "The ID of the main branch for this agent" + } + }, + "type": "object", + "required": [ + "agent_id", + "name", + "conversation_config", + "metadata" + ], + "title": "GetAgentResponseModel", + "example": { + "agent_id": "agent_7101k5zvyjhmfg983brhmhkd98n6", + "name": "My Agent", + "workflow": { + "edges": { + "entry_to_tool_a": { + "forward_condition": { + "condition": "Tool A condition", + "type": "llm" + }, + "source": "entry_node", + "target": "tool_node_a" + }, + "start_to_entry": { + "forward_condition": { + "type": "unconditional" + }, + "source": "start_node", + "target": "entry_node" + }, + "tool_a_to_failure": { + "forward_condition": { + "successful": false, + "type": "result" + }, + "source": "tool_node_a", + "target": "failure_node" + }, + "tool_a_to_tool_b": { + "forward_condition": { + "successful": true, + "type": "result" + }, + "source": "tool_node_a", + "target": "tool_node_b" + }, + "tool_b_to_agent_transfer": { + "forward_condition": { + "type": "unconditional" + }, + "source": "tool_node_b", + "target": "success_transfer" + }, + "tool_b_to_conversation": { + "forward_condition": { + "condition": "Conversation condition", + "type": "llm" + }, + "source": "tool_node_b", + "target": "success_conversation" + }, + "tool_b_to_end": { + "forward_condition": { + "condition": "End condition", + "type": "llm" + }, + "source": "tool_node_b", + "target": "success_end" + }, + "tool_b_to_phone": { + "forward_condition": { + "expression": { + "children": [ + { + "name": "force_phone_transfer", + "type": "dynamic_variable" + }, + { + "prompt": "Phone condition", + "type": "llm", + "value_schema": { + "description": "Phone condition", + "type": "boolean" + } + }, + { + "left": { + "name": "mode", + "type": "dynamic_variable" + }, + "right": { + "type": "string_literal", + "value": "dev" + }, + "type": "eq_operator" + } + ], + "type": "or_operator" + }, + "type": "expression" + }, + "source": "tool_node_b", + "target": "success_phone" + } + }, + "nodes": { + "entry_node": { + "additional_knowledge_base": [], + "additional_prompt": "", + "additional_tool_ids": [], + "auto_advance_after_first_response": false, + "conversation_config": {}, + "edge_order": [ + "entry_to_tool_a" + ], + "label": "Entry", + "position": { + "x": 0, + "y": 0 + }, + "type": "override_agent" + }, + "failure_node": { + "additional_knowledge_base": [], + "additional_prompt": "", + "additional_tool_ids": [], + "auto_advance_after_first_response": false, + "conversation_config": {}, + "edge_order": [], + "label": "Failure", + "position": { + "x": 0, + "y": 0 + }, + "type": "override_agent" + }, + "start_node": { + "edge_order": [ + "start_to_entry" + ], + "position": { + "x": 0, + "y": 0 + }, + "type": "start" + }, + "success_conversation": { + "additional_knowledge_base": [], + "additional_prompt": "", + "additional_tool_ids": [], + "auto_advance_after_first_response": false, + "conversation_config": {}, + "edge_order": [], + "label": "Success A", + "position": { + "x": 0, + "y": 0 + }, + "type": "override_agent" + }, + "success_end": { + "edge_order": [], + "position": { + "x": 0, + "y": 0 + }, + "type": "end" + }, + "success_phone": { + "custom_sip_headers": [], + "edge_order": [], + "position": { + "x": 0, + "y": 0 + }, + "transfer_destination": { + "phone_number": "+1234567890", + "type": "phone" + }, + "transfer_type": "conference", + "type": "phone_number" + }, + "success_transfer": { + "agent_id": "success_transfer_agent", + "delay_ms": 0, + "edge_order": [], + "enable_transferred_agent_first_message": false, + "position": { + "x": 0, + "y": 0 + }, + "type": "standalone_agent" + }, + "tool_node_a": { + "edge_order": [ + "tool_a_to_failure", + "tool_a_to_tool_b" + ], + "position": { + "x": 0, + "y": 0 + }, + "tools": [ + { + "tool_id": "tool_a" + }, + { + "tool_id": "tool_b" + } + ], + "type": "tool" + }, + "tool_node_b": { + "edge_order": [ + "tool_b_to_conversation", + "tool_b_to_end", + "tool_b_to_phone", + "tool_b_to_agent_transfer" + ], + "position": { + "x": 0, + "y": 0 + }, + "tools": [ + { + "tool_id": "tool_a" + } + ], + "type": "tool" + } + }, + "prevent_subagent_loops": false + } + } + }, + "GetAgentTestFolderResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/AgentTestFolderPathSegmentResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The path from the root folder to the current folder." + }, + "children_count": { + "type": "integer", + "title": "Children Count", + "description": "The number of direct children (tests and subfolders) in this folder", + "default": 0 + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "GetAgentTestFolderResponseModel" + }, + "GetAgentTopicsResponseModel": { + "properties": { + "topics": { + "items": { + "$ref": "#/components/schemas/AgentTopicResponseModel" + }, + "type": "array", + "title": "Topics" + }, + "window_start_unix_secs": { + "type": "integer", + "title": "Window Start Unix Secs" + }, + "window_end_unix_secs": { + "type": "integer", + "title": "Window End Unix Secs" + } + }, + "type": "object", + "required": [ + "topics", + "window_start_unix_secs", + "window_end_unix_secs" + ], + "title": "GetAgentTopicsResponseModel" + }, + "GetAgentsPageResponseModel": { + "properties": { + "agents": { + "items": { + "$ref": "#/components/schemas/AgentSummaryResponseModel" + }, + "type": "array", + "title": "Agents", + "description": "A list of agents and their metadata" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor", + "description": "The next cursor to paginate through the agents" + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Whether there are more agents to paginate through" + } + }, + "type": "object", + "required": [ + "agents", + "has_more" + ], + "title": "GetAgentsPageResponseModel", + "example": { + "agents": [ + { + "access_info": { + "creator_email": "john@example.com", + "creator_name": "John Doe", + "is_creator": true, + "role": "admin" + }, + "agent_id": "J3Pbu5gP6NNKBscdCdwB", + "archived": false, + "created_at_unix_secs": 1716153600, + "name": "My Agent", + "tags": [ + "Customer Support", + "Technical Help", + "Eleven" + ] + } + ], + "has_more": false, + "next_cursor": "123" + } + }, + "GetAnalyticsSummaryParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "get_analytics_summary", + "title": "Smb Tool Type", + "default": "get_analytics_summary" + } + }, + "type": "object", + "title": "GetAnalyticsSummaryParams", + "description": "Get a summary of key business analytics for a time period." + }, + "GetAppointmentByConfirmationNumberParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "get_appointment_by_confirmation_number", + "title": "Smb Tool Type", + "default": "get_appointment_by_confirmation_number" + } + }, + "type": "object", + "title": "GetAppointmentByConfirmationNumberParams", + "description": "Look up an appointment by the booking confirmation number the caller quotes.\n\nThe confirmation number is the 8-character code shown on the booking\nconfirmation page (e.g. ``#01ABCDEF``). Callers may read it back with or\nwithout the leading ``#`` and with varied spacing; the tool normalizes\nthe input and does a prefix match on the stored calendar item id." + }, + "GetAudioIsolationHistoryResponseModel": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/AudioIsolationHistoryItemResponseModel" + }, + "type": "array", + "title": "Items" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "items", + "has_more" + ], + "title": "GetAudioIsolationHistoryResponseModel" + }, + "GetAudioNativeProjectSettingsResponseModel": { + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "description": "Whether the project is enabled." + }, + "snapshot_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Snapshot Id", + "description": "The ID of the latest snapshot of the project." + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/AudioNativeProjectSettingsResponseModel" + }, + { + "type": "null" + } + ], + "description": "The settings of the project." + } + }, + "type": "object", + "required": [ + "enabled" + ], + "title": "GetAudioNativeProjectSettingsResponseModel", + "example": { + "enabled": true, + "settings": { + "audio_path": "audio/my_project.mp3", + "audio_url": "https://example.com/audio/my_project.mp3", + "author": "John Doe", + "background_color": "#FFFFFF", + "image": "https://example.com/image.jpg", + "sessionization": 1, + "small": false, + "status": "ready", + "text_color": "#000000", + "title": "My Project" + }, + "snapshot_id": "JBFqnCBsd6RMkjVDRZzb" + } + }, + "GetBookingPageSettingsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "get_booking_page_settings", + "title": "Smb Tool Type", + "default": "get_booking_page_settings" + } + }, + "type": "object", + "title": "GetBookingPageSettingsParams" + }, + "GetBookingSlugStatusParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "get_booking_slug_status", + "title": "Smb Tool Type", + "default": "get_booking_slug_status" + } + }, + "type": "object", + "title": "GetBookingSlugStatusParams" + }, + "GetChaptersResponseModel": { + "properties": { + "chapters": { + "items": { + "$ref": "#/components/schemas/ChapterResponseModel" + }, + "type": "array", + "title": "Chapters" + } + }, + "type": "object", + "required": [ + "chapters" + ], + "title": "GetChaptersResponseModel" + }, + "GetClientAppointmentsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "get_client_appointments", + "title": "Smb Tool Type", + "default": "get_client_appointments" + }, + "include_cancelled": { + "type": "boolean", + "title": "Include Cancelled", + "default": false + } + }, + "type": "object", + "title": "GetClientAppointmentsParams" + }, + "GetClientByPhoneParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "get_client_by_phone", + "title": "Smb Tool Type", + "default": "get_client_by_phone" + } + }, + "type": "object", + "title": "GetClientByPhoneParams", + "description": "Look up a client by their exact phone number." + }, + "GetConvAIDashboardSettingsResponseModel": { + "properties": { + "charts": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DashboardCallSuccessChartModel" + }, + { + "$ref": "#/components/schemas/DashboardCriteriaChartModel" + }, + { + "$ref": "#/components/schemas/DashboardDataCollectionChartModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "call_success": "#/components/schemas/DashboardCallSuccessChartModel", + "criteria": "#/components/schemas/DashboardCriteriaChartModel", + "data_collection": "#/components/schemas/DashboardDataCollectionChartModel" + } + } + }, + "type": "array", + "maxItems": 4, + "title": "Charts" + } + }, + "type": "object", + "title": "GetConvAIDashboardSettingsResponseModel" + }, + "GetConvAISettingsResponseModel": { + "properties": { + "conversation_initiation_client_data_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataWebhook" + }, + { + "type": "null" + } + ] + }, + "webhooks": { + "$ref": "#/components/schemas/ConvAIWebhooks" + }, + "can_use_mcp_servers": { + "type": "boolean", + "title": "Can Use Mcp Servers", + "description": "Whether the workspace can use MCP servers", + "default": false + }, + "rag_retention_period_days": { + "type": "integer", + "maximum": 30, + "exclusiveMinimum": 0, + "title": "Rag Retention Period Days", + "default": 10 + }, + "conversation_embedding_retention_days": { + "anyOf": [ + { + "type": "integer", + "maximum": 365, + "exclusiveMinimum": 0 + }, + { + "type": "null" + } + ], + "title": "Conversation Embedding Retention Days", + "description": "Days to retain conversation embeddings. None means use the system default (30 days)." + }, + "default_livekit_stack": { + "$ref": "#/components/schemas/LivekitStackType", + "default": "standard" + } + }, + "type": "object", + "title": "GetConvAISettingsResponseModel" + }, + "GetConversationResponseModel": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "agent_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Name" + }, + "status": { + "type": "string", + "enum": [ + "initiated", + "in-progress", + "processing", + "done", + "failed" + ], + "title": "Status" + }, + "user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Id" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + }, + "version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id", + "description": "The ID of the agent version used for this conversation" + }, + "metadata": { + "$ref": "#/components/schemas/ConversationHistoryMetadataCommonModel" + }, + "analysis": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryAnalysisCommonModel" + }, + { + "type": "null" + } + ] + }, + "visited_agents": { + "items": { + "$ref": "#/components/schemas/VisitedAgentRef" + }, + "type": "array", + "title": "Visited Agents" + }, + "conversation_initiation_client_data": { + "$ref": "#/components/schemas/ConversationInitiationClientDataRequest-Output" + }, + "environment": { + "type": "string", + "title": "Environment", + "default": "production" + }, + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "has_audio": { + "type": "boolean", + "title": "Has Audio" + }, + "has_user_audio": { + "type": "boolean", + "title": "Has User Audio" + }, + "has_response_audio": { + "type": "boolean", + "title": "Has Response Audio" + }, + "transcript": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptResponseModel" + }, + "type": "array", + "title": "Transcript" + }, + "tag_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tag Ids", + "description": "Conversation tag ids assigned to this conversation." + }, + "otlp_traces": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "description": "OpenTelemetry trace payload when the request uses format=opentelemetry; otherwise omitted." + } + }, + "type": "object", + "required": [ + "agent_id", + "status", + "metadata", + "conversation_id", + "has_audio", + "has_user_audio", + "has_response_audio", + "transcript" + ], + "title": "GetConversationResponseModel" + }, + "GetConversationTagsPageResponseModel": { + "properties": { + "conversation_tags": { + "items": { + "$ref": "#/components/schemas/ConversationTagResponseModel" + }, + "type": "array", + "title": "Conversation Tags" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "conversation_tags", + "has_more" + ], + "title": "GetConversationTagsPageResponseModel" + }, + "GetConversationUsersPageResponseModel": { + "properties": { + "users": { + "items": { + "$ref": "#/components/schemas/ConversationUserResponseModel" + }, + "type": "array", + "title": "Users" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "users", + "has_more" + ], + "title": "GetConversationUsersPageResponseModel" + }, + "GetConversationsPageResponseModel": { + "properties": { + "conversations": { + "items": { + "$ref": "#/components/schemas/ConversationSummaryResponseModel" + }, + "type": "array", + "title": "Conversations" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "conversations", + "has_more" + ], + "title": "GetConversationsPageResponseModel" + }, + "GetKnowledgeBaseDependentAgentsResponseModel": { + "properties": { + "agents": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableAgentIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownAgentIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableAgentIdentifier", + "unknown": "#/components/schemas/DependentUnknownAgentIdentifier" + } + } + }, + "type": "array", + "title": "Agents" + }, + "branches": { + "items": { + "$ref": "#/components/schemas/DependentBranchInfo" + }, + "type": "array", + "title": "Branches" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "agents", + "has_more" + ], + "title": "GetKnowledgeBaseDependentAgentsResponseModel" + }, + "GetKnowledgeBaseFileResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel" + }, + "supported_usages": { + "items": { + "$ref": "#/components/schemas/DocumentUsageModeEnum" + }, + "type": "array", + "title": "Supported Usages" + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + "folder_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Folder Parent Id", + "description": "The ID of the parent folder, or null if the document is at the root level." + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseFolderPathSegmentResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The folder path segments leading to this entity, from root to parent folder." + }, + "type": { + "type": "string", + "const": "file", + "title": "Type" + }, + "extracted_inner_html": { + "type": "string", + "title": "Extracted Inner Html" + }, + "filename": { + "type": "string", + "title": "Filename" + } + }, + "type": "object", + "required": [ + "id", + "name", + "metadata", + "supported_usages", + "access_info", + "type", + "extracted_inner_html", + "filename" + ], + "title": "GetKnowledgeBaseFileResponseModel" + }, + "GetKnowledgeBaseFolderResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel" + }, + "supported_usages": { + "items": { + "$ref": "#/components/schemas/DocumentUsageModeEnum" + }, + "type": "array", + "title": "Supported Usages" + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + "folder_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Folder Parent Id", + "description": "The ID of the parent folder, or null if the document is at the root level." + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseFolderPathSegmentResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The folder path segments leading to this entity, from root to parent folder." + }, + "type": { + "type": "string", + "const": "folder", + "title": "Type" + }, + "children_count": { + "type": "integer", + "title": "Children Count" + }, + "auto_sync_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/AutoSyncInfo" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "id", + "name", + "metadata", + "supported_usages", + "access_info", + "type", + "children_count" + ], + "title": "GetKnowledgeBaseFolderResponseModel" + }, + "GetKnowledgeBaseListResponseModel": { + "properties": { + "documents": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryURLResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryFileResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryTextResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryFolderResponseModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "file": "#/components/schemas/GetKnowledgeBaseSummaryFileResponseModel", + "folder": "#/components/schemas/GetKnowledgeBaseSummaryFolderResponseModel", + "text": "#/components/schemas/GetKnowledgeBaseSummaryTextResponseModel", + "url": "#/components/schemas/GetKnowledgeBaseSummaryURLResponseModel" + } + } + }, + "type": "array", + "title": "Documents" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "documents", + "has_more" + ], + "title": "GetKnowledgeBaseListResponseModel" + }, + "GetKnowledgeBaseSummaryFileResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel" + }, + "supported_usages": { + "items": { + "$ref": "#/components/schemas/DocumentUsageModeEnum" + }, + "type": "array", + "title": "Supported Usages" + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + "folder_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Folder Parent Id", + "description": "The ID of the parent folder, or null if the document is at the root level." + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseFolderPathSegmentSummaryResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The folder path segments leading to this entity, from root to parent folder." + }, + "dependent_agents": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableAgentIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownAgentIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableAgentIdentifier", + "unknown": "#/components/schemas/DependentUnknownAgentIdentifier" + } + } + }, + "type": "array", + "title": "Dependent Agents", + "description": "This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead.", + "deprecated": true + }, + "type": { + "type": "string", + "const": "file", + "title": "Type" + } + }, + "type": "object", + "required": [ + "id", + "name", + "metadata", + "supported_usages", + "access_info", + "dependent_agents", + "type" + ], + "title": "GetKnowledgeBaseSummaryFileResponseModel" + }, + "GetKnowledgeBaseSummaryFolderResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel" + }, + "supported_usages": { + "items": { + "$ref": "#/components/schemas/DocumentUsageModeEnum" + }, + "type": "array", + "title": "Supported Usages" + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + "folder_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Folder Parent Id", + "description": "The ID of the parent folder, or null if the document is at the root level." + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseFolderPathSegmentSummaryResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The folder path segments leading to this entity, from root to parent folder." + }, + "dependent_agents": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableAgentIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownAgentIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableAgentIdentifier", + "unknown": "#/components/schemas/DependentUnknownAgentIdentifier" + } + } + }, + "type": "array", + "title": "Dependent Agents", + "description": "This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead.", + "deprecated": true + }, + "type": { + "type": "string", + "const": "folder", + "title": "Type" + }, + "children_count": { + "type": "integer", + "title": "Children Count" + }, + "auto_sync_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/AutoSyncInfo" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "id", + "name", + "metadata", + "supported_usages", + "access_info", + "dependent_agents", + "type", + "children_count" + ], + "title": "GetKnowledgeBaseSummaryFolderResponseModel" + }, + "GetKnowledgeBaseSummaryTextResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel" + }, + "supported_usages": { + "items": { + "$ref": "#/components/schemas/DocumentUsageModeEnum" + }, + "type": "array", + "title": "Supported Usages" + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + "folder_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Folder Parent Id", + "description": "The ID of the parent folder, or null if the document is at the root level." + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseFolderPathSegmentSummaryResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The folder path segments leading to this entity, from root to parent folder." + }, + "dependent_agents": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableAgentIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownAgentIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableAgentIdentifier", + "unknown": "#/components/schemas/DependentUnknownAgentIdentifier" + } + } + }, + "type": "array", + "title": "Dependent Agents", + "description": "This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead.", + "deprecated": true + }, + "type": { + "type": "string", + "const": "text", + "title": "Type" + } + }, + "type": "object", + "required": [ + "id", + "name", + "metadata", + "supported_usages", + "access_info", + "dependent_agents", + "type" + ], + "title": "GetKnowledgeBaseSummaryTextResponseModel" + }, + "GetKnowledgeBaseSummaryURLResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel" + }, + "supported_usages": { + "items": { + "$ref": "#/components/schemas/DocumentUsageModeEnum" + }, + "type": "array", + "title": "Supported Usages" + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + "folder_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Folder Parent Id", + "description": "The ID of the parent folder, or null if the document is at the root level." + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseFolderPathSegmentSummaryResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The folder path segments leading to this entity, from root to parent folder." + }, + "dependent_agents": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableAgentIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownAgentIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableAgentIdentifier", + "unknown": "#/components/schemas/DependentUnknownAgentIdentifier" + } + } + }, + "type": "array", + "title": "Dependent Agents", + "description": "This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead.", + "deprecated": true + }, + "type": { + "type": "string", + "const": "url", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "auto_sync_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/AutoSyncInfo" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "id", + "name", + "metadata", + "supported_usages", + "access_info", + "dependent_agents", + "type", + "url" + ], + "title": "GetKnowledgeBaseSummaryURLResponseModel" + }, + "GetKnowledgeBaseTextResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel" + }, + "supported_usages": { + "items": { + "$ref": "#/components/schemas/DocumentUsageModeEnum" + }, + "type": "array", + "title": "Supported Usages" + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + "folder_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Folder Parent Id", + "description": "The ID of the parent folder, or null if the document is at the root level." + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseFolderPathSegmentResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The folder path segments leading to this entity, from root to parent folder." + }, + "type": { + "type": "string", + "const": "text", + "title": "Type" + }, + "extracted_inner_html": { + "type": "string", + "title": "Extracted Inner Html" + } + }, + "type": "object", + "required": [ + "id", + "name", + "metadata", + "supported_usages", + "access_info", + "type", + "extracted_inner_html" + ], + "title": "GetKnowledgeBaseTextResponseModel" + }, + "GetKnowledgeBaseURLResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel" + }, + "supported_usages": { + "items": { + "$ref": "#/components/schemas/DocumentUsageModeEnum" + }, + "type": "array", + "title": "Supported Usages" + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + "folder_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Folder Parent Id", + "description": "The ID of the parent folder, or null if the document is at the root level." + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseFolderPathSegmentResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The folder path segments leading to this entity, from root to parent folder." + }, + "type": { + "type": "string", + "const": "url", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "extracted_inner_html": { + "type": "string", + "title": "Extracted Inner Html" + }, + "auto_sync_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/AutoSyncInfo" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "id", + "name", + "metadata", + "supported_usages", + "access_info", + "type", + "url", + "extracted_inner_html" + ], + "title": "GetKnowledgeBaseURLResponseModel" + }, + "GetLibraryVoicesResponseModel": { + "properties": { + "voices": { + "items": { + "$ref": "#/components/schemas/LibraryVoiceResponseModel" + }, + "type": "array", + "title": "Voices", + "description": "The list of shared voices" + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Whether there are more shared voices in subsequent pages." + }, + "total_count": { + "type": "integer", + "title": "Total Count", + "description": "The total number of shared voices matching the query.", + "default": 0 + }, + "last_sort_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Sort Id" + } + }, + "type": "object", + "required": [ + "voices", + "has_more" + ], + "title": "GetLibraryVoicesResponseModel", + "example": { + "has_more": false, + "total_count": 0, + "voices": [ + { + "accent": "american", + "age": "young", + "category": "professional", + "cloned_by_count": 11, + "date_unix": 1714423232, + "description": "Perfectly calm, neutral and strong voice. Great for a young female protagonist.", + "descriptive": "calm", + "featured": false, + "free_users_allowed": true, + "gender": "Female", + "language": "en", + "live_moderation_enabled": false, + "name": "Alita", + "play_api_usage_character_count_1y": 12852, + "preview_url": "https://storage.googleapis.com/eleven-public-prod/wqkMCd9huxXHX1dy5mLJn4QEQHj1/voices/sB1b5zUrxQVAFl2PhZFp/55e71aac-5cb7-4b3d-8241-429388160509.mp3", + "public_owner_id": "63e84100a6bf7874ba37a1bab9a31828a379ec94b891b401653b655c5110880f", + "rate": 1, + "usage_character_count_1y": 12852, + "usage_character_count_7d": 12852, + "use_case": "characters_animation", + "verified_languages": [ + { + "accent": "american", + "language": "en", + "locale": "en-US", + "model_id": "eleven_multilingual_v2", + "preview_url": "https://storage.googleapis.com/eleven-public-prod/wqkMCd9huxXHX1dy5mLJn4QEQHj1/voices/sB1b5zUrxQVAFl2PhZFp/55e71aac-5cb7-4b3d-8241-429388160509.mp3" + } + ], + "voice_id": "sB1b5zUrxQVAFl2PhZFp" + } + ] + } + }, + "GetLiveCountResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count", + "description": "The number of active ongoing conversations." + } + }, + "type": "object", + "required": [ + "count" + ], + "title": "GetLiveCountResponse", + "examples": [ + { + "count": 42 + } + ] + }, + "GetOrCreateRAGIndexRequestModel": { + "properties": { + "document_id": { + "type": "string", + "title": "Document Id", + "description": "ID of the knowledgebase document for which to retrieve the index" + }, + "create_if_missing": { + "type": "boolean", + "title": "Create If Missing", + "description": "Whether to create the RAG index if it does not exist" + }, + "model": { + "$ref": "#/components/schemas/EmbeddingModelEnum", + "description": "Embedding model to use for the RAG index" + } + }, + "type": "object", + "required": [ + "document_id", + "create_if_missing", + "model" + ], + "title": "GetOrCreateRAGIndexRequestModel" + }, + "GetPhoneNumberInboundSIPTrunkConfigResponseModel": { + "properties": { + "allowed_addresses": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Allowed Addresses", + "description": "List of IP addresses that are allowed to use the trunk. Each item in the list can be an individual IP address or a Classless Inter-Domain Routing notation representing a CIDR block." + }, + "allowed_numbers": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Numbers", + "description": "List of phone numbers that are allowed to use the trunk." + }, + "media_encryption": { + "$ref": "#/components/schemas/SIPMediaEncryptionEnum" + }, + "has_auth_credentials": { + "type": "boolean", + "title": "Has Auth Credentials", + "description": "Whether authentication credentials are configured" + }, + "username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Username", + "description": "SIP trunk username (if available)" + }, + "remote_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Remote Domains", + "description": "Domains of remote SIP servers used to validate TLS certificates." + }, + "attributes_to_headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Attributes To Headers", + "description": "Map of dynamic variable name to header name for attributes_to_headers" + } + }, + "type": "object", + "required": [ + "allowed_addresses", + "allowed_numbers", + "media_encryption", + "has_auth_credentials" + ], + "title": "GetPhoneNumberInboundSIPTrunkConfigResponseModel" + }, + "GetPhoneNumberOutboundSIPTrunkConfigResponseModel": { + "properties": { + "address": { + "type": "string", + "title": "Address", + "description": "Hostname or IP the SIP INVITE is sent to" + }, + "transport": { + "$ref": "#/components/schemas/SIPTrunkTransportEnum", + "description": "Protocol to use for SIP transport" + }, + "media_encryption": { + "$ref": "#/components/schemas/SIPMediaEncryptionEnum", + "description": "Whether or not to encrypt media (data layer)." + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Headers", + "description": "SIP headers for INVITE request" + }, + "attributes_to_headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Attributes To Headers", + "description": "Map of dynamic variable name to header name for attributes_to_headers" + }, + "has_auth_credentials": { + "type": "boolean", + "title": "Has Auth Credentials", + "description": "Whether authentication credentials are configured" + }, + "username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Username", + "description": "SIP trunk username (if available)" + }, + "has_outbound_trunk": { + "type": "boolean", + "title": "Has Outbound Trunk", + "description": "Whether a LiveKit SIP outbound trunk is configured", + "default": false + } + }, + "type": "object", + "required": [ + "address", + "transport", + "media_encryption", + "has_auth_credentials" + ], + "title": "GetPhoneNumberOutboundSIPTrunkConfigResponseModel", + "description": "SIP Trunk configuration details for a phone number" + }, + "GetPhoneNumberSIPTrunkResponseModel": { + "properties": { + "phone_number": { + "type": "string", + "title": "Phone Number", + "description": "Phone number" + }, + "label": { + "type": "string", + "title": "Label", + "description": "Label for the phone number" + }, + "supports_inbound": { + "type": "boolean", + "title": "Supports Inbound", + "description": "This field is deprecated and will be removed in the future. Whether this phone number supports inbound calls", + "default": true, + "deprecated": true + }, + "supports_outbound": { + "type": "boolean", + "title": "Supports Outbound", + "description": "This field is deprecated and will be removed in the future. Whether this phone number supports outbound calls", + "default": true, + "deprecated": true + }, + "phone_number_id": { + "type": "string", + "title": "Phone Number Id", + "description": "The ID of the phone number" + }, + "assigned_agent": { + "anyOf": [ + { + "$ref": "#/components/schemas/PhoneNumberAgentInfo" + }, + { + "type": "null" + } + ], + "description": "The agent that is assigned to the phone number" + }, + "provider": { + "type": "string", + "const": "sip_trunk", + "title": "Provider", + "description": "Phone provider", + "default": "sip_trunk" + }, + "provider_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/GetPhoneNumberOutboundSIPTrunkConfigResponseModel" + }, + { + "type": "null" + } + ], + "deprecated": true + }, + "outbound_trunk": { + "anyOf": [ + { + "$ref": "#/components/schemas/GetPhoneNumberOutboundSIPTrunkConfigResponseModel" + }, + { + "type": "null" + } + ], + "description": "Configuration of the Outbound SIP trunk - if configured." + }, + "inbound_trunk": { + "anyOf": [ + { + "$ref": "#/components/schemas/GetPhoneNumberInboundSIPTrunkConfigResponseModel" + }, + { + "type": "null" + } + ], + "description": "Configuration of the Inbound SIP trunk - if configured." + }, + "livekit_stack": { + "$ref": "#/components/schemas/LivekitStackType", + "description": "Type of Livekit stack used for this number." + }, + "store_sip_messages": { + "type": "boolean", + "title": "Store Sip Messages", + "description": "Whether to store SIP messages for this phone number.", + "default": true + } + }, + "type": "object", + "required": [ + "phone_number", + "label", + "phone_number_id", + "livekit_stack" + ], + "title": "GetPhoneNumberSIPTrunkResponseModel", + "example": { + "label": "Sales Team", + "livekit_stack": "standard", + "phone_number": "+1987654321", + "phone_number_id": "phone_456", + "provider": "sip_trunk" + } + }, + "GetPhoneNumberTwilioResponseModel": { + "properties": { + "phone_number": { + "type": "string", + "title": "Phone Number", + "description": "Phone number" + }, + "label": { + "type": "string", + "title": "Label", + "description": "Label for the phone number" + }, + "supports_inbound": { + "type": "boolean", + "title": "Supports Inbound", + "description": "This field is deprecated and will be removed in the future. Whether this phone number supports inbound calls", + "default": true, + "deprecated": true + }, + "supports_outbound": { + "type": "boolean", + "title": "Supports Outbound", + "description": "This field is deprecated and will be removed in the future. Whether this phone number supports outbound calls", + "default": true, + "deprecated": true + }, + "phone_number_id": { + "type": "string", + "title": "Phone Number Id", + "description": "The ID of the phone number" + }, + "assigned_agent": { + "anyOf": [ + { + "$ref": "#/components/schemas/PhoneNumberAgentInfo" + }, + { + "type": "null" + } + ], + "description": "The agent that is assigned to the phone number" + }, + "provider": { + "type": "string", + "const": "twilio", + "title": "Provider", + "description": "Phone provider", + "default": "twilio" + } + }, + "type": "object", + "required": [ + "phone_number", + "label", + "phone_number_id" + ], + "title": "GetPhoneNumberTwilioResponseModel", + "example": { + "label": "Customer Support", + "phone_number": "+1234567890", + "phone_number_id": "phone_123", + "provider": "twilio" + } + }, + "GetProjectsResponseModel": { + "properties": { + "projects": { + "items": { + "$ref": "#/components/schemas/ProjectResponseModel" + }, + "type": "array", + "title": "Projects", + "description": "A list of projects with their metadata." + } + }, + "type": "object", + "required": [ + "projects" + ], + "title": "GetProjectsResponseModel", + "example": { + "projects": [ + { + "access_level": "viewer", + "author": "John Doe", + "can_be_downloaded": true, + "content_type": "Novel", + "cover_image_url": "https://example.com/cover.jpg", + "create_date_unix": 1714204800, + "created_by_user_id": "Vbtgl3bRdj6lk79rYAgx", + "creation_meta": { + "creation_progress": 0.5, + "status": "pending", + "type": "blank" + }, + "default_model_id": "eleven_multilingual_v2", + "default_paragraph_voice_id": "JBFqnCBsd6RMkjVDRZzb", + "default_title_voice_id": "JBFqnCBsd6RMkjVDRZzb", + "description": "This is a description of my project.", + "fiction": "fiction", + "genres": [ + "Novel", + "Short Story" + ], + "isbn_number": "978-90-274-3964-2", + "language": "en", + "last_conversion_date_unix": 1714204800, + "mature_content": false, + "name": "My Project", + "original_publication_date": "2025-01-01", + "project_id": "aw1NgEzBg83R7vgmiJt6", + "public_share_id": "abc123def456789", + "quality_check_on": false, + "quality_check_on_when_bulk_convert": false, + "state": "default", + "target_audience": "young adult", + "title": "My Project", + "volume_normalization": true + } + ] + } + }, + "GetPronunciationDictionariesMetadataResponseModel": { + "properties": { + "pronunciation_dictionaries": { + "items": { + "$ref": "#/components/schemas/GetPronunciationDictionaryMetadataResponseModel" + }, + "type": "array", + "title": "Pronunciation Dictionaries", + "description": "A list of pronunciation dictionaries and their metadata." + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor", + "description": "The next cursor to use for pagination." + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Whether there are more pronunciation dictionaries to fetch." + } + }, + "type": "object", + "required": [ + "pronunciation_dictionaries", + "has_more" + ], + "title": "GetPronunciationDictionariesMetadataResponseModel", + "example": { + "has_more": false, + "next_cursor": "5xM3yVvZQKV0EfqQpLr2", + "pronunciation_dictionaries": [ + { + "created_by": "ar6633Es2kUjFXBdR1iVc9ztsXl1", + "creation_time_unix": 1714156800, + "description": "This is a test dictionary", + "id": "5xM3yVvZQKV0EfqQpLrJ", + "latest_version_id": "5xM3yVvZQKV0EfqQpLr2", + "latest_version_rules_num": 2, + "name": "My Dictionary", + "permission_on_resource": "admin" + } + ] + } + }, + "GetPronunciationDictionaryMetadataResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the pronunciation dictionary." + }, + "latest_version_id": { + "type": "string", + "title": "Latest Version Id", + "description": "The ID of the latest version of the pronunciation dictionary." + }, + "latest_version_rules_num": { + "type": "integer", + "title": "Latest Version Rules Num", + "description": "The number of rules in the latest version of the pronunciation dictionary." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the pronunciation dictionary." + }, + "permission_on_resource": { + "anyOf": [ + { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ] + }, + { + "type": "null" + } + ], + "title": "Permission On Resource", + "description": "The permission on the resource of the pronunciation dictionary." + }, + "created_by": { + "type": "string", + "title": "Created By", + "description": "The user ID of the creator of the pronunciation dictionary." + }, + "creation_time_unix": { + "type": "integer", + "title": "Creation Time Unix", + "description": "The creation time of the pronunciation dictionary in Unix timestamp." + }, + "archived_time_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Archived Time Unix", + "description": "The archive time of the pronunciation dictionary in Unix timestamp." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of the pronunciation dictionary." + } + }, + "type": "object", + "required": [ + "id", + "latest_version_id", + "latest_version_rules_num", + "name", + "permission_on_resource", + "created_by", + "creation_time_unix" + ], + "title": "GetPronunciationDictionaryMetadataResponseModel", + "example": { + "created_by": "ar6633Es2kUjFXBdR1iVc9ztsXl1", + "creation_time_unix": 1714156800, + "description": "This is a test dictionary", + "id": "5xM3yVvZQKV0EfqQpLrJ", + "latest_version_id": "5xM3yVvZQKV0EfqQpLr2", + "latest_version_rules_num": 2, + "name": "My Dictionary", + "permission_on_resource": "admin" + } + }, + "GetPronunciationDictionaryWithRulesResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the pronunciation dictionary." + }, + "latest_version_id": { + "type": "string", + "title": "Latest Version Id", + "description": "The ID of the latest version of the pronunciation dictionary." + }, + "latest_version_rules_num": { + "type": "integer", + "title": "Latest Version Rules Num", + "description": "The number of rules in the latest version of the pronunciation dictionary." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the pronunciation dictionary." + }, + "permission_on_resource": { + "anyOf": [ + { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ] + }, + { + "type": "null" + } + ], + "title": "Permission On Resource", + "description": "The permission on the resource of the pronunciation dictionary." + }, + "created_by": { + "type": "string", + "title": "Created By", + "description": "The user ID of the creator of the pronunciation dictionary." + }, + "creation_time_unix": { + "type": "integer", + "title": "Creation Time Unix", + "description": "The creation time of the pronunciation dictionary in Unix timestamp." + }, + "archived_time_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Archived Time Unix", + "description": "The archive time of the pronunciation dictionary in Unix timestamp." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of the pronunciation dictionary." + }, + "rules": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/PronunciationDictionaryAliasRuleResponseModel" + }, + { + "$ref": "#/components/schemas/PronunciationDictionaryPhonemeRuleResponseModel" + } + ] + }, + "type": "array", + "title": "Rules", + "description": "The rules in the latest version of the pronunciation dictionary." + } + }, + "type": "object", + "required": [ + "id", + "latest_version_id", + "latest_version_rules_num", + "name", + "permission_on_resource", + "created_by", + "creation_time_unix", + "rules" + ], + "title": "GetPronunciationDictionaryWithRulesResponseModel", + "example": { + "created_by": "ar6633Es2kUjFXBdR1iVc9ztsXl1", + "creation_time_unix": 1714156800, + "description": "This is a test dictionary", + "id": "5xM3yVvZQKV0EfqQpLrJ", + "latest_version_id": "5xM3yVvZQKV0EfqQpLr2", + "latest_version_rules_num": 2, + "name": "My Dictionary", + "permission_on_resource": "admin", + "rules": [ + { + "alias": "tie-land", + "string_to_replace": "Thailand", + "type": "alias" + }, + { + "alphabet": "ipa", + "phoneme": "/təˈmeɪtoʊ/", + "string_to_replace": "Tomato", + "type": "phoneme" + } + ] + } + }, + "GetResponseUnitTestResponseModel": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Output" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Output" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Output" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "llm", + "title": "Type", + "default": "llm" + }, + "success_condition": { + "type": "string", + "title": "Success Condition", + "description": "A prompt that evaluates whether the agent's response is successful. Should return True or False.", + "default": "" + }, + "success_examples": { + "items": { + "$ref": "#/components/schemas/AgentSuccessfulResponseExample" + }, + "type": "array", + "maxItems": 5, + "title": "Success Examples", + "description": "Non-empty list of example responses that should be considered successful" + }, + "failure_examples": { + "items": { + "$ref": "#/components/schemas/AgentFailureResponseExample" + }, + "type": "array", + "maxItems": 5, + "title": "Failure Examples", + "description": "Non-empty list of example responses that should be considered failures" + }, + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "GetResponseUnitTestResponseModel" + }, + "GetSIPLogMessagesResponse": { + "properties": { + "sip_messages": { + "items": { + "$ref": "#/components/schemas/SIPLogMessage" + }, + "type": "array", + "title": "Sip Messages" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "default": false + } + }, + "type": "object", + "required": [ + "sip_messages" + ], + "title": "GetSIPLogMessagesResponse" + }, + "GetScheduleParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "get_schedule", + "title": "Smb Tool Type", + "default": "get_schedule" + }, + "include_location_filter": { + "type": "boolean", + "title": "Include Location Filter", + "default": false + } + }, + "type": "object", + "title": "GetScheduleParams" + }, + "GetSecretDependenciesResponseModel": { + "properties": { + "dependencies": { + "anyOf": [ + { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableToolIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownToolIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableToolIdentifier", + "unknown": "#/components/schemas/DependentUnknownToolIdentifier" + } + } + }, + "type": "array" + }, + { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableAgentIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownAgentIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableAgentIdentifier", + "unknown": "#/components/schemas/DependentUnknownAgentIdentifier" + } + } + }, + "type": "array" + }, + { + "items": { + "$ref": "#/components/schemas/DependentPhoneNumberIdentifier" + }, + "type": "array" + } + ], + "title": "Dependencies" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor", + "description": "Cursor for fetching the next page of dependencies" + } + }, + "type": "object", + "required": [ + "dependencies" + ], + "title": "GetSecretDependenciesResponseModel" + }, + "GetSimulationTestResponseModel": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Output" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Output" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Output" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "simulation", + "title": "Type", + "default": "simulation" + }, + "success_condition": { + "type": "string", + "title": "Success Condition", + "description": "A prompt that evaluates whether the agent's response is successful. Should return True or False.", + "default": "" + }, + "simulation_scenario": { + "type": "string", + "title": "Simulation Scenario", + "description": "Description of the simulation scenario and user persona for simulation tests.", + "default": "" + }, + "simulation_max_turns": { + "type": "integer", + "maximum": 50, + "minimum": 1, + "title": "Simulation Max Turns", + "description": "Maximum number of conversation turns for simulation tests.", + "default": 5 + }, + "simulation_environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Simulation Environment", + "description": "The environment to use when running this simulation test. If not provided, defaults to 'production'." + }, + "tool_mock_config": { + "$ref": "#/components/schemas/SimulationToolMockBehaviorConfig", + "description": "Configuration for which tools to mock and fallback behavior." + }, + "evaluation_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "LLM model to use for evaluating simulation results. Defaults to Claude Sonnet 4.6." + }, + "simulated_user_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "LLM model for the simulated user. Defaults to Claude Sonnet 4.6." + }, + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "GetSimulationTestResponseModel" + }, + "GetSpeechHistoryResponseModel": { + "properties": { + "history": { + "items": { + "$ref": "#/components/schemas/SpeechHistoryItemResponseModel" + }, + "type": "array", + "title": "History", + "description": "A list of speech history items." + }, + "last_history_item_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last History Item Id", + "description": "The ID of the last history item." + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Whether there are more history items to fetch." + }, + "scanned_until": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Scanned Until", + "description": "The timestamp of the last history item." + } + }, + "type": "object", + "required": [ + "history", + "has_more" + ], + "title": "GetSpeechHistoryResponseModel", + "example": { + "has_more": true, + "history": [ + { + "character_count_change_from": 17189, + "character_count_change_to": 17231, + "content_type": "audio/mpeg", + "date_unix": 1714650306, + "history_item_id": "ja9xsmfGhxYcymxGcOGB", + "model_id": "eleven_multilingual_v2", + "request_id": "BF0BZg4IwLGBlaVjv9Im", + "settings": { + "similarity_boost": 0.5, + "stability": 0.71, + "style": 0, + "use_speaker_boost": true + }, + "source": "TTS", + "state": "created", + "text": "Hello, world!", + "voice_category": "premade", + "voice_id": "21m00Tcm4TlvDq8ikWAM", + "voice_name": "Rachel" + } + ], + "last_history_item_id": "ja9xsmfGhxYcymxGcOGB", + "scanned_until": 1714650306 + } + }, + "GetTestInvocationsPageResponseModel": { + "properties": { + "meta": { + "$ref": "#/components/schemas/ListResponseMeta", + "default": {} + }, + "results": { + "items": { + "$ref": "#/components/schemas/TestInvocationSummaryResponseModel" + }, + "type": "array", + "title": "Results" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor", + "description": "Cursor for the next page of results" + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Whether there are more results available" + } + }, + "type": "object", + "required": [ + "results", + "has_more" + ], + "title": "GetTestInvocationsPageResponseModel" + }, + "GetTestSuiteInvocationResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "agent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Id" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + }, + "created_at": { + "type": "integer", + "title": "Created At" + }, + "folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Folder Id" + }, + "test_runs": { + "items": { + "$ref": "#/components/schemas/UnitTestRunResponseModel" + }, + "type": "array", + "title": "Test Runs" + } + }, + "type": "object", + "required": [ + "id", + "test_runs" + ], + "title": "GetTestSuiteInvocationResponseModel" + }, + "GetTestsPageResponseModel": { + "properties": { + "tests": { + "items": { + "$ref": "#/components/schemas/UnitTestSummaryResponseModel" + }, + "type": "array", + "title": "Tests" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "tests", + "has_more" + ], + "title": "GetTestsPageResponseModel" + }, + "GetTestsSummariesByIdsResponseModel": { + "properties": { + "tests": { + "additionalProperties": { + "$ref": "#/components/schemas/UnitTestSummaryResponseModel" + }, + "type": "object", + "title": "Tests", + "description": "Dictionary mapping test IDs to their summary information" + } + }, + "type": "object", + "required": [ + "tests" + ], + "title": "GetTestsSummariesByIdsResponseModel" + }, + "GetToolCallUnitTestResponseModel": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Output" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Output" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Output" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "tool", + "title": "Type", + "default": "tool" + }, + "tool_call_parameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/UnitTestToolCallEvaluationModel-Output" + }, + { + "type": "null" + } + ], + "description": "How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated." + }, + "check_any_tool_matches": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Check Any Tool Matches", + "description": "If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent." + }, + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "GetToolCallUnitTestResponseModel" + }, + "GetToolDependentAgentsResponseModel": { + "properties": { + "agents": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableAgentIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownAgentIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableAgentIdentifier", + "unknown": "#/components/schemas/DependentUnknownAgentIdentifier" + } + } + }, + "type": "array", + "title": "Agents" + }, + "branches": { + "items": { + "$ref": "#/components/schemas/DependentBranchInfo" + }, + "type": "array", + "title": "Branches" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "agents", + "has_more" + ], + "title": "GetToolDependentAgentsResponseModel" + }, + "GetToolExecutionsPageResponseModel": { + "properties": { + "executions": { + "items": { + "$ref": "#/components/schemas/ToolExecutionResponseModel" + }, + "type": "array", + "title": "Executions" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "executions", + "has_more" + ], + "title": "GetToolExecutionsPageResponseModel" + }, + "GetVoicesResponseModel": { + "properties": { + "voices": { + "items": { + "$ref": "#/components/schemas/VoiceResponseModel" + }, + "type": "array", + "title": "Voices", + "description": "A list of available voices." + } + }, + "type": "object", + "required": [ + "voices" + ], + "title": "GetVoicesResponseModel", + "example": { + "voices": [ + { + "available_for_tiers": [ + "creator", + "enterprise" + ], + "category": "professional", + "description": "A warm, expressive voice with a touch of humor.", + "fine_tuning": { + "is_allowed_to_fine_tune": true, + "manual_verification_requested": false, + "state": { + "eleven_multilingual_v2": "fine_tuned" + }, + "verification_attempts_count": 2, + "verification_failures": [] + }, + "high_quality_base_model_ids": [ + "eleven_v2_flash", + "eleven_flash_v2", + "eleven_turbo_v2_5", + "eleven_multilingual_v2", + "eleven_v2_5_flash", + "eleven_flash_v2_5", + "eleven_turbo_v2" + ], + "is_legacy": false, + "is_mixed": false, + "is_owner": false, + "labels": { + "accent": "American", + "age": "middle-aged", + "description": "expressive", + "gender": "female", + "use_case": "social media" + }, + "name": "Rachel", + "preview_url": "https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/405766b8-1f4e-4d3c-aba1-6f25333823ec.mp3", + "settings": { + "similarity_boost": 1, + "speed": 1, + "stability": 1, + "style": 0, + "use_speaker_boost": true + }, + "sharing": { + "category": "professional", + "cloned_by_count": 50, + "date_unix": 1714204800, + "description": "A female voice with a soft and friendly tone.", + "disable_at_unix": 1714204800, + "enabled_in_library": true, + "featured": true, + "financial_rewards_enabled": true, + "free_users_allowed": true, + "history_item_sample_id": "DCwhRBWXzGAHq8TQ4Fs18", + "labels": { + "accent": "American", + "gender": "female" + }, + "liked_by_count": 100, + "live_moderation_enabled": true, + "moderation_check": { + "captcha_checks": [ + 0.95, + 0.98 + ], + "captcha_ids": [ + "captcha1", + "captcha2" + ], + "date_checked_unix": 1714204800, + "description_check": true, + "description_value": "A female voice with a soft and friendly tone.", + "name_check": true, + "name_value": "Rachel", + "sample_checks": [ + 0.95, + 0.98 + ], + "sample_ids": [ + "sample1", + "sample2" + ] + }, + "name": "Rachel", + "notice_period": 30, + "original_voice_id": "DCwhRBWXzGAHq8TQ4Fs18", + "public_owner_id": "DCwhRBWXzGAHq8TQ4Fs18", + "rate": 0.05, + "reader_app_enabled": true, + "reader_restricted_on": [ + { + "resource_id": "FCwhRBWXzGAHq8TQ4Fs18", + "resource_type": "read" + } + ], + "review_status": "allowed", + "status": "enabled", + "voice_mixing_allowed": false, + "whitelisted_emails": [ + "example@example.com" + ] + }, + "verified_languages": [ + { + "accent": "american", + "language": "en", + "locale": "en-US", + "model_id": "eleven_multilingual_v2", + "preview_url": "https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/405766b8-1f4e-4d3c-aba1-6f25333823ec.mp3" + } + ], + "voice_id": "21m00Tcm4TlvDq8ikWAM", + "voice_verification": { + "is_verified": true, + "language": "en", + "requires_verification": false, + "verification_attempts": [ + { + "accepted": true, + "date_unix": 1714204800, + "levenshtein_distance": 2, + "recording": { + "mime_type": "audio/mpeg", + "recording_id": "CwhRBWXzGAHq8TQ4Fs17", + "size_bytes": 1000000, + "transcription": "Hello, how are you?", + "upload_date_unix": 1714204800 + }, + "similarity": 0.95, + "text": "Hello, how are you?" + } + ], + "verification_attempts_count": 0, + "verification_failures": [] + } + } + ] + } + }, + "GetVoicesV2ResponseModel": { + "properties": { + "voices": { + "items": { + "$ref": "#/components/schemas/VoiceResponseModel" + }, + "type": "array", + "title": "Voices", + "description": "The list of voices matching the query." + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Indicates whether there are more voices available in subsequent pages. Use this flag (and next_page_token) for reliable pagination instead of relying on total_count." + }, + "total_count": { + "type": "integer", + "title": "Total Count", + "description": "The total count of voices matching the query. This value is a live snapshot that reflects the current state of the database and may change between requests as users create, modify, or delete voices. For reliable pagination, use the has_more flag instead of relying on this value. Only request this field when you actually need the total count (e.g., for display purposes), as calculating it incurs a performance cost." + }, + "next_page_token": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Token", + "description": "Token to retrieve the next page of results. Pass this value to the next request to continue pagination. Null if there are no more results." + } + }, + "type": "object", + "required": [ + "voices", + "has_more", + "total_count" + ], + "title": "GetVoicesV2ResponseModel" + }, + "GetWhatsAppAccountResponse": { + "properties": { + "business_account_id": { + "type": "string", + "title": "Business Account Id" + }, + "phone_number_id": { + "type": "string", + "title": "Phone Number Id" + }, + "business_account_name": { + "type": "string", + "title": "Business Account Name" + }, + "phone_number_name": { + "type": "string", + "title": "Phone Number Name" + }, + "phone_number": { + "type": "string", + "title": "Phone Number" + }, + "assigned_agent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Assigned Agent Id" + }, + "enable_messaging": { + "type": "boolean", + "title": "Enable Messaging", + "default": true + }, + "enable_audio_message_response": { + "type": "boolean", + "title": "Enable Audio Message Response", + "default": true + }, + "assigned_agent_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Assigned Agent Name" + }, + "is_token_expired": { + "type": "boolean", + "title": "Is Token Expired", + "default": false + } + }, + "type": "object", + "required": [ + "business_account_id", + "phone_number_id", + "business_account_name", + "phone_number_name", + "phone_number", + "assigned_agent_name" + ], + "title": "GetWhatsAppAccountResponse" + }, + "GetWorkspaceSecretsResponseModel": { + "properties": { + "secrets": { + "items": { + "$ref": "#/components/schemas/ConvAIWorkspaceStoredSecretConfig" + }, + "type": "array", + "title": "Secrets" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor", + "description": "Cursor for fetching the next page of secrets" + } + }, + "type": "object", + "required": [ + "secrets" + ], + "title": "GetWorkspaceSecretsResponseModel" + }, + "GroupManagementActivityId": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 99 + ], + "title": "GroupManagementActivityId", + "description": "OCSF Activity IDs for Group Management [3006] events.\n\nSpec: https://schema.ocsf.io/1.6.0/classes/group_management" + }, + "GuardrailExecutionMode": { + "type": "string", + "enum": [ + "streaming", + "blocking" + ], + "title": "GuardrailExecutionMode", + "default": "streaming" + }, + "GuardrailsV1-Input": { + "properties": { + "version": { + "type": "string", + "const": "1", + "title": "Version", + "default": "1" + }, + "focus": { + "$ref": "#/components/schemas/FocusGuardrail" + }, + "prompt_injection": { + "$ref": "#/components/schemas/PromptInjectionGuardrail" + }, + "content": { + "$ref": "#/components/schemas/ContentGuardrail-Input" + }, + "moderation": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModerationGuardrail-Input" + }, + { + "type": "null" + } + ], + "x-fern-ignore": true + }, + "custom": { + "$ref": "#/components/schemas/CustomGuardrail-Input" + } + }, + "type": "object", + "title": "GuardrailsV1" + }, + "GuardrailsV1-Output": { + "properties": { + "version": { + "type": "string", + "const": "1", + "title": "Version", + "default": "1" + }, + "focus": { + "$ref": "#/components/schemas/FocusGuardrail" + }, + "prompt_injection": { + "$ref": "#/components/schemas/PromptInjectionGuardrail" + }, + "content": { + "$ref": "#/components/schemas/ContentGuardrail-Output" + }, + "moderation": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModerationGuardrail-Output" + }, + { + "type": "null" + } + ], + "x-fern-ignore": true + }, + "custom": { + "$ref": "#/components/schemas/CustomGuardrail-Output" + } + }, + "type": "object", + "title": "GuardrailsV1" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "HistoryAlignmentResponseModel": { + "properties": { + "characters": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Characters", + "description": "The characters in the alignment." + }, + "character_start_times_seconds": { + "items": { + "type": "number" + }, + "type": "array", + "title": "Character Start Times Seconds", + "description": "The start times of the characters in seconds." + }, + "character_end_times_seconds": { + "items": { + "type": "number" + }, + "type": "array", + "title": "Character End Times Seconds", + "description": "The end times of the characters in seconds." + } + }, + "type": "object", + "required": [ + "characters", + "character_start_times_seconds", + "character_end_times_seconds" + ], + "title": "HistoryAlignmentResponseModel" + }, + "HistoryAlignmentsResponseModel": { + "properties": { + "alignment": { + "$ref": "#/components/schemas/HistoryAlignmentResponseModel", + "description": "The alignment of the text." + }, + "normalized_alignment": { + "$ref": "#/components/schemas/HistoryAlignmentResponseModel", + "description": "The normalized alignment of the text." + } + }, + "type": "object", + "required": [ + "alignment", + "normalized_alignment" + ], + "title": "HistoryAlignmentsResponseModel" + }, + "HtmlExportOptions": { + "properties": { + "include_speakers": { + "type": "boolean", + "title": "Include Speakers", + "default": true + }, + "include_timestamps": { + "type": "boolean", + "title": "Include Timestamps", + "default": true + }, + "format": { + "type": "string", + "const": "html", + "title": "Format" + }, + "segment_on_silence_longer_than_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Segment On Silence Longer Than S" + }, + "max_segment_duration_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Segment Duration S" + }, + "max_segment_chars": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Segment Chars" + } + }, + "type": "object", + "required": [ + "format" + ], + "title": "HtmlExportOptions" + }, + "HttpRequestModel": { + "properties": { + "http_method": { + "type": "string", + "title": "Http Method", + "description": "HTTP method (GET, POST, etc.)" + }, + "url": { + "$ref": "#/components/schemas/UrlModel", + "description": "Request URL object" + }, + "user_agent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Agent", + "description": "User agent string" + }, + "x_forwarded_for": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "X Forwarded For", + "description": "X-Forwarded-For header as a list" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "http_method", + "url" + ], + "title": "HttpRequestModel", + "description": "HTTP request details.\n\nSpec: https://schema.ocsf.io/1.6.0/objects/http_request" + }, + "Icon": { + "properties": { + "src": { + "type": "string", + "title": "Src" + }, + "mimeType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Mimetype" + }, + "sizes": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sizes" + } + }, + "additionalProperties": true, + "type": "object", + "required": [ + "src" + ], + "title": "Icon", + "description": "An icon for display in user interfaces." + }, + "ImageAnalysis": { + "properties": { + "status": { + "type": "string", + "enum": [ + "processing", + "completed", + "failed" + ], + "title": "Status" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ImageAnalysisResult" + }, + { + "type": "null" + } + ] + }, + "updated_at_ms": { + "type": "integer", + "title": "Updated At Ms" + } + }, + "type": "object", + "required": [ + "status", + "data" + ], + "title": "ImageAnalysis" + }, + "ImageAnalysisResult": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "description": { + "type": "string", + "title": "Description" + }, + "content_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type" + }, + "mood_and_style": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Mood And Style" + }, + "composition_notes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Composition Notes" + }, + "visible_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Visible Text", + "description": "Readable text overlaid or shown in the image, if any." + }, + "subjects": { + "items": { + "$ref": "#/components/schemas/ImageSubject" + }, + "type": "array", + "title": "Subjects" + } + }, + "type": "object", + "required": [ + "title", + "description" + ], + "title": "ImageAnalysisResult" + }, + "ImageAvatar": { + "properties": { + "type": { + "type": "string", + "const": "image", + "title": "Type", + "description": "The type of the avatar", + "default": "image" + }, + "url": { + "type": "string", + "title": "Url", + "description": "The URL of the avatar", + "default": "" + } + }, + "type": "object", + "title": "ImageAvatar" + }, + "ImageSubject": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + } + }, + "type": "object", + "required": [ + "name", + "description" + ], + "title": "ImageSubject" + }, + "InboundSIPTrunkConfigRequestModel": { + "properties": { + "allowed_addresses": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Addresses", + "description": "List of IP addresses that are allowed to use the trunk. Each item in the list can be an individual IP address or a Classless Inter-Domain Routing notation representing a CIDR block." + }, + "allowed_numbers": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Numbers", + "description": "List of phone numbers that are allowed to use the trunk." + }, + "media_encryption": { + "$ref": "#/components/schemas/SIPMediaEncryptionEnum", + "description": "Whether or not to encrypt media (data layer).", + "default": "allowed" + }, + "credentials": { + "anyOf": [ + { + "$ref": "#/components/schemas/SIPTrunkCredentialsRequestModel" + }, + { + "type": "null" + } + ], + "description": "Optional digest authentication credentials (username/password)." + }, + "remote_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Remote Domains", + "description": "Domains of remote SIP servers used to validate TLS certificates." + }, + "attributes_to_headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Attributes To Headers", + "description": "Map of dynamic variable name to header name for attributes_to_headers" + } + }, + "type": "object", + "title": "InboundSIPTrunkConfigRequestModel" + }, + "IntegrationType": { + "type": "string", + "enum": [ + "mcp_server", + "mcp_integration" + ], + "title": "IntegrationType" + }, + "InteractionBudget": { + "type": "string", + "enum": [ + "realtime", + "async" + ], + "title": "InteractionBudget" + }, + "InvoiceResponseModel": { + "properties": { + "amount_due_cents": { + "type": "integer", + "title": "Amount Due Cents", + "description": "The amount due in cents." + }, + "subtotal_cents": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Subtotal Cents", + "description": "The subtotal amount in cents before tax (exclusive of tax and discounts)." + }, + "tax_cents": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Tax Cents", + "description": "The tax amount in cents." + }, + "discount_percent_off": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Discount Percent Off", + "description": "Deprecated. Use [discounts] instead. The discount applied to the invoice. E.g. [20.0f] for 20% off." + }, + "discount_amount_off": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Discount Amount Off", + "description": "Deprecated. Use [discounts] instead. The discount applied to the invoice. E.g. [20.0f] for 20 cents off." + }, + "discounts": { + "items": { + "$ref": "#/components/schemas/DiscountResponseModel" + }, + "type": "array", + "title": "Discounts", + "description": "The discounts applied to the invoice." + }, + "next_payment_attempt_unix": { + "type": "integer", + "title": "Next Payment Attempt Unix", + "description": "The Unix timestamp of the next payment attempt. -1 when there is no next payment attempt." + }, + "payment_intent_status": { + "anyOf": [ + { + "type": "string", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ] + }, + { + "type": "null" + } + ], + "title": "Payment Intent Status", + "description": "Deprecated. Use [payment_intent_statusses] instead. The status of this invoice's first payment intent. None when there is no payment intent." + }, + "payment_intent_statusses": { + "items": { + "type": "string", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ] + }, + "type": "array", + "title": "Payment Intent Statusses", + "description": "The statuses of this invoice's payment intents. Empty list when there are no payment intents." + } + }, + "type": "object", + "required": [ + "amount_due_cents", + "discounts", + "next_payment_attempt_unix", + "payment_intent_status", + "payment_intent_statusses" + ], + "title": "InvoiceResponseModel", + "example": { + "amount_due_cents": 1000, + "discounts": [ + { + "discount_percent_off": 20 + } + ], + "next_payment_attempt_unix": 1738356858, + "payment_intent_status": "processing", + "payment_intent_statusses": [ + "processing", + "succeeded" + ], + "subtotal_cents": 900, + "tax_cents": 100 + } + }, + "ItemId": { + "type": "string", + "pattern": "^proditem_[a-z0-9]{26}$" + }, + "KnowledgeBaseContentSearchResponseModel": { + "properties": { + "results": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseContentSearchResult" + }, + "type": "array", + "title": "Results" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + } + }, + "type": "object", + "required": [ + "results" + ], + "title": "KnowledgeBaseContentSearchResponseModel" + }, + "KnowledgeBaseContentSearchResult": { + "properties": { + "document": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryURLResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryFileResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryTextResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryFolderResponseModel" + } + ], + "title": "Document", + "discriminator": { + "propertyName": "type", + "mapping": { + "file": "#/components/schemas/GetKnowledgeBaseSummaryFileResponseModel", + "folder": "#/components/schemas/GetKnowledgeBaseSummaryFolderResponseModel", + "text": "#/components/schemas/GetKnowledgeBaseSummaryTextResponseModel", + "url": "#/components/schemas/GetKnowledgeBaseSummaryURLResponseModel" + } + } + }, + "search_snippet": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SearchHighlightSegment" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Search Snippet" + }, + "score": { + "type": "number", + "title": "Score" + } + }, + "type": "object", + "required": [ + "document", + "score" + ], + "title": "KnowledgeBaseContentSearchResult" + }, + "KnowledgeBaseDependentType": { + "type": "string", + "enum": [ + "direct", + "transitive", + "all" + ], + "title": "KnowledgeBaseDependentType" + }, + "KnowledgeBaseDocumentChunkResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "content": { + "type": "string", + "title": "Content" + } + }, + "type": "object", + "required": [ + "id", + "name", + "content" + ], + "title": "KnowledgeBaseDocumentChunkResponseModel" + }, + "KnowledgeBaseDocumentChunksResponseModel": { + "properties": { + "chunks": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentChunkResponseModel" + }, + "type": "array", + "title": "Chunks" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + } + }, + "type": "object", + "required": [ + "chunks" + ], + "title": "KnowledgeBaseDocumentChunksResponseModel" + }, + "KnowledgeBaseDocumentMetadataResponseModel": { + "properties": { + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs" + }, + "last_updated_at_unix_secs": { + "type": "integer", + "title": "Last Updated At Unix Secs" + }, + "size_bytes": { + "type": "integer", + "title": "Size Bytes" + } + }, + "type": "object", + "required": [ + "created_at_unix_secs", + "last_updated_at_unix_secs", + "size_bytes" + ], + "title": "KnowledgeBaseDocumentMetadataResponseModel" + }, + "KnowledgeBaseDocumentType": { + "type": "string", + "enum": [ + "file", + "url", + "text", + "folder" + ], + "title": "KnowledgeBaseDocumentType" + }, + "KnowledgeBaseFolderPathSegmentResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "KnowledgeBaseFolderPathSegmentResponseModel" + }, + "KnowledgeBaseFolderPathSegmentSummaryResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "KnowledgeBaseFolderPathSegmentSummaryResponseModel" + }, + "KnowledgeBaseLocator": { + "properties": { + "type": { + "$ref": "#/components/schemas/KnowledgeBaseDocumentType", + "description": "The type of the knowledge base" + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the knowledge base" + }, + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the knowledge base" + }, + "usage_mode": { + "$ref": "#/components/schemas/DocumentUsageModeEnum", + "description": "The usage mode of the knowledge base", + "default": "auto" + } + }, + "type": "object", + "required": [ + "type", + "name", + "id" + ], + "title": "KnowledgeBaseLocator", + "example": { + "id": "123", + "name": "My Knowledge Base", + "type": "file", + "usage_mode": "auto" + } + }, + "KnowledgeBaseRagToolConfig": { + "properties": { + "system_tool_type": { + "type": "string", + "const": "knowledge_base_rag", + "title": "System Tool Type", + "default": "knowledge_base_rag" + } + }, + "type": "object", + "title": "KnowledgeBaseRagToolConfig" + }, + "KnowledgeBaseRagToolResultModel": { + "properties": { + "result_type": { + "type": "string", + "const": "knowledge_base_rag_success", + "title": "Result Type", + "default": "knowledge_base_rag_success" + }, + "status": { + "$ref": "#/components/schemas/KnowledgeBaseRagToolStatus", + "default": "success" + }, + "chunk_count": { + "type": "integer", + "title": "Chunk Count", + "description": "Number of relevant chunks retrieved", + "default": 0 + }, + "message": { + "type": "string", + "title": "Message", + "description": "Human-readable status for the LLM about the search results", + "default": "Referenced knowledge base." + } + }, + "type": "object", + "title": "KnowledgeBaseRagToolResultModel" + }, + "KnowledgeBaseRagToolStatus": { + "type": "string", + "enum": [ + "success", + "no_documents", + "no_results" + ], + "title": "KnowledgeBaseRagToolStatus", + "default": "success" + }, + "KnowledgeBaseSortBy": { + "type": "string", + "enum": [ + "name", + "created_at", + "updated_at", + "size" + ], + "title": "KnowledgeBaseSortBy" + }, + "KnowledgeBaseSourceFileUrlResponseModel": { + "properties": { + "signed_url": { + "type": "string", + "title": "Signed Url", + "description": "Signed URL to download the source file directly" + } + }, + "type": "object", + "required": [ + "signed_url" + ], + "title": "KnowledgeBaseSourceFileUrlResponseModel" + }, + "KnowledgeBaseSummaryBatchSuccessfulResponseModel": { + "properties": { + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "data": { + "oneOf": [ + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryURLResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryFileResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryTextResponseModel" + }, + { + "$ref": "#/components/schemas/GetKnowledgeBaseSummaryFolderResponseModel" + } + ], + "title": "Data", + "discriminator": { + "propertyName": "type", + "mapping": { + "file": "#/components/schemas/GetKnowledgeBaseSummaryFileResponseModel", + "folder": "#/components/schemas/GetKnowledgeBaseSummaryFolderResponseModel", + "text": "#/components/schemas/GetKnowledgeBaseSummaryTextResponseModel", + "url": "#/components/schemas/GetKnowledgeBaseSummaryURLResponseModel" + } + } + } + }, + "type": "object", + "required": [ + "status", + "data" + ], + "title": "KnowledgeBaseSummaryBatchSuccessfulResponseModel" + }, + "LLM": { + "type": "string", + "enum": [ + "gpt-4o-mini", + "gpt-4o", + "gpt-4", + "gpt-4-turbo", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "gpt-5", + "gpt-5.1", + "gpt-5.2", + "gpt-5.2-chat-latest", + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.5", + "gpt-5-mini", + "gpt-5-nano", + "gpt-3.5-turbo", + "gemini-1.5-pro", + "gemini-1.5-flash", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.5-flash-lite", + "gemini-2.5-flash", + "gemini-3-pro-preview", + "gemini-3-flash-preview", + "gemini-3.1-pro-preview", + "gemini-3.1-flash-lite-preview", + "gemini-3.1-flash-lite", + "claude-sonnet-4-5", + "claude-opus-4-7", + "claude-sonnet-4-6", + "claude-sonnet-4", + "claude-haiku-4-5", + "claude-3-7-sonnet", + "claude-3-5-sonnet", + "claude-3-5-sonnet-v1", + "claude-3-haiku", + "grok-beta", + "custom-llm", + "qwen3-4b", + "qwen3-30b-a3b", + "qwen36-35b-a3b", + "qwen35-397b-a17b", + "gpt-oss-20b", + "gpt-oss-120b", + "glm-45-air-fp8", + "gemini-2.5-flash-preview-09-2025", + "gemini-2.5-flash-lite-preview-09-2025", + "gemini-2.5-flash-preview-05-20", + "gemini-2.5-flash-preview-04-17", + "gemini-2.5-flash-lite-preview-06-17", + "gemini-2.0-flash-lite-001", + "gemini-2.0-flash-001", + "gemini-1.5-flash-002", + "gemini-1.5-flash-001", + "gemini-1.5-pro-002", + "gemini-1.5-pro-001", + "claude-sonnet-4@20250514", + "claude-sonnet-4-5@20250929", + "claude-haiku-4-5@20251001", + "claude-3-7-sonnet@20250219", + "claude-3-5-sonnet@20240620", + "claude-3-5-sonnet-v2@20241022", + "claude-3-haiku@20240307", + "gpt-5-2025-08-07", + "gpt-5.1-2025-11-13", + "gpt-5.2-2025-12-11", + "gpt-5.4-2026-03-05", + "gpt-5.4-mini-2026-03-17", + "gpt-5.4-nano-2026-03-17", + "gpt-5.5-2026-04-23", + "gpt-5-mini-2025-08-07", + "gpt-5-nano-2025-08-07", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "gpt-4o-mini-2024-07-18", + "gpt-4o-2024-11-20", + "gpt-4o-2024-08-06", + "gpt-4o-2024-05-13", + "gpt-4-0613", + "gpt-4-0314", + "gpt-4-turbo-2024-04-09", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-1106", + "watt-tool-8b", + "watt-tool-70b" + ], + "title": "LLM", + "default": "gemini-2.5-flash" + }, + "LLMCategoryUsage": { + "properties": { + "irreversible_generation": { + "$ref": "#/components/schemas/LLMUsage-Output" + }, + "initiated_generation": { + "$ref": "#/components/schemas/LLMUsage-Output" + } + }, + "type": "object", + "title": "LLMCategoryUsage" + }, + "LLMDeprecationConfigModel": { + "properties": { + "warning_start_days": { + "type": "integer", + "title": "Warning Start Days", + "description": "Number of days before the provider deprecation date when warnings start being shown." + }, + "fallback_start_days": { + "type": "integer", + "title": "Fallback Start Days", + "description": "Number of days before the provider deprecation date when traffic starts being routed to the replacement model." + }, + "fallback_complete_days": { + "type": "integer", + "title": "Fallback Complete Days", + "description": "Number of days before the provider deprecation date when all traffic is routed to the replacement model." + }, + "fallback_start_percentage": { + "type": "integer", + "title": "Fallback Start Percentage", + "description": "Percentage of traffic routed to the replacement model when fallback begins." + }, + "fallback_complete_percentage": { + "type": "integer", + "title": "Fallback Complete Percentage", + "description": "Percentage of traffic routed to the replacement model when fallback is complete." + } + }, + "type": "object", + "required": [ + "warning_start_days", + "fallback_start_days", + "fallback_complete_days", + "fallback_start_percentage", + "fallback_complete_percentage" + ], + "title": "LLMDeprecationConfigModel", + "example": { + "fallback_complete_days": 7, + "fallback_complete_percentage": 100, + "fallback_start_days": 14, + "fallback_start_percentage": 25, + "warning_start_days": 30 + } + }, + "LLMDeprecationInfoModel": { + "properties": { + "llm": { + "$ref": "#/components/schemas/LLM", + "description": "The identifier of the deprecated LLM model." + }, + "is_deprecated": { + "type": "boolean", + "title": "Is Deprecated", + "description": "Whether this model is currently deprecated. True if the model is immediately deprecated or within the warning period." + }, + "is_in_warning_period": { + "type": "boolean", + "title": "Is In Warning Period", + "description": "Whether this model is currently in the warning period before deprecation.", + "default": false + }, + "is_in_fallback_period": { + "type": "boolean", + "title": "Is In Fallback Period", + "description": "Whether traffic is currently being progressively routed to the replacement model.", + "default": false + }, + "fallback_percentage": { + "type": "integer", + "title": "Fallback Percentage", + "description": "Current percentage of traffic being routed to the replacement model (0-100).", + "default": 0 + }, + "provider_deprecation_date": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Provider Deprecation Date", + "description": "The date when the model provider will deprecate this model. Null for immediately deprecated models." + }, + "replacement_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "The model that replaces this deprecated model. Traffic will be automatically routed to this model." + }, + "deprecation_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLMDeprecationConfigModel" + }, + { + "type": "null" + } + ], + "description": "Custom deprecation timing configuration for this model. Null if using the default configuration." + } + }, + "type": "object", + "required": [ + "llm", + "is_deprecated" + ], + "title": "LLMDeprecationInfoModel", + "example": { + "fallback_percentage": 0, + "is_deprecated": true, + "is_in_fallback_period": false, + "is_in_warning_period": true, + "llm": "gpt-4o-mini", + "provider_deprecation_date": "2025-06-01T00:00:00Z", + "replacement_model": "gpt-4o" + } + }, + "LLMInfoModel-Input": { + "properties": { + "llm": { + "$ref": "#/components/schemas/LLM", + "description": "The model identifier." + }, + "is_checkpoint": { + "type": "boolean", + "title": "Is Checkpoint", + "description": "Whether this is a pinned checkpoint version of a model rather than a top-level alias." + }, + "max_tokens_limit": { + "type": "integer", + "title": "Max Tokens Limit", + "description": "Maximum number of output tokens the model can generate." + }, + "max_context_limit": { + "type": "integer", + "title": "Max Context Limit", + "description": "Maximum number of input context tokens the model supports." + }, + "supports_image_input": { + "type": "boolean", + "title": "Supports Image Input", + "description": "Whether the model supports image file inputs during conversations." + }, + "supports_document_input": { + "type": "boolean", + "title": "Supports Document Input", + "description": "Whether the model supports document (PDF) file inputs during conversations." + }, + "supports_parallel_tool_calls": { + "type": "boolean", + "title": "Supports Parallel Tool Calls", + "description": "Whether the model supports calling multiple tools in parallel." + }, + "available_reasoning_efforts": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/LLMReasoningEffort" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Available Reasoning Efforts", + "description": "Available reasoning effort levels for this model. Null if the model does not support configurable reasoning." + }, + "deprecation_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLMDeprecationInfoModel" + }, + { + "type": "null" + } + ], + "description": "Deprecation information if this model is deprecated or scheduled for deprecation. Null if the model is not affected." + }, + "regional_processing_surcharge": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegionalProcessingSurchargeInfo" + }, + { + "type": "null" + } + ], + "description": "Regional processing surcharge details if this model has additional costs in the current deployment region. Null if no surcharge applies." + } + }, + "type": "object", + "required": [ + "llm", + "is_checkpoint", + "max_tokens_limit", + "max_context_limit", + "supports_image_input", + "supports_document_input", + "supports_parallel_tool_calls" + ], + "title": "LLMInfoModel", + "example": { + "is_checkpoint": false, + "llm": "gemini-2.5-flash", + "max_context_limit": 1048576, + "max_tokens_limit": 8192, + "supports_document_input": true, + "supports_image_input": true, + "supports_parallel_tool_calls": true + } + }, + "LLMInfoModel-Output": { + "properties": { + "llm": { + "$ref": "#/components/schemas/LLM", + "description": "The model identifier." + }, + "is_checkpoint": { + "type": "boolean", + "title": "Is Checkpoint", + "description": "Whether this is a pinned checkpoint version of a model rather than a top-level alias." + }, + "max_tokens_limit": { + "type": "integer", + "title": "Max Tokens Limit", + "description": "Maximum number of output tokens the model can generate." + }, + "max_context_limit": { + "type": "integer", + "title": "Max Context Limit", + "description": "Maximum number of input context tokens the model supports." + }, + "supports_image_input": { + "type": "boolean", + "title": "Supports Image Input", + "description": "Whether the model supports image file inputs during conversations." + }, + "supports_document_input": { + "type": "boolean", + "title": "Supports Document Input", + "description": "Whether the model supports document (PDF) file inputs during conversations." + }, + "supports_parallel_tool_calls": { + "type": "boolean", + "title": "Supports Parallel Tool Calls", + "description": "Whether the model supports calling multiple tools in parallel." + }, + "available_reasoning_efforts": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/LLMReasoningEffort" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Available Reasoning Efforts", + "description": "Available reasoning effort levels for this model. Null if the model does not support configurable reasoning." + }, + "deprecation_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLMDeprecationInfoModel" + }, + { + "type": "null" + } + ], + "description": "Deprecation information if this model is deprecated or scheduled for deprecation. Null if the model is not affected." + }, + "regional_processing_surcharge": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegionalProcessingSurchargeInfo" + }, + { + "type": "null" + } + ], + "description": "Regional processing surcharge details if this model has additional costs in the current deployment region. Null if no surcharge applies." + } + }, + "type": "object", + "required": [ + "llm", + "is_checkpoint", + "max_tokens_limit", + "max_context_limit", + "supports_image_input", + "supports_document_input", + "supports_parallel_tool_calls" + ], + "title": "LLMInfoModel", + "example": { + "is_checkpoint": false, + "llm": "gemini-2.5-flash", + "max_context_limit": 1048576, + "max_tokens_limit": 8192, + "supports_document_input": true, + "supports_image_input": true, + "supports_parallel_tool_calls": true + } + }, + "LLMInputOutputTokensUsage": { + "properties": { + "input": { + "$ref": "#/components/schemas/LLMTokensCategoryUsage" + }, + "input_cache_read": { + "$ref": "#/components/schemas/LLMTokensCategoryUsage" + }, + "input_cache_write": { + "$ref": "#/components/schemas/LLMTokensCategoryUsage" + }, + "output_total": { + "$ref": "#/components/schemas/LLMTokensCategoryUsage" + } + }, + "type": "object", + "title": "LLMInputOutputTokensUsage" + }, + "LLMListResponseModel-Input": { + "properties": { + "llms": { + "items": { + "$ref": "#/components/schemas/LLMInfoModel-Input" + }, + "type": "array", + "title": "Llms", + "description": "List of all available LLM models that can be used with agents." + }, + "default_deprecation_config": { + "$ref": "#/components/schemas/LLMDeprecationConfigModel", + "description": "The default deprecation timing configuration used for models without a custom override." + } + }, + "type": "object", + "required": [ + "llms", + "default_deprecation_config" + ], + "title": "LLMListResponseModel", + "example": { + "default_deprecation_config": { + "fallback_complete_days": 7, + "fallback_complete_percentage": 100, + "fallback_start_days": 14, + "fallback_start_percentage": 25, + "warning_start_days": 30 + }, + "llms": [ + { + "is_checkpoint": false, + "llm": "gemini-2.5-flash", + "max_context_limit": 1048576, + "max_tokens_limit": 8192, + "supports_document_input": true, + "supports_image_input": true, + "supports_parallel_tool_calls": true + } + ] + } + }, + "LLMListResponseModel-Output": { + "properties": { + "llms": { + "items": { + "$ref": "#/components/schemas/LLMInfoModel-Output" + }, + "type": "array", + "title": "Llms", + "description": "List of all available LLM models that can be used with agents." + }, + "default_deprecation_config": { + "$ref": "#/components/schemas/LLMDeprecationConfigModel", + "description": "The default deprecation timing configuration used for models without a custom override." + } + }, + "type": "object", + "required": [ + "llms", + "default_deprecation_config" + ], + "title": "LLMListResponseModel", + "example": { + "default_deprecation_config": { + "fallback_complete_days": 7, + "fallback_complete_percentage": 100, + "fallback_start_days": 14, + "fallback_start_percentage": 25, + "warning_start_days": 30 + }, + "llms": [ + { + "is_checkpoint": false, + "llm": "gemini-2.5-flash", + "max_context_limit": 1048576, + "max_tokens_limit": 8192, + "supports_document_input": true, + "supports_image_input": true, + "supports_parallel_tool_calls": true + } + ] + } + }, + "LLMLiteralJsonSchemaProperty": { + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "integer", + "number" + ], + "title": "Type" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description" + }, + "enum": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Enum", + "description": "List of allowed string values for string type parameters" + } + }, + "type": "object", + "required": [ + "type", + "description" + ], + "title": "LLMLiteralJsonSchemaProperty" + }, + "LLMParameterEvaluationStrategy": { + "properties": { + "type": { + "type": "string", + "const": "llm", + "title": "Type" + }, + "description": { + "type": "string", + "title": "Description", + "description": "A description of the evaluation strategy to use for the test." + } + }, + "type": "object", + "required": [ + "type", + "description" + ], + "title": "LLMParameterEvaluationStrategy" + }, + "LLMReasoningEffort": { + "type": "string", + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh" + ], + "title": "LLMReasoningEffort" + }, + "LLMSchemaOverride": { + "properties": { + "source": { + "type": "string", + "const": "llm", + "title": "Source", + "default": "llm" + }, + "prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt", + "description": "Prompt override for the LLM. If not provided, the original schema description is used." + } + }, + "type": "object", + "title": "LLMSchemaOverride" + }, + "LLMTokensCategoryUsage": { + "properties": { + "tokens": { + "type": "integer", + "title": "Tokens", + "default": 0 + }, + "price": { + "type": "number", + "title": "Price", + "default": 0 + } + }, + "type": "object", + "title": "LLMTokensCategoryUsage" + }, + "LLMUsage-Input": { + "properties": { + "model_usage": { + "additionalProperties": { + "$ref": "#/components/schemas/LLMInputOutputTokensUsage" + }, + "propertyNames": { + "$ref": "#/components/schemas/LLM" + }, + "type": "object", + "title": "Model Usage" + } + }, + "type": "object", + "title": "LLMUsage" + }, + "LLMUsage-Output": { + "properties": { + "model_usage": { + "additionalProperties": { + "$ref": "#/components/schemas/LLMInputOutputTokensUsage" + }, + "propertyNames": { + "$ref": "#/components/schemas/LLM" + }, + "type": "object", + "title": "Model Usage" + } + }, + "type": "object", + "title": "LLMUsage" + }, + "LLMUsageCalculatorLLMResponseModel": { + "properties": { + "llm": { + "$ref": "#/components/schemas/LLM" + }, + "price_per_minute": { + "type": "number", + "title": "Price Per Minute" + } + }, + "type": "object", + "required": [ + "llm", + "price_per_minute" + ], + "title": "LLMUsageCalculatorLLMResponseModel" + }, + "LLMUsageCalculatorPublicRequestModel": { + "properties": { + "prompt_length": { + "type": "integer", + "title": "Prompt Length", + "description": "Length of the prompt in characters." + }, + "number_of_pages": { + "type": "integer", + "title": "Number Of Pages", + "description": "Pages of content in PDF documents or URLs in the agent's knowledge base." + }, + "rag_enabled": { + "type": "boolean", + "title": "Rag Enabled", + "description": "Whether RAG is enabled." + } + }, + "type": "object", + "required": [ + "prompt_length", + "number_of_pages", + "rag_enabled" + ], + "title": "LLMUsageCalculatorPublicRequestModel" + }, + "LLMUsageCalculatorRequestModel": { + "properties": { + "prompt_length": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Prompt Length", + "description": "Length of the prompt in characters." + }, + "number_of_pages": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Number Of Pages", + "description": "Pages of content in pdf documents OR urls in agent's Knowledge Base." + }, + "rag_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Rag Enabled", + "description": "Whether RAG is enabled." + } + }, + "type": "object", + "title": "LLMUsageCalculatorRequestModel" + }, + "LLMUsageCalculatorResponseModel": { + "properties": { + "llm_prices": { + "items": { + "$ref": "#/components/schemas/LLMUsageCalculatorLLMResponseModel" + }, + "type": "array", + "title": "Llm Prices" + } + }, + "type": "object", + "required": [ + "llm_prices" + ], + "title": "LLMUsageCalculatorResponseModel" + }, + "LanguageAddedResponse": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + } + }, + "type": "object", + "required": [ + "version" + ], + "title": "LanguageAddedResponse" + }, + "LanguageDetectionToolConfig": { + "properties": { + "system_tool_type": { + "type": "string", + "const": "language_detection", + "title": "System Tool Type", + "default": "language_detection" + } + }, + "type": "object", + "title": "LanguageDetectionToolConfig" + }, + "LanguageDetectionToolResultModel": { + "properties": { + "result_type": { + "type": "string", + "const": "language_detection_success", + "title": "Result Type", + "default": "language_detection_success" + }, + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language" + } + }, + "type": "object", + "title": "LanguageDetectionToolResultModel" + }, + "LanguageInfo": { + "properties": { + "code": { + "type": "string", + "title": "Code", + "description": "The language code (e.g. 'en', 'fr', 'es-ES')." + }, + "label": { + "type": "string", + "title": "Label", + "description": "The human-readable language name (e.g. 'English', 'French', 'Spanish (Spain)')." + } + }, + "type": "object", + "required": [ + "code", + "label" + ], + "title": "LanguageInfo", + "example": { + "code": "es-ES", + "label": "Spanish (Spain)" + } + }, + "LanguagePairInfo": { + "properties": { + "source_language": { + "$ref": "#/components/schemas/LanguageInfo", + "description": "The source language." + }, + "destination_languages": { + "items": { + "$ref": "#/components/schemas/LanguageInfo" + }, + "type": "array", + "title": "Destination Languages", + "description": "The available destination languages for this source language." + } + }, + "type": "object", + "required": [ + "source_language", + "destination_languages" + ], + "title": "LanguagePairInfo", + "example": { + "destination_languages": [ + { + "code": "es-ES", + "label": "Spanish (Spain)" + }, + { + "code": "fr", + "label": "French" + } + ], + "source_language": { + "code": "en", + "label": "English" + } + } + }, + "LanguagePreset-Input": { + "properties": { + "overrides": { + "$ref": "#/components/schemas/ConversationConfigClientOverride-Input", + "description": "The overrides for the language preset" + }, + "first_message_translation": { + "anyOf": [ + { + "$ref": "#/components/schemas/LanguagePresetTranslation" + }, + { + "type": "null" + } + ], + "description": "The translation of the first message" + }, + "soft_timeout_translation": { + "anyOf": [ + { + "$ref": "#/components/schemas/LanguagePresetTranslation" + }, + { + "type": "null" + } + ], + "description": "The translation of the soft timeout message" + } + }, + "type": "object", + "required": [ + "overrides" + ], + "title": "LanguagePreset" + }, + "LanguagePreset-Output": { + "properties": { + "overrides": { + "$ref": "#/components/schemas/ConversationConfigClientOverride-Output", + "description": "The overrides for the language preset" + }, + "first_message_translation": { + "anyOf": [ + { + "$ref": "#/components/schemas/LanguagePresetTranslation" + }, + { + "type": "null" + } + ], + "description": "The translation of the first message" + }, + "soft_timeout_translation": { + "anyOf": [ + { + "$ref": "#/components/schemas/LanguagePresetTranslation" + }, + { + "type": "null" + } + ], + "description": "The translation of the soft timeout message" + } + }, + "type": "object", + "required": [ + "overrides" + ], + "title": "LanguagePreset" + }, + "LanguagePresetTranslation": { + "properties": { + "source_hash": { + "type": "string", + "title": "Source Hash" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "type": "object", + "required": [ + "source_hash", + "text" + ], + "title": "LanguagePresetTranslation" + }, + "LanguageResponseModel": { + "properties": { + "language_id": { + "type": "string", + "title": "Language Id", + "description": "The unique identifier of the language." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the language." + } + }, + "type": "object", + "required": [ + "language_id", + "name" + ], + "title": "LanguageResponseModel", + "example": { + "language_id": "en", + "name": "English" + } + }, + "LanguagesResponse": { + "oneOf": [ + { + "$ref": "#/components/schemas/PairedLanguagesResponse" + }, + { + "$ref": "#/components/schemas/SingleLanguagesResponse" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "pair": "#/components/schemas/PairedLanguagesResponse", + "single": "#/components/schemas/SingleLanguagesResponse" + } + } + }, + "LeaveMessageParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "leave_message", + "title": "Smb Tool Type", + "default": "leave_message" + } + }, + "type": "object", + "title": "LeaveMessageParams" + }, + "LibraryVoiceResponseModel": { + "properties": { + "public_owner_id": { + "type": "string", + "title": "Public Owner Id", + "description": "The public owner id of the voice." + }, + "voice_id": { + "type": "string", + "title": "Voice Id", + "description": "The id of the voice." + }, + "date_unix": { + "type": "integer", + "title": "Date Unix", + "description": "The date the voice was added to the library in Unix time." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the voice." + }, + "accent": { + "type": "string", + "title": "Accent", + "description": "The accent of the voice." + }, + "gender": { + "type": "string", + "title": "Gender", + "description": "The gender of the voice." + }, + "age": { + "type": "string", + "title": "Age", + "description": "The age of the voice." + }, + "descriptive": { + "type": "string", + "title": "Descriptive", + "description": "The descriptive of the voice." + }, + "use_case": { + "type": "string", + "title": "Use Case", + "description": "The use case of the voice." + }, + "category": { + "type": "string", + "enum": [ + "generated", + "cloned", + "premade", + "professional", + "famous", + "high_quality" + ], + "title": "Category", + "description": "The category of the voice." + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "The language of the voice." + }, + "locale": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Locale", + "description": "The locale of the voice." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of the voice." + }, + "preview_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Preview Url", + "description": "The preview URL of the voice." + }, + "usage_character_count_1y": { + "type": "integer", + "title": "Usage Character Count 1Y", + "description": "The usage character count of the voice in the last year." + }, + "usage_character_count_7d": { + "type": "integer", + "title": "Usage Character Count 7D", + "description": "The usage character count of the voice in the last 7 days." + }, + "play_api_usage_character_count_1y": { + "type": "integer", + "title": "Play Api Usage Character Count 1Y", + "description": "The play API usage character count of the voice in the last year." + }, + "cloned_by_count": { + "type": "integer", + "title": "Cloned By Count", + "description": "The number of times the voice has been cloned." + }, + "rate": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Rate", + "description": "The rate multiplier of the voice." + }, + "fiat_rate": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Fiat Rate", + "description": "The rate of the voice in USD per 1000 credits. null if default" + }, + "free_users_allowed": { + "type": "boolean", + "title": "Free Users Allowed", + "description": "Whether free users are allowed to use the voice." + }, + "live_moderation_enabled": { + "type": "boolean", + "title": "Live Moderation Enabled", + "description": "Whether live moderation is enabled for the voice." + }, + "featured": { + "type": "boolean", + "title": "Featured", + "description": "Whether the voice is featured." + }, + "verified_languages": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/VerifiedVoiceLanguageResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Verified Languages", + "description": "The verified languages of the voice." + }, + "notice_period": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Notice Period", + "description": "The notice period of the voice." + }, + "instagram_username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Instagram Username", + "description": "The Instagram username of the voice." + }, + "twitter_username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Twitter Username", + "description": "The Twitter username of the voice." + }, + "youtube_username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Youtube Username", + "description": "The YouTube username of the voice." + }, + "tiktok_username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tiktok Username", + "description": "The TikTok username of the voice." + }, + "image_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Image Url", + "description": "The image URL of the voice." + }, + "is_added_by_user": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Added By User", + "description": "Whether the voice was added by the user." + }, + "is_bookmarked": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Bookmarked", + "description": "Whether the voice is bookmarked by the current user. Only relevant when is_added_by_user is True." + } + }, + "type": "object", + "required": [ + "public_owner_id", + "voice_id", + "date_unix", + "name", + "accent", + "gender", + "age", + "descriptive", + "use_case", + "category", + "usage_character_count_1y", + "usage_character_count_7d", + "play_api_usage_character_count_1y", + "cloned_by_count", + "free_users_allowed", + "live_moderation_enabled", + "featured" + ], + "title": "LibraryVoiceResponseModel", + "example": { + "accent": "american", + "age": "young", + "category": "professional", + "cloned_by_count": 11, + "date_unix": 1714423232, + "description": "Perfectly calm, neutral and strong voice. Great for a young female protagonist.", + "descriptive": "calm", + "featured": false, + "free_users_allowed": true, + "gender": "Female", + "language": "en", + "live_moderation_enabled": false, + "name": "Alita", + "play_api_usage_character_count_1y": 12852, + "preview_url": "https://storage.googleapis.com/eleven-public-prod/wqkMCd9huxXHX1dy5mLJn4QEQHj1/voices/sB1b5zUrxQVAFl2PhZFp/55e71aac-5cb7-4b3d-8241-429388160509.mp3", + "public_owner_id": "63e84100a6bf7874ba37a1bab9a31828a379ec94b891b401653b655c5110880f", + "rate": 1, + "usage_character_count_1y": 12852, + "usage_character_count_7d": 12852, + "use_case": "characters_animation", + "verified_languages": [ + { + "accent": "american", + "language": "en", + "locale": "en-US", + "model_id": "eleven_multilingual_v2", + "preview_url": "https://storage.googleapis.com/eleven-public-prod/wqkMCd9huxXHX1dy5mLJn4QEQHj1/voices/sB1b5zUrxQVAFl2PhZFp/55e71aac-5cb7-4b3d-8241-429388160509.mp3" + } + ], + "voice_id": "sB1b5zUrxQVAFl2PhZFp" + } + }, + "ListAgentRulesParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "list_agent_rules", + "title": "Smb Tool Type", + "default": "list_agent_rules" + } + }, + "type": "object", + "title": "ListAgentRulesParams" + }, + "ListAssetsParams": { + "properties": { + "list_kwargs": { + "additionalProperties": true, + "type": "object", + "title": "List Kwargs" + }, + "smb_tool_type": { + "type": "string", + "const": "list_assets", + "title": "Smb Tool Type", + "default": "list_assets" + } + }, + "type": "object", + "title": "ListAssetsParams" + }, + "ListAuthConnectionsResponse": { + "properties": { + "auth_connections": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/OAuth2ClientCredsResponse" + }, + { + "$ref": "#/components/schemas/BasicAuthResponse" + }, + { + "$ref": "#/components/schemas/BearerAuthResponse" + }, + { + "$ref": "#/components/schemas/OAuth2JWTResponse" + }, + { + "$ref": "#/components/schemas/PrivateKeyJWTResponse" + }, + { + "$ref": "#/components/schemas/MTLSAuthResponse" + }, + { + "$ref": "#/components/schemas/CustomHeaderAuthResponse" + }, + { + "$ref": "#/components/schemas/ApiIntegrationOAuth2AuthCodeResponse" + }, + { + "$ref": "#/components/schemas/ApiIntegrationOAuth2CustomAppResponse" + }, + { + "$ref": "#/components/schemas/WhatsAppAuthResponse" + }, + { + "$ref": "#/components/schemas/SlackBotAuthResponse" + } + ], + "description": "The type of auth connection config", + "discriminator": { + "propertyName": "auth_type", + "mapping": { + "api_integration_oauth2_auth_code": "#/components/schemas/ApiIntegrationOAuth2AuthCodeResponse", + "api_integration_oauth2_custom_app": "#/components/schemas/ApiIntegrationOAuth2CustomAppResponse", + "basic_auth": "#/components/schemas/BasicAuthResponse", + "bearer_auth": "#/components/schemas/BearerAuthResponse", + "custom_header_auth": "#/components/schemas/CustomHeaderAuthResponse", + "mtls": "#/components/schemas/MTLSAuthResponse", + "oauth2_client_credentials": "#/components/schemas/OAuth2ClientCredsResponse", + "oauth2_jwt": "#/components/schemas/OAuth2JWTResponse", + "private_key_jwt": "#/components/schemas/PrivateKeyJWTResponse", + "slack_bot_auth": "#/components/schemas/SlackBotAuthResponse", + "whatsapp_auth": "#/components/schemas/WhatsAppAuthResponse" + } + } + }, + "type": "array", + "title": "Auth Connections" + } + }, + "type": "object", + "required": [ + "auth_connections" + ], + "title": "ListAuthConnectionsResponse" + }, + "ListCalendarEventsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "list_calendar_events", + "title": "Smb Tool Type", + "default": "list_calendar_events" + }, + "include_cancelled": { + "type": "boolean", + "title": "Include Cancelled", + "default": false + } + }, + "type": "object", + "title": "ListCalendarEventsParams" + }, + "ListClientInteractionsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "list_client_interactions", + "title": "Smb Tool Type", + "default": "list_client_interactions" + } + }, + "type": "object", + "title": "ListClientInteractionsParams" + }, + "ListClientsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "list_clients", + "title": "Smb Tool Type", + "default": "list_clients" + } + }, + "type": "object", + "title": "ListClientsParams", + "description": "List clients ordered by most recently updated, with an optional limit." + }, + "ListCustomerFacingAgentsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "list_customer_facing_agents", + "title": "Smb Tool Type", + "default": "list_customer_facing_agents" + } + }, + "type": "object", + "title": "ListCustomerFacingAgentsParams", + "description": "List every customer-facing agent on the workspace.\n\nThe assistant uses this whenever it needs to act on a specific customer-facing\nagent (rules, config edits, etc.) so it can pick the right ``agent_id`` to pass\nto mutating tools. Mirrors the ``list_services`` / ``list_clients``\npattern: read once, then mutate by id." + }, + "ListGroupSessionsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "list_group_sessions", + "title": "Smb Tool Type", + "default": "list_group_sessions" + } + }, + "type": "object", + "title": "ListGroupSessionsParams", + "description": "List scheduled group sessions for a group service in a date range.\n\nGroup services are scheduled in advance (e.g. yoga classes, workshops) and\ncallers register against an existing session. Use this for group services;\nuse ``check_service_availability`` for appointment / rental services." + }, + "ListHolidaysParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "list_holidays", + "title": "Smb Tool Type", + "default": "list_holidays" + } + }, + "type": "object", + "title": "ListHolidaysParams" + }, + "ListLocationsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "list_locations", + "title": "Smb Tool Type", + "default": "list_locations" + } + }, + "type": "object", + "title": "ListLocationsParams" + }, + "ListMCPToolsResponseModel": { + "properties": { + "success": { + "type": "boolean", + "title": "Success", + "description": "Indicates if the operation was successful." + }, + "tools": { + "items": { + "$ref": "#/components/schemas/Tool" + }, + "type": "array", + "title": "Tools", + "description": "A list of tools available on the MCP server." + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Message", + "description": "Error message if the operation was not successful." + } + }, + "type": "object", + "required": [ + "success", + "tools" + ], + "title": "ListMCPToolsResponseModel", + "description": "Response model for testing tools available on an MCP server.", + "example": { + "success": true, + "tools": [ + { + "description": "Gets current weather conditions for a location.", + "inputSchema": { + "properties": { + "latitude": { + "description": "Latitude", + "type": "string" + }, + "longitude": { + "description": "Longitude", + "type": "string" + } + }, + "required": [ + "latitude", + "longitude" + ], + "type": "object" + }, + "name": "weather_by_zapier_get_current" + }, + { + "description": "Description of tool2", + "inputSchema": { + "properties": {}, + "type": "object" + }, + "name": "tool2" + } + ] + } + }, + "ListOrdersResponse": { + "properties": { + "orders": { + "items": { + "$ref": "#/components/schemas/OrderSummary" + }, + "type": "array", + "title": "Orders", + "description": "The list of orders matching the query." + } + }, + "type": "object", + "required": [ + "orders" + ], + "title": "ListOrdersResponse", + "example": { + "orders": [ + { + "name": "Spanish Dubs", + "order_id": "prodorder_01jgatk6h0fwxrtbjade61yqhx", + "state": "submitted", + "submitted_at": "2025-03-15T10:30:00Z", + "total_amount_usd": 11, + "updated_at": "2025-03-15T10:30:00Z" + } + ] + } + }, + "ListProductsParams": { + "properties": { + "list_kwargs": { + "additionalProperties": true, + "type": "object", + "title": "List Kwargs" + }, + "smb_tool_type": { + "type": "string", + "const": "list_products", + "title": "Smb Tool Type", + "default": "list_products" + } + }, + "type": "object", + "title": "ListProductsParams" + }, + "ListResponseMeta": { + "properties": { + "total": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Total" + }, + "page": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Page" + }, + "page_size": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Page Size" + } + }, + "type": "object", + "title": "ListResponseMeta" + }, + "ListResponse_AgentBranchSummary_": { + "properties": { + "meta": { + "$ref": "#/components/schemas/ListResponseMeta", + "default": {} + }, + "results": { + "items": { + "$ref": "#/components/schemas/AgentBranchSummary" + }, + "type": "array", + "title": "Results" + } + }, + "type": "object", + "required": [ + "results" + ], + "title": "ListResponse[AgentBranchSummary]" + }, + "ListServicesParams": { + "properties": { + "list_kwargs": { + "additionalProperties": true, + "type": "object", + "title": "List Kwargs" + }, + "smb_tool_type": { + "type": "string", + "const": "list_services", + "title": "Smb Tool Type", + "default": "list_services" + } + }, + "type": "object", + "title": "ListServicesParams" + }, + "ListSpeechEnginesResponse": { + "properties": { + "speech_engines": { + "items": { + "$ref": "#/components/schemas/SpeechEngineSummaryResponse" + }, + "type": "array", + "title": "Speech Engines", + "description": "The speech engines matching the query" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor", + "description": "Cursor for fetching the next page" + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Whether there are more results" + } + }, + "type": "object", + "required": [ + "speech_engines", + "has_more" + ], + "title": "ListSpeechEnginesResponse", + "example": { + "has_more": false, + "speech_engines": [ + { + "access_info": { + "creator_email": "john@example.com", + "creator_name": "John Doe", + "is_creator": true, + "role": "admin" + }, + "created_at_unix_secs": 1714000000, + "name": "My Speech Engine", + "speech_engine_id": "seng_3701k3ttaq12ewp8b7qv5rfyszkz", + "tags": [ + "production", + "v1" + ] + } + ] + } + }, + "ListStaffParams": { + "properties": { + "list_kwargs": { + "additionalProperties": true, + "type": "object", + "title": "List Kwargs" + }, + "smb_tool_type": { + "type": "string", + "const": "list_staff", + "title": "Smb Tool Type", + "default": "list_staff" + } + }, + "type": "object", + "title": "ListStaffParams" + }, + "ListTestsByIdsRequestModel": { + "properties": { + "test_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Test Ids", + "description": "List of test IDs to fetch. No duplicates allowed.", + "examples": [ + [ + "test_id_1", + "test_id_2" + ] + ] + } + }, + "type": "object", + "required": [ + "test_ids" + ], + "title": "ListTestsByIdsRequestModel" + }, + "ListWhatsAppAccountsResponse": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/GetWhatsAppAccountResponse" + }, + "type": "array", + "title": "Items" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "ListWhatsAppAccountsResponse" + }, + "LiteralJsonSchemaProperty": { + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "integer", + "number" + ], + "title": "Type" + }, + "description": { + "type": "string", + "title": "Description", + "description": "The description of the property. When set, the LLM will provide the value based on this description. Mutually exclusive with dynamic_variable, is_system_provided, and constant_value.", + "default": "" + }, + "enum": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Enum", + "description": "List of allowed string values for string type parameters" + }, + "is_system_provided": { + "type": "boolean", + "title": "Is System Provided", + "description": "If true, the value will be populated by the system at runtime. Used by API Integration Webhook tools for templating. Mutually exclusive with description, dynamic_variable, and constant_value.", + "default": false + }, + "dynamic_variable": { + "type": "string", + "title": "Dynamic Variable", + "description": "The name of the dynamic variable to use for this property's value. Mutually exclusive with description, is_system_provided, and constant_value.", + "default": "" + }, + "constant_value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "title": "Constant Value", + "description": "A constant value to use for this property. Mutually exclusive with description, dynamic_variable, and is_system_provided.", + "default": "" + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "LiteralJsonSchemaProperty", + "description": "Schema property for literal JSON types. IMPORTANT: Only ONE of the following fields can be set: description (LLM provides value), dynamic_variable (value from variable), is_system_provided (system provides value), or constant_value (fixed value). These are mutually exclusive.", + "example": { + "description": "A user-provided message", + "type": "string" + } + }, + "LivekitStackType": { + "type": "string", + "enum": [ + "standard", + "static" + ], + "title": "LivekitStackType", + "default": "standard" + }, + "LoadProcedureToolConfig": { + "properties": { + "system_tool_type": { + "type": "string", + "const": "load_procedure", + "title": "System Tool Type", + "default": "load_procedure" + }, + "procedures": { + "additionalProperties": { + "$ref": "#/components/schemas/ProcedureAtVersion" + }, + "type": "object", + "title": "Procedures" + } + }, + "type": "object", + "title": "LoadProcedureToolConfig" + }, + "LoadProcedureToolErrorStatus": { + "type": "string", + "enum": [ + "not_found", + "invalid_name" + ] + }, + "MCPApprovalPolicy": { + "type": "string", + "enum": [ + "auto_approve_all", + "require_approval_all", + "require_approval_per_tool" + ], + "title": "MCPApprovalPolicy", + "description": "Defines the MCP server-level approval policy for tool execution.", + "default": "require_approval_all" + }, + "MCPApprovalPolicyUpdateRequestModel": { + "properties": { + "approval_policy": { + "$ref": "#/components/schemas/MCPApprovalPolicy", + "description": "The approval mode to set for the MCP server" + } + }, + "type": "object", + "required": [ + "approval_policy" + ], + "title": "MCPApprovalPolicyUpdateRequestModel", + "description": "Request model for updating MCP Server approval mode." + }, + "MCPServerConfig-Input": { + "properties": { + "approval_policy": { + "$ref": "#/components/schemas/MCPApprovalPolicy", + "default": "require_approval_all" + }, + "tool_approval_hashes": { + "items": { + "$ref": "#/components/schemas/MCPToolApprovalHash" + }, + "type": "array", + "title": "Tool Approval Hashes", + "description": "List of tool approval hashes for per-tool approval when approval_policy is REQUIRE_APPROVAL_PER_TOOL" + }, + "transport": { + "$ref": "#/components/schemas/MCPServerTransport", + "description": "The transport type used to connect to the MCP server", + "default": "SSE" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAISecretLocator" + } + ], + "title": "Url", + "description": "The URL of the MCP server, if this contains a secret please store as a workspace secret, otherwise store as a plain string. Must use https" + }, + "secret_token": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "$ref": "#/components/schemas/ConvAIUserSecretDBModel" + }, + { + "type": "null" + } + ], + "title": "Secret Token", + "description": "The secret token (Authorization header) stored as a workspace secret or in-place secret" + }, + "request_headers": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "$ref": "#/components/schemas/ConvAIDynamicVariable" + }, + { + "$ref": "#/components/schemas/ConvAIEnvVarLocator" + } + ] + }, + "type": "object", + "title": "Request Headers", + "description": "The headers included in the request" + }, + "auth_connection": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionLocator" + }, + { + "$ref": "#/components/schemas/EnvironmentAuthConnectionLocator" + }, + { + "type": "null" + } + ], + "title": "Auth Connection", + "description": "Optional auth connection to use for authentication with this MCP server" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, all tools from this MCP server will require pre-tool execution speech.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency. Applies to every tool from this MCP server unless overridden per tool.", + "default": "auto" + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while any tool from this MCP server is running.", + "default": false + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution for all tools from this MCP server" + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play for all tools from this MCP server", + "default": "auto" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how all tools from this MCP server execute: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 300, + "minimum": 5, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for each MCP tool call to complete. Must be between 5 and 300 seconds (inclusive).", + "default": 30 + }, + "tool_config_overrides": { + "items": { + "$ref": "#/components/schemas/MCPToolConfigOverride-Input" + }, + "type": "array", + "title": "Tool Config Overrides", + "description": "List of per-tool configuration overrides that override the server-level defaults for specific tools" + }, + "disable_compression": { + "type": "boolean", + "title": "Disable Compression", + "description": "Whether to disable HTTP compression for this MCP server. Enable this if the server does not support compressed responses.", + "default": false + } + }, + "type": "object", + "required": [ + "url", + "name" + ], + "title": "MCPServerConfig" + }, + "MCPServerConfig-Output": { + "properties": { + "approval_policy": { + "$ref": "#/components/schemas/MCPApprovalPolicy", + "default": "require_approval_all" + }, + "tool_approval_hashes": { + "items": { + "$ref": "#/components/schemas/MCPToolApprovalHash" + }, + "type": "array", + "title": "Tool Approval Hashes", + "description": "List of tool approval hashes for per-tool approval when approval_policy is REQUIRE_APPROVAL_PER_TOOL" + }, + "transport": { + "$ref": "#/components/schemas/MCPServerTransport", + "description": "The transport type used to connect to the MCP server", + "default": "SSE" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAISecretLocator" + } + ], + "title": "Url", + "description": "The URL of the MCP server, if this contains a secret please store as a workspace secret, otherwise store as a plain string. Must use https" + }, + "secret_token": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "$ref": "#/components/schemas/ConvAIUserSecretDBModel" + }, + { + "type": "null" + } + ], + "title": "Secret Token", + "description": "The secret token (Authorization header) stored as a workspace secret or in-place secret" + }, + "request_headers": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "$ref": "#/components/schemas/ConvAIDynamicVariable" + }, + { + "$ref": "#/components/schemas/ConvAIEnvVarLocator" + } + ] + }, + "type": "object", + "title": "Request Headers", + "description": "The headers included in the request" + }, + "auth_connection": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionLocator" + }, + { + "$ref": "#/components/schemas/EnvironmentAuthConnectionLocator" + }, + { + "type": "null" + } + ], + "title": "Auth Connection", + "description": "Optional auth connection to use for authentication with this MCP server" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, all tools from this MCP server will require pre-tool execution speech.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency. Applies to every tool from this MCP server unless overridden per tool.", + "default": "auto" + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while any tool from this MCP server is running.", + "default": false + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution for all tools from this MCP server" + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play for all tools from this MCP server", + "default": "auto" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how all tools from this MCP server execute: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 300, + "minimum": 5, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for each MCP tool call to complete. Must be between 5 and 300 seconds (inclusive).", + "default": 30 + }, + "tool_config_overrides": { + "items": { + "$ref": "#/components/schemas/MCPToolConfigOverride-Output" + }, + "type": "array", + "title": "Tool Config Overrides", + "description": "List of per-tool configuration overrides that override the server-level defaults for specific tools" + }, + "disable_compression": { + "type": "boolean", + "title": "Disable Compression", + "description": "Whether to disable HTTP compression for this MCP server. Enable this if the server does not support compressed responses.", + "default": false + } + }, + "type": "object", + "required": [ + "url", + "name" + ], + "title": "MCPServerConfig" + }, + "MCPServerConfigUpdateRequestModel": { + "properties": { + "approval_policy": { + "anyOf": [ + { + "$ref": "#/components/schemas/MCPApprovalPolicy" + }, + { + "type": "null" + } + ], + "description": "The approval mode to set for the MCP server" + }, + "force_pre_tool_speech": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If set, overrides the server's force_pre_tool_speech setting for this tool.", + "deprecated": true + }, + "pre_tool_speech": { + "anyOf": [ + { + "$ref": "#/components/schemas/PreToolSpeechMode" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's pre_tool_speech setting for this tool." + }, + "disable_interruptions": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Interruptions", + "description": "If set, overrides the server's disable_interruptions setting for this tool" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution for all tools from this MCP server" + }, + "tool_call_sound_behavior": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundBehavior" + }, + { + "type": "null" + } + ], + "description": "Determines when the tool call sound should play for all tools from this MCP server" + }, + "execution_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolExecutionMode" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's execution_mode setting for this tool" + }, + "response_timeout_secs": { + "anyOf": [ + { + "type": "integer", + "maximum": 300, + "minimum": 5 + }, + { + "type": "null" + } + ], + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for each MCP tool call to complete." + }, + "request_headers": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "$ref": "#/components/schemas/ConvAIDynamicVariable" + }, + { + "$ref": "#/components/schemas/ConvAIEnvVarLocator" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Request Headers", + "description": "The headers to include in requests to the MCP server" + }, + "disable_compression": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Compression", + "description": "Whether to disable HTTP compression for this MCP server" + }, + "secret_token": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "type": "null" + } + ], + "description": "Optional secret token for authentication with this MCP server" + }, + "auth_connection": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionLocator" + }, + { + "$ref": "#/components/schemas/EnvironmentAuthConnectionLocator" + }, + { + "type": "null" + } + ], + "title": "Auth Connection", + "description": "Optional auth connection to use for authentication with this MCP server" + } + }, + "type": "object", + "title": "MCPServerConfigUpdateRequestModel", + "description": "Unified request model for updating MCP Server configuration." + }, + "MCPServerMetadataResponseModel": { + "properties": { + "created_at": { + "type": "integer", + "title": "Created At" + }, + "owner_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Owner User Id" + } + }, + "type": "object", + "required": [ + "created_at" + ], + "title": "MCPServerMetadataResponseModel" + }, + "MCPServerRequestModel": { + "properties": { + "config": { + "$ref": "#/components/schemas/MCPServerConfig-Input", + "description": "Configuration details for the MCP Server." + } + }, + "type": "object", + "required": [ + "config" + ], + "title": "MCPServerRequestModel", + "description": "Request model for creating/updating an MCP Server configuration." + }, + "MCPServerResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "config": { + "$ref": "#/components/schemas/MCPServerConfig-Output" + }, + "access_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + { + "type": "null" + } + ], + "description": "The access information of the MCP Server" + }, + "dependent_agents": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DependentAvailableAgentIdentifier" + }, + { + "$ref": "#/components/schemas/DependentUnknownAgentIdentifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "available": "#/components/schemas/DependentAvailableAgentIdentifier", + "unknown": "#/components/schemas/DependentUnknownAgentIdentifier" + } + } + }, + "type": "array", + "title": "Dependent Agents", + "description": "List of agents that depend on this MCP Server." + }, + "metadata": { + "$ref": "#/components/schemas/MCPServerMetadataResponseModel", + "description": "The metadata of the MCP Server" + } + }, + "type": "object", + "required": [ + "id", + "config", + "metadata" + ], + "title": "MCPServerResponseModel", + "description": "Response model representing an MCP Server configuration." + }, + "MCPServerTransport": { + "type": "string", + "enum": [ + "SSE", + "STREAMABLE_HTTP" + ], + "title": "MCPServerTransport", + "description": "Supported MCP server transport types.", + "default": "SSE" + }, + "MCPServersResponseModel": { + "properties": { + "mcp_servers": { + "items": { + "$ref": "#/components/schemas/MCPServerResponseModel" + }, + "type": "array", + "title": "Mcp Servers" + } + }, + "type": "object", + "required": [ + "mcp_servers" + ], + "title": "MCPServersResponseModel", + "description": "Response model for a list of MCP Server configurations." + }, + "MCPToolAddApprovalRequestModel": { + "properties": { + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The name of the MCP tool" + }, + "tool_description": { + "type": "string", + "title": "Tool Description", + "description": "The description of the MCP tool" + }, + "input_schema": { + "additionalProperties": true, + "type": "object", + "title": "Input Schema", + "description": "The input schema of the MCP tool (the schema defined on the MCP server before ElevenLabs does any extra processing)" + }, + "approval_policy": { + "$ref": "#/components/schemas/MCPToolApprovalPolicy", + "description": "The tool-level approval policy", + "default": "requires_approval" + } + }, + "type": "object", + "required": [ + "tool_name", + "tool_description" + ], + "title": "MCPToolAddApprovalRequestModel", + "description": "Request model for adding approval for a single MCP tool." + }, + "MCPToolApprovalHash": { + "properties": { + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The name of the MCP tool" + }, + "tool_hash": { + "type": "string", + "title": "Tool Hash", + "description": "SHA256 hash of the tool's parameters and description" + }, + "approval_policy": { + "$ref": "#/components/schemas/MCPToolApprovalPolicy", + "description": "The approval policy for this tool", + "default": "requires_approval" + } + }, + "type": "object", + "required": [ + "tool_name", + "tool_hash" + ], + "title": "MCPToolApprovalHash", + "description": "Model for storing tool approval hashes for per-tool approval." + }, + "MCPToolApprovalPolicy": { + "type": "string", + "enum": [ + "auto_approved", + "requires_approval" + ], + "title": "MCPToolApprovalPolicy", + "description": "Defines the tool-level approval policy.", + "default": "requires_approval" + }, + "MCPToolConfig-Input": { + "properties": { + "type": { + "type": "string", + "const": "mcp", + "title": "Type", + "default": "mcp" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does." + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 300, + "minimum": 5, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the MCP tool call to complete. Must be between 5 and 300 seconds (inclusive).", + "default": 30 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "integration_type": { + "$ref": "#/components/schemas/IntegrationType", + "description": "The type of MCP tool" + }, + "parameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Input" + }, + { + "type": "null" + } + ], + "description": "Schema for any parameters the LLM needs to provide to the MCP tool." + }, + "approval_policy": { + "$ref": "#/components/schemas/MCPApprovalPolicy", + "description": "The approval policy for the MCP tool", + "default": "require_approval_all" + }, + "mcp_tool_name": { + "type": "string", + "title": "Mcp Tool Name", + "description": "The name of the MCP tool to call" + }, + "mcp_tool_description": { + "type": "string", + "title": "Mcp Tool Description", + "description": "The description of the MCP tool to call" + }, + "mcp_server_id": { + "type": "string", + "title": "Mcp Server Id", + "description": "The id of the MCP server to call" + }, + "mcp_server_name": { + "type": "string", + "title": "Mcp Server Name", + "description": "The name of the MCP server to call" + }, + "mcp_input_schema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Mcp Input Schema", + "description": "Original inputSchema dict for consistent hashing" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + }, + "input_overrides": { + "anyOf": [ + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConstantSchemaOverride" + }, + { + "$ref": "#/components/schemas/DynamicVariableSchemaOverride" + }, + { + "$ref": "#/components/schemas/LLMSchemaOverride" + } + ], + "discriminator": { + "propertyName": "source", + "mapping": { + "constant": "#/components/schemas/ConstantSchemaOverride", + "dynamic_variable": "#/components/schemas/DynamicVariableSchemaOverride", + "llm": "#/components/schemas/LLMSchemaOverride" + } + } + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Input Overrides", + "description": "Input parameter overrides for this tool" + } + }, + "type": "object", + "required": [ + "name", + "description", + "integration_type", + "mcp_tool_name", + "mcp_tool_description", + "mcp_server_id", + "mcp_server_name" + ], + "title": "MCPToolConfig", + "description": "An MCP tool configuration that can be used to call MCP servers", + "x-fern-ignore": true + }, + "MCPToolConfig-Output": { + "properties": { + "type": { + "type": "string", + "const": "mcp", + "title": "Type", + "default": "mcp" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does." + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 300, + "minimum": 5, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the MCP tool call to complete. Must be between 5 and 300 seconds (inclusive).", + "default": 30 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "integration_type": { + "$ref": "#/components/schemas/IntegrationType", + "description": "The type of MCP tool" + }, + "parameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Output" + }, + { + "type": "null" + } + ], + "description": "Schema for any parameters the LLM needs to provide to the MCP tool." + }, + "approval_policy": { + "$ref": "#/components/schemas/MCPApprovalPolicy", + "description": "The approval policy for the MCP tool", + "default": "require_approval_all" + }, + "mcp_tool_name": { + "type": "string", + "title": "Mcp Tool Name", + "description": "The name of the MCP tool to call" + }, + "mcp_tool_description": { + "type": "string", + "title": "Mcp Tool Description", + "description": "The description of the MCP tool to call" + }, + "mcp_server_id": { + "type": "string", + "title": "Mcp Server Id", + "description": "The id of the MCP server to call" + }, + "mcp_server_name": { + "type": "string", + "title": "Mcp Server Name", + "description": "The name of the MCP server to call" + }, + "mcp_input_schema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Mcp Input Schema", + "description": "Original inputSchema dict for consistent hashing" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + }, + "input_overrides": { + "anyOf": [ + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConstantSchemaOverride" + }, + { + "$ref": "#/components/schemas/DynamicVariableSchemaOverride" + }, + { + "$ref": "#/components/schemas/LLMSchemaOverride" + } + ], + "discriminator": { + "propertyName": "source", + "mapping": { + "constant": "#/components/schemas/ConstantSchemaOverride", + "dynamic_variable": "#/components/schemas/DynamicVariableSchemaOverride", + "llm": "#/components/schemas/LLMSchemaOverride" + } + } + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Input Overrides", + "description": "Input parameter overrides for this tool" + } + }, + "type": "object", + "required": [ + "name", + "description", + "integration_type", + "mcp_tool_name", + "mcp_tool_description", + "mcp_server_id", + "mcp_server_name" + ], + "title": "MCPToolConfig", + "description": "An MCP tool configuration that can be used to call MCP servers", + "x-fern-ignore": true + }, + "MCPToolConfigOverride-Input": { + "properties": { + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The name of the MCP tool" + }, + "force_pre_tool_speech": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If set, overrides the server's force_pre_tool_speech setting for this tool.", + "deprecated": true + }, + "pre_tool_speech": { + "anyOf": [ + { + "$ref": "#/components/schemas/PreToolSpeechMode" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's pre_tool_speech setting for this tool." + }, + "disable_interruptions": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Interruptions", + "description": "If set, overrides the server's disable_interruptions setting for this tool" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's tool_call_sound setting for this tool" + }, + "tool_call_sound_behavior": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundBehavior" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's tool_call_sound_behavior setting for this tool" + }, + "execution_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolExecutionMode" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's execution_mode setting for this tool" + }, + "response_timeout_secs": { + "anyOf": [ + { + "type": "integer", + "maximum": 300, + "minimum": 5 + }, + { + "type": "null" + } + ], + "title": "Response Timeout Secs", + "description": "If set, overrides the server's response timeout for this MCP tool (seconds)." + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Dynamic variable assignments for this MCP tool" + }, + "input_overrides": { + "anyOf": [ + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConstantSchemaOverride" + }, + { + "$ref": "#/components/schemas/DynamicVariableSchemaOverride" + }, + { + "$ref": "#/components/schemas/LLMSchemaOverride" + } + ], + "discriminator": { + "propertyName": "source", + "mapping": { + "constant": "#/components/schemas/ConstantSchemaOverride", + "dynamic_variable": "#/components/schemas/DynamicVariableSchemaOverride", + "llm": "#/components/schemas/LLMSchemaOverride" + } + } + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Input Overrides", + "description": "Mapping of json path to input override configuration" + }, + "response_mocks": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ToolResponseMockConfig-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Response Mocks", + "description": "Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins." + } + }, + "type": "object", + "required": [ + "tool_name" + ], + "title": "MCPToolConfigOverride" + }, + "MCPToolConfigOverride-Output": { + "properties": { + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The name of the MCP tool" + }, + "force_pre_tool_speech": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If set, overrides the server's force_pre_tool_speech setting for this tool.", + "deprecated": true + }, + "pre_tool_speech": { + "anyOf": [ + { + "$ref": "#/components/schemas/PreToolSpeechMode" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's pre_tool_speech setting for this tool." + }, + "disable_interruptions": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Interruptions", + "description": "If set, overrides the server's disable_interruptions setting for this tool" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's tool_call_sound setting for this tool" + }, + "tool_call_sound_behavior": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundBehavior" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's tool_call_sound_behavior setting for this tool" + }, + "execution_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolExecutionMode" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's execution_mode setting for this tool" + }, + "response_timeout_secs": { + "anyOf": [ + { + "type": "integer", + "maximum": 300, + "minimum": 5 + }, + { + "type": "null" + } + ], + "title": "Response Timeout Secs", + "description": "If set, overrides the server's response timeout for this MCP tool (seconds)." + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Dynamic variable assignments for this MCP tool" + }, + "input_overrides": { + "anyOf": [ + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConstantSchemaOverride" + }, + { + "$ref": "#/components/schemas/DynamicVariableSchemaOverride" + }, + { + "$ref": "#/components/schemas/LLMSchemaOverride" + } + ], + "discriminator": { + "propertyName": "source", + "mapping": { + "constant": "#/components/schemas/ConstantSchemaOverride", + "dynamic_variable": "#/components/schemas/DynamicVariableSchemaOverride", + "llm": "#/components/schemas/LLMSchemaOverride" + } + } + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Input Overrides", + "description": "Mapping of json path to input override configuration" + }, + "response_mocks": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ToolResponseMockConfig-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Response Mocks", + "description": "Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins." + } + }, + "type": "object", + "required": [ + "tool_name" + ], + "title": "MCPToolConfigOverride" + }, + "MCPToolConfigOverrideCreateRequestModel": { + "properties": { + "force_pre_tool_speech": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If set, overrides the server's force_pre_tool_speech setting for this tool.", + "deprecated": true + }, + "pre_tool_speech": { + "anyOf": [ + { + "$ref": "#/components/schemas/PreToolSpeechMode" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's pre_tool_speech setting for this tool." + }, + "disable_interruptions": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Interruptions", + "description": "If set, overrides the server's disable_interruptions setting for this tool" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's tool_call_sound setting for this tool" + }, + "tool_call_sound_behavior": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundBehavior" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's tool_call_sound_behavior setting for this tool" + }, + "execution_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolExecutionMode" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's execution_mode setting for this tool" + }, + "response_timeout_secs": { + "anyOf": [ + { + "type": "integer", + "maximum": 300, + "minimum": 5 + }, + { + "type": "null" + } + ], + "title": "Response Timeout Secs", + "description": "If set, overrides the server's response timeout for this MCP tool." + }, + "assignments": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Assignments", + "description": "Dynamic variable assignments for this MCP tool" + }, + "input_overrides": { + "anyOf": [ + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConstantSchemaOverride" + }, + { + "$ref": "#/components/schemas/DynamicVariableSchemaOverride" + }, + { + "$ref": "#/components/schemas/LLMSchemaOverride" + } + ], + "discriminator": { + "propertyName": "source", + "mapping": { + "constant": "#/components/schemas/ConstantSchemaOverride", + "dynamic_variable": "#/components/schemas/DynamicVariableSchemaOverride", + "llm": "#/components/schemas/LLMSchemaOverride" + } + } + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Input Overrides", + "description": "Mapping of json path to input override configuration" + }, + "response_mocks": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ToolResponseMockConfig-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Response Mocks", + "description": "Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins." + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The name of the MCP tool" + } + }, + "type": "object", + "required": [ + "tool_name" + ], + "title": "MCPToolConfigOverrideCreateRequestModel" + }, + "MCPToolConfigOverrideUpdateRequestModel": { + "properties": { + "force_pre_tool_speech": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If set, overrides the server's force_pre_tool_speech setting for this tool.", + "deprecated": true + }, + "pre_tool_speech": { + "anyOf": [ + { + "$ref": "#/components/schemas/PreToolSpeechMode" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's pre_tool_speech setting for this tool." + }, + "disable_interruptions": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Interruptions", + "description": "If set, overrides the server's disable_interruptions setting for this tool" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's tool_call_sound setting for this tool" + }, + "tool_call_sound_behavior": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundBehavior" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's tool_call_sound_behavior setting for this tool" + }, + "execution_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolExecutionMode" + }, + { + "type": "null" + } + ], + "description": "If set, overrides the server's execution_mode setting for this tool" + }, + "response_timeout_secs": { + "anyOf": [ + { + "type": "integer", + "maximum": 300, + "minimum": 5 + }, + { + "type": "null" + } + ], + "title": "Response Timeout Secs", + "description": "If set, overrides the server's response timeout for this MCP tool." + }, + "assignments": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Assignments", + "description": "Dynamic variable assignments for this MCP tool" + }, + "input_overrides": { + "anyOf": [ + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConstantSchemaOverride" + }, + { + "$ref": "#/components/schemas/DynamicVariableSchemaOverride" + }, + { + "$ref": "#/components/schemas/LLMSchemaOverride" + } + ], + "discriminator": { + "propertyName": "source", + "mapping": { + "constant": "#/components/schemas/ConstantSchemaOverride", + "dynamic_variable": "#/components/schemas/DynamicVariableSchemaOverride", + "llm": "#/components/schemas/LLMSchemaOverride" + } + } + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Input Overrides", + "description": "Mapping of json path to input override configuration" + }, + "response_mocks": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ToolResponseMockConfig-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Response Mocks", + "description": "Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins." + } + }, + "type": "object", + "title": "MCPToolConfigOverrideUpdateRequestModel" + }, + "MTLSAuthResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "mtls", + "title": "Auth Type", + "default": "mtls" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "name", + "provider", + "id" + ], + "title": "MTLSAuthResponse", + "description": "Response model for mTLS auth connections." + }, + "ManualSource": { + "properties": { + "type": { + "type": "string", + "const": "manual", + "title": "Type", + "default": "manual" + }, + "created_by_user_id": { + "type": "string", + "title": "Created By User Id" + }, + "notes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Notes" + } + }, + "type": "object", + "required": [ + "created_by_user_id" + ], + "title": "ManualSource" + }, + "ManualVerificationFileResponseModel": { + "properties": { + "file_id": { + "type": "string", + "title": "File Id", + "description": "The ID of the file." + }, + "file_name": { + "type": "string", + "title": "File Name", + "description": "The name of the file." + }, + "mime_type": { + "type": "string", + "title": "Mime Type", + "description": "The MIME type of the file." + }, + "size_bytes": { + "type": "integer", + "title": "Size Bytes", + "description": "The size of the file in bytes." + }, + "upload_date_unix": { + "type": "integer", + "title": "Upload Date Unix", + "description": "The date of the file in Unix time." + } + }, + "type": "object", + "required": [ + "file_id", + "file_name", + "mime_type", + "size_bytes", + "upload_date_unix" + ], + "title": "ManualVerificationFileResponseModel", + "example": { + "file_id": "CwhRBWXzGAHq8TQ4Fs18", + "file_name": "file.mp3", + "mime_type": "audio/mpeg", + "size_bytes": 1000000, + "upload_date_unix": 1714204800 + } + }, + "ManualVerificationResponseModel": { + "properties": { + "extra_text": { + "type": "string", + "title": "Extra Text", + "description": "The extra text of the manual verification." + }, + "request_time_unix": { + "type": "integer", + "title": "Request Time Unix", + "description": "The date of the manual verification in Unix time." + }, + "files": { + "items": { + "$ref": "#/components/schemas/ManualVerificationFileResponseModel" + }, + "type": "array", + "title": "Files", + "description": "The files of the manual verification." + } + }, + "type": "object", + "required": [ + "extra_text", + "request_time_unix", + "files" + ], + "title": "ManualVerificationResponseModel", + "example": { + "extra_text": "Please verify the voice is that of a female.", + "files": [ + { + "file_id": "CwhRBWXzGAHq8TQ4Fs18", + "file_name": "file.mp3", + "mime_type": "audio/mpeg", + "size_bytes": 1000000, + "upload_date_unix": 1714204800 + } + ], + "request_time_unix": 1714204800 + } + }, + "MatchAnythingParameterEvaluationStrategy": { + "properties": { + "type": { + "type": "string", + "const": "anything", + "title": "Type" + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "MatchAnythingParameterEvaluationStrategy" + }, + "MediaId": { + "type": "string", + "pattern": "^prodmedia_[a-z0-9]{26}$" + }, + "MemoryEntrySearchResult": { + "properties": { + "entry_id": { + "type": "string", + "title": "Entry Id" + }, + "version": { + "type": "integer", + "title": "Version" + }, + "summary": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Summary" + }, + "text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationSource" + }, + { + "$ref": "#/components/schemas/ManualSource" + }, + { + "type": "null" + } + ], + "title": "Source" + } + }, + "type": "object", + "required": [ + "entry_id", + "version" + ], + "title": "MemoryEntrySearchResult" + }, + "MessageSearchSortBy": { + "type": "string", + "enum": [ + "search_score", + "created_at" + ], + "title": "MessageSearchSortBy" + }, + "MessagesSearchResponse": { + "properties": { + "meta": { + "$ref": "#/components/schemas/ListResponseMeta", + "default": {} + }, + "results": { + "items": { + "$ref": "#/components/schemas/MessagesSearchResult" + }, + "type": "array", + "title": "Results" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor", + "description": "Cursor for the next page of results" + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Whether there are more results available" + } + }, + "type": "object", + "required": [ + "results", + "has_more" + ], + "title": "MessagesSearchResponse" + }, + "MessagesSearchResult": { + "properties": { + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "agent_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Name" + }, + "transcript_index": { + "type": "integer", + "title": "Transcript Index" + }, + "chunk_text": { + "type": "string", + "title": "Chunk Text" + }, + "score": { + "type": "number", + "title": "Score" + }, + "conversation_start_time_unix_secs": { + "type": "integer", + "title": "Conversation Start Time Unix Secs" + } + }, + "type": "object", + "required": [ + "conversation_id", + "agent_id", + "transcript_index", + "chunk_text", + "score", + "conversation_start_time_unix_secs" + ], + "title": "MessagesSearchResult", + "description": "transcript_index: index of the message in the conversation transcript\nchunk_text: text of the transcript; transcript messages if very long could have several chunks.\nscore: similarity score of the message to the search query" + }, + "MetricRecord": { + "properties": { + "elapsed_time": { + "type": "number", + "title": "Elapsed Time" + } + }, + "type": "object", + "required": [ + "elapsed_time" + ], + "title": "MetricRecord" + }, + "MetricType": { + "type": "string", + "enum": [ + "credits", + "tts_characters", + "minutes_used", + "request_count", + "ttfb_avg", + "ttfb_p95", + "fiat_units_spent", + "concurrency", + "concurrency_average" + ], + "title": "MetricType" + }, + "MockNoMatchBehavior": { + "type": "string", + "enum": [ + "call_real_tool", + "raise_error" + ], + "title": "MockNoMatchBehavior", + "default": "raise_error" + }, + "MockingStrategy": { + "type": "string", + "enum": [ + "all", + "selected", + "none" + ], + "title": "MockingStrategy", + "default": "none" + }, + "ModelRatesResponseModel": { + "properties": { + "character_cost_multiplier": { + "type": "number", + "title": "Character Cost Multiplier", + "description": "The cost multiplier for characters." + }, + "cost_discount_multiplier": { + "type": "number", + "title": "Cost Discount Multiplier", + "description": "Discount multiplier applied to cost estimates. Defaults to 1.0 (no discount).", + "default": 1 + } + }, + "type": "object", + "required": [ + "character_cost_multiplier" + ], + "title": "ModelRatesResponseModel", + "example": { + "character_cost_multiplier": 1, + "cost_discount_multiplier": 1 + } + }, + "ModelResponseModel": { + "properties": { + "model_id": { + "type": "string", + "title": "Model Id", + "description": "The unique identifier of the model." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the model." + }, + "can_be_finetuned": { + "type": "boolean", + "title": "Can Be Finetuned", + "description": "Whether the model can be finetuned." + }, + "can_do_text_to_speech": { + "type": "boolean", + "title": "Can Do Text To Speech", + "description": "Whether the model can do text-to-speech." + }, + "can_do_voice_conversion": { + "type": "boolean", + "title": "Can Do Voice Conversion", + "description": "Whether the model can do voice conversion." + }, + "can_use_style": { + "type": "boolean", + "title": "Can Use Style", + "description": "Whether the model can use style." + }, + "can_use_speaker_boost": { + "type": "boolean", + "title": "Can Use Speaker Boost", + "description": "Whether the model can use speaker boost." + }, + "serves_pro_voices": { + "type": "boolean", + "title": "Serves Pro Voices", + "description": "Whether the model serves pro voices." + }, + "token_cost_factor": { + "type": "number", + "title": "Token Cost Factor", + "description": "The cost factor for the model." + }, + "description": { + "type": "string", + "title": "Description", + "description": "The description of the model." + }, + "requires_alpha_access": { + "type": "boolean", + "title": "Requires Alpha Access", + "description": "Whether the model requires alpha access." + }, + "max_characters_request_free_user": { + "type": "integer", + "title": "Max Characters Request Free User", + "description": "The maximum number of characters that can be requested by a free user." + }, + "max_characters_request_subscribed_user": { + "type": "integer", + "title": "Max Characters Request Subscribed User", + "description": "The maximum number of characters that can be requested by a subscribed user." + }, + "maximum_text_length_per_request": { + "type": "integer", + "title": "Maximum Text Length Per Request", + "description": "The maximum length of text that can be requested for this model." + }, + "languages": { + "items": { + "$ref": "#/components/schemas/LanguageResponseModel" + }, + "type": "array", + "title": "Languages", + "description": "The languages supported by the model." + }, + "model_rates": { + "$ref": "#/components/schemas/ModelRatesResponseModel", + "description": "The rates for the model." + }, + "concurrency_group": { + "type": "string", + "title": "Concurrency Group", + "description": "The concurrency group for the model." + } + }, + "type": "object", + "required": [ + "model_id", + "name", + "can_be_finetuned", + "can_do_text_to_speech", + "can_do_voice_conversion", + "can_use_style", + "can_use_speaker_boost", + "serves_pro_voices", + "token_cost_factor", + "description", + "requires_alpha_access", + "max_characters_request_free_user", + "max_characters_request_subscribed_user", + "maximum_text_length_per_request", + "languages", + "model_rates", + "concurrency_group" + ], + "title": "ModelResponseModel", + "example": { + "can_be_finetuned": true, + "can_do_text_to_speech": true, + "can_do_voice_conversion": true, + "can_use_speaker_boost": true, + "can_use_style": true, + "concurrency_group": "standard_eleven_multilingual_v2", + "description": "Our state of the art multilingual speech synthesis model, able to generate life-like speech in 29 languages.", + "languages": [ + { + "language_id": "en", + "name": "English" + } + ], + "max_characters_request_free_user": 2500, + "max_characters_request_subscribed_user": 5000, + "maximum_text_length_per_request": 1000000, + "model_id": "eleven_multilingual_v2", + "model_rates": { + "character_cost_multiplier": 1, + "cost_discount_multiplier": 1 + }, + "name": "Eleven Multilingual v2", + "requires_alpha_access": false, + "serves_pro_voices": false, + "token_cost_factor": 1 + } + }, + "ModelSettingsResponseModel": { + "properties": { + "stability": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Stability", + "description": "Determines how stable the voice is and the randomness between each generation. Lower values introduce broader emotional range for the voice. Higher values can result in a monotonous voice with limited emotion.", + "default": 0.5 + } + }, + "type": "object", + "title": "ModelSettingsResponseModel", + "example": { + "stability": 0.5 + } + }, + "ModerationConfig": { + "properties": { + "sexual": { + "$ref": "#/components/schemas/ThresholdGuardrail" + }, + "violence": { + "$ref": "#/components/schemas/ThresholdGuardrail" + }, + "violence_graphic": { + "$ref": "#/components/schemas/ThresholdGuardrail" + }, + "harassment": { + "$ref": "#/components/schemas/ThresholdGuardrail" + }, + "harassment_threatening": { + "$ref": "#/components/schemas/ThresholdGuardrail" + }, + "hate": { + "$ref": "#/components/schemas/ThresholdGuardrail" + }, + "hate_threatening": { + "$ref": "#/components/schemas/ThresholdGuardrail" + }, + "self_harm_instructions": { + "$ref": "#/components/schemas/ThresholdGuardrail" + }, + "self_harm": { + "$ref": "#/components/schemas/ThresholdGuardrail" + }, + "self_harm_intent": { + "$ref": "#/components/schemas/ThresholdGuardrail" + }, + "sexual_minors": { + "$ref": "#/components/schemas/ThresholdGuardrail" + } + }, + "type": "object", + "title": "ModerationConfig" + }, + "ModerationGuardrail-Input": { + "properties": { + "execution_mode": { + "$ref": "#/components/schemas/GuardrailExecutionMode", + "default": "streaming" + }, + "config": { + "$ref": "#/components/schemas/ModerationConfig" + } + }, + "type": "object", + "title": "ModerationGuardrail" + }, + "ModerationGuardrail-Output": { + "properties": { + "execution_mode": { + "$ref": "#/components/schemas/GuardrailExecutionMode", + "default": "streaming" + }, + "config": { + "$ref": "#/components/schemas/ModerationConfig" + } + }, + "type": "object", + "title": "ModerationGuardrail" + }, + "Monitor": { + "type": "string", + "enum": [ + "elevated_conversation_failure_rate", + "elevated_tool_failure_rate" + ], + "title": "Monitor" + }, + "MultichannelSpeechToTextResponseModel": { + "properties": { + "transcripts": { + "items": { + "$ref": "#/components/schemas/SpeechToTextChunkResponseModel" + }, + "type": "array", + "title": "Transcripts", + "description": "List of transcripts, one for each audio channel. Each transcript contains the text and word-level details for its respective channel." + }, + "transcription_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Transcription Id", + "description": "The transcription ID of the response." + }, + "audio_duration_secs": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Audio Duration Secs", + "description": "The duration of the audio that was transcribed across all channels in seconds." + } + }, + "type": "object", + "required": [ + "transcripts" + ], + "title": "MultichannelSpeechToTextResponseModel", + "description": "Response model for multichannel speech-to-text transcription.", + "example": { + "transcripts": [ + { + "language_code": "en", + "language_probability": 0.98, + "text": "Hello from channel one.", + "words": [ + { + "end": 0.5, + "logprob": -0.124, + "speaker_id": "speaker_0", + "start": 0, + "text": "Hello", + "type": "word" + }, + { + "end": 0.5, + "logprob": 0, + "speaker_id": "speaker_0", + "start": 0.5, + "text": " ", + "type": "spacing" + }, + { + "end": 0.8, + "logprob": -0.089, + "speaker_id": "speaker_0", + "start": 0.5, + "text": "from", + "type": "word" + } + ] + }, + { + "language_code": "en", + "language_probability": 0.97, + "text": "Greetings from channel two.", + "words": [ + { + "end": 0.7, + "logprob": -0.156, + "speaker_id": "speaker_1", + "start": 0.1, + "text": "Greetings", + "type": "word" + }, + { + "end": 0.7, + "logprob": 0, + "speaker_id": "speaker_1", + "start": 0.7, + "text": " ", + "type": "spacing" + }, + { + "end": 1, + "logprob": -0.078, + "speaker_id": "speaker_1", + "start": 0.7, + "text": "from", + "type": "word" + } + ] + } + ] + } + }, + "MultipartMusicResponse": { + "properties": { + "metadata": { + "$ref": "#/components/schemas/DetailedMusicResponse", + "description": "JSON metadata about the generated audio" + }, + "audio": { + "type": "string", + "format": "binary", + "title": "Audio", + "description": "Binary audio data in the requested format" + } + }, + "type": "object", + "required": [ + "metadata", + "audio" + ], + "title": "MultipartMusicResponse", + "description": "Multipart response structure with JSON metadata and binary audio", + "example": { + "audio": "[binary audio data]", + "metadata": { + "composition_plan": { + "negative_global_styles": [ + "metal", + "hip-hop", + "country" + ], + "positive_global_styles": [ + "pop", + "rock", + "jazz" + ], + "sections": [ + { + "duration_ms": 10000, + "lines": [ + "Verse 1 lyrics" + ], + "negative_local_styles": [ + "metal", + "hip-hop", + "country" + ], + "positive_local_styles": [ + "pop", + "rock", + "jazz" + ], + "section_name": "Verse 1" + } + ] + }, + "song_metadata": { + "description": "My Song Description", + "genres": [ + "pop", + "rock", + "jazz" + ], + "is_explicit": false, + "languages": [ + "en", + "fr" + ], + "title": "My Song" + }, + "words_timestamps": [ + { + "end_ms": 1000, + "start_ms": 0, + "word": "Verse" + }, + { + "end_ms": 2000, + "start_ms": 1000, + "word": "1" + }, + { + "end_ms": 3000, + "start_ms": 2000, + "word": "lyrics" + } + ] + } + } + }, + "MusicExploreSongSourceContext": { + "properties": { + "source_type": { + "type": "string", + "const": "music_explore_song", + "title": "Source Type", + "default": "music_explore_song" + }, + "music_explore_song_id": { + "type": "string", + "title": "Music Explore Song Id" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "bpm": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Bpm" + }, + "vocals": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Vocals" + }, + "lyrics": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Lyrics" + } + }, + "type": "object", + "required": [ + "music_explore_song_id" + ], + "title": "MusicExploreSongSourceContext" + }, + "MusicGenerationMode": { + "type": "string", + "enum": [ + "track", + "loop", + "ambience" + ], + "title": "MusicGenerationMode" + }, + "MusicPrompt": { + "properties": { + "positive_global_styles": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 50, + "title": "Positive Global Styles", + "description": "The styles and musical directions that should be present in the entire song. Use English language for best result." + }, + "negative_global_styles": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 50, + "title": "Negative Global Styles", + "description": "The styles and musical directions that should not be present in the entire song. Use English language for best result." + }, + "sections": { + "items": { + "$ref": "#/components/schemas/SongSection" + }, + "type": "array", + "maxItems": 30, + "title": "Sections", + "description": "The sections of the song." + } + }, + "type": "object", + "required": [ + "positive_global_styles", + "negative_global_styles", + "sections" + ], + "title": "MusicPrompt", + "example": { + "negative_global_styles": [ + "metal", + "hip-hop", + "country" + ], + "positive_global_styles": [ + "pop", + "rock", + "jazz" + ], + "sections": [ + { + "duration_ms": 10000, + "lines": [ + "Verse 1 lyrics" + ], + "negative_local_styles": [ + "metal", + "hip-hop", + "country" + ], + "positive_local_styles": [ + "pop", + "rock", + "jazz" + ], + "section_name": "Verse 1" + } + ] + } + }, + "MusicUploadResponse": { + "properties": { + "song_id": { + "type": "string", + "title": "Song Id", + "description": "Unique identifier for the uploaded song" + }, + "composition_plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/MusicPrompt" + }, + { + "type": "null" + } + ], + "description": "The composition plan extracted from the uploaded song. Only present if `extract_composition_plan` was True in the request body" + } + }, + "type": "object", + "required": [ + "song_id" + ], + "title": "MusicUploadResponse", + "description": "Response model for music upload endpoint.", + "example": { + "song_id": "jR4Xz8kL2mNpQ9wVtY1b" + } + }, + "NoCoachingSettings": { + "properties": { + "type": { + "type": "string", + "const": "none", + "title": "Type", + "default": "none" + }, + "memory_base_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Memory Base Id" + } + }, + "type": "object", + "title": "NoCoachingSettings" + }, + "NonStreamingOutputFormats": { + "type": "string", + "enum": [ + "wav_8000", + "wav_16000", + "wav_22050", + "wav_24000", + "wav_32000", + "wav_44100", + "wav_48000" + ] + }, + "OAuth2ClientCredsResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "oauth2_client_credentials", + "title": "Auth Type", + "default": "oauth2_client_credentials" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "client_id": { + "type": "string", + "title": "Client Id" + }, + "token_url": { + "type": "string", + "title": "Token Url" + }, + "scopes": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Scopes", + "default": [] + }, + "extra_params": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Extra Params", + "default": {} + }, + "basic_auth_in_header": { + "type": "boolean", + "title": "Basic Auth In Header", + "description": "If True, send client credentials in Authorization header as Basic Auth instead of request body", + "default": false + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + }, + "custom_headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Custom Headers", + "description": "Custom headers configured for OAuth2 token requests" + } + }, + "type": "object", + "required": [ + "name", + "provider", + "client_id", + "token_url", + "id" + ], + "title": "OAuth2ClientCredsResponse", + "description": "Response model for oauth2 client creds" + }, + "OAuth2JWTResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "oauth2_jwt", + "title": "Auth Type", + "default": "oauth2_jwt" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "algorithm": { + "type": "string", + "enum": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512" + ], + "title": "Algorithm", + "description": "JWT signing algorithm", + "default": "HS256" + }, + "key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Key Id", + "description": "Key ID (kid) for JWT header - useful for key rotation" + }, + "issuer": { + "type": "string", + "title": "Issuer", + "description": "JWT issuer (iss claim)" + }, + "audience": { + "type": "string", + "title": "Audience", + "description": "JWT audience (aud claim)" + }, + "subject": { + "type": "string", + "title": "Subject", + "description": "JWT subject (sub claim)" + }, + "expiration_seconds": { + "type": "integer", + "maximum": 86400, + "minimum": 60, + "title": "Expiration Seconds", + "description": "Token expiration time in seconds", + "default": 3600 + }, + "extra_params": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Extra Params", + "description": "Additional custom claims to include in the JWT" + }, + "token_url": { + "type": "string", + "title": "Token Url", + "description": "Token endpoint URL for exchanging JWT for access token" + }, + "scopes": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Scopes", + "description": "OAuth2 scopes to request when exchanging JWT for access token" + }, + "token_response_field": { + "type": "string", + "enum": [ + "access_token", + "id_token" + ], + "title": "Token Response Field", + "description": "Token field to extract from the token endpoint response.", + "default": "access_token" + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "name", + "provider", + "issuer", + "audience", + "subject", + "token_url", + "id" + ], + "title": "OAuth2JWTResponse", + "description": "Response model for OAuth2 JWT auth connections" + }, + "OAuthConnectionStatus": { + "type": "string", + "enum": [ + "active", + "refresh_failed", + "revoked" + ], + "title": "OAuthConnectionStatus", + "default": "active" + }, + "ObjectJsonSchemaProperty-Input": { + "properties": { + "type": { + "type": "string", + "const": "object", + "title": "Type", + "default": "object" + }, + "required": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Required" + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + }, + "properties": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/LiteralJsonSchemaProperty" + }, + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Input" + }, + { + "$ref": "#/components/schemas/ArrayJsonSchemaProperty-Input" + } + ] + }, + "type": "object", + "title": "Properties" + }, + "required_constraints": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequiredConstraints" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "type": "object", + "title": "ObjectJsonSchemaProperty" + }, + "ObjectJsonSchemaProperty-Output": { + "properties": { + "type": { + "type": "string", + "const": "object", + "title": "Type", + "default": "object" + }, + "required": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Required" + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + }, + "properties": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/LiteralJsonSchemaProperty" + }, + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Output" + }, + { + "$ref": "#/components/schemas/ArrayJsonSchemaProperty-Output" + } + ] + }, + "type": "object", + "title": "Properties" + }, + "required_constraints": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequiredConstraints" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "type": "object", + "title": "ObjectJsonSchemaProperty" + }, + "OrbAvatar": { + "properties": { + "type": { + "type": "string", + "const": "orb", + "title": "Type", + "description": "The type of the avatar", + "default": "orb" + }, + "color_1": { + "type": "string", + "title": "Color 1", + "description": "The first color of the avatar", + "default": "#2792dc" + }, + "color_2": { + "type": "string", + "title": "Color 2", + "description": "The second color of the avatar", + "default": "#9ce6e6" + } + }, + "type": "object", + "title": "OrbAvatar", + "example": { + "color_1": "#2792dc", + "color_2": "#9ce6e6", + "type": "orb" + } + }, + "OrchestratorToolMockBehaviorConfig": { + "properties": { + "mocking_strategy": { + "$ref": "#/components/schemas/MockingStrategy", + "description": "Which tools to mock: 'all' mocks every mockable tool, 'selected' mocks only those in mocked_tool_names/mocked_tool_ids, 'none' disables mocking.", + "default": "none" + }, + "fallback_strategy": { + "$ref": "#/components/schemas/MockNoMatchBehavior", + "description": "Behavior when no mock matches a tool call.", + "default": "raise_error" + }, + "mocked_tool_names": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Mocked Tool Names", + "description": "Tool names to mock. Only used when mocking_strategy is 'selected'." + } + }, + "type": "object", + "title": "OrchestratorToolMockBehaviorConfig", + "description": "Orchestrator-side config: tools are identified by resolved names." + }, + "OrderDeliverablesResponse": { + "properties": { + "deliverables": { + "items": { + "$ref": "#/components/schemas/DeliverableInfo" + }, + "type": "array", + "title": "Deliverables", + "description": "The list of delivered files for the order. Empty if the order is not yet completed." + } + }, + "type": "object", + "required": [ + "deliverables" + ], + "title": "OrderDeliverablesResponse", + "example": { + "deliverables": [ + { + "content_type": "video/mp4", + "name": "output_fr.mp4", + "signed_url": "https://storage.googleapis.com/example-bucket/deliverables/output_fr.mp4?X-Goog-Signature=...", + "version": 1 + } + ] + } + }, + "OrderId": { + "type": "string", + "pattern": "^prodorder_[a-z0-9]{26}$" + }, + "OrderItemInfo": { + "properties": { + "item_id": { + "$ref": "#/components/schemas/ItemId", + "description": "The ID of the order item." + }, + "item": { + "$ref": "#/components/schemas/OrderItemRequest-Output", + "description": "The item configuration details." + }, + "quote": { + "anyOf": [ + { + "$ref": "#/components/schemas/QuoteInfo" + }, + { + "type": "null" + } + ], + "description": "The quoted price for this item." + } + }, + "type": "object", + "required": [ + "item_id", + "item" + ], + "title": "OrderItemInfo", + "example": { + "item": { + "captions_sdh": false, + "destination_languages": [ + "hi", + "fr-FR", + "de" + ], + "include_captions": true, + "include_source_captions": false, + "instructions": "Voices don't need to match the originals, prioritize native-sounding voices", + "kind": "dub", + "media_id": "prodmedia_01jgatk6h0fwxrtbjade61yqhx", + "source_language": "en" + }, + "item_id": "proditem_01jgd3qhejfs7rm6swknz2ytjb", + "quote": { + "amount_usd": 11 + } + } + }, + "OrderItemKind": { + "type": "string", + "enum": [ + "dub", + "subtitles" + ], + "title": "OrderItemKind" + }, + "OrderItemRequest-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/DubOrderItemRequest" + }, + { + "$ref": "#/components/schemas/SubtitleOrderItemRequest" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "dub": "#/components/schemas/DubOrderItemRequest", + "subtitles": "#/components/schemas/SubtitleOrderItemRequest" + } + } + }, + "OrderItemRequest-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/DubOrderItemRequest" + }, + { + "$ref": "#/components/schemas/SubtitleOrderItemRequest" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "dub": "#/components/schemas/DubOrderItemRequest", + "subtitles": "#/components/schemas/SubtitleOrderItemRequest" + } + } + }, + "OrderMediaResponse": { + "properties": { + "media_id": { + "$ref": "#/components/schemas/MediaId", + "description": "The ID of the media file." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The original filename of the uploaded media." + }, + "content_type": { + "type": "string", + "title": "Content Type", + "description": "The MIME type of the media file (e.g. 'video/mp4')." + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "The detected or declared language of the media, if available." + }, + "signed_url": { + "type": "string", + "title": "Signed Url", + "description": "A time-limited URL to download the media file." + } + }, + "type": "object", + "required": [ + "media_id", + "name", + "content_type", + "signed_url" + ], + "title": "OrderMediaResponse", + "example": { + "content_type": "video/mp4", + "language": "en", + "media_id": "prodmedia_01jgb2zd68f8f9tfvbb968wb8z", + "name": "example.mp4", + "signed_url": "https://storage.googleapis.com/example-bucket/media/example.mp4?X-Goog-Signature=..." + } + }, + "OrderRequestState": { + "type": "string", + "enum": [ + "open", + "submitted", + "paid", + "accepted", + "rejected", + "done" + ], + "title": "OrderRequestState" + }, + "OrderResponse": { + "properties": { + "order_id": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the order." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The display name of the order." + }, + "state": { + "$ref": "#/components/schemas/OrderState", + "description": "The current state of the order." + }, + "items": { + "items": { + "$ref": "#/components/schemas/OrderItemInfo" + }, + "type": "array", + "title": "Items", + "description": "The list of items in this order with their quotes." + }, + "total_amount_usd": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Total Amount Usd", + "description": "The total price for all items in USD. Excluded from response until quotes are available." + }, + "sandbox": { + "type": "boolean", + "title": "Sandbox", + "description": "Whether this is a sandbox order that auto-progresses without producer intervention.", + "default": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At", + "description": "The timestamp when the order was created." + }, + "submitted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Submitted At", + "description": "The timestamp when the order was submitted, if applicable." + }, + "paid_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Paid At", + "description": "The timestamp when payment was received, if applicable." + }, + "accepted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Accepted At", + "description": "The timestamp when the order was accepted for production, if applicable." + }, + "completed_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Completed At", + "description": "The timestamp when the order was completed, if applicable." + } + }, + "type": "object", + "required": [ + "order_id", + "name", + "state", + "items", + "created_at" + ], + "title": "OrderResponse", + "example": { + "created_at": "2025-03-15T10:00:00Z", + "items": [ + { + "item": { + "captions_sdh": false, + "destination_languages": [ + "hi", + "fr-FR", + "de" + ], + "include_captions": true, + "include_source_captions": false, + "instructions": "Voices don't need to match the originals, prioritize native-sounding voices", + "kind": "dub", + "media_id": "prodmedia_01jgb2zd68f8f9tfvbb968wb8z", + "source_language": "en" + }, + "item_id": "proditem_01jgd3qhejfs7rm6swknz2ytjb", + "quote": { + "amount_usd": 11 + } + } + ], + "name": "Spanish Dubs", + "order_id": "prodorder_01jgatk6h0fwxrtbjade61yqhx", + "sandbox": false, + "state": "open", + "total_amount_usd": 11 + } + }, + "OrderState": { + "type": "string", + "enum": [ + "open", + "submitted", + "paid", + "accepted", + "rejected", + "done" + ], + "title": "OrderState" + }, + "OrderSummary": { + "properties": { + "order_id": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the order." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The display name of the order." + }, + "state": { + "$ref": "#/components/schemas/OrderState", + "description": "The current state of the order." + }, + "total_amount_usd": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Total Amount Usd", + "description": "The total price for all items in USD. Excluded from response until quotes are available." + }, + "sandbox": { + "type": "boolean", + "title": "Sandbox", + "description": "Whether this is a sandbox order that auto-progresses without producer intervention.", + "default": false + }, + "submitted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Submitted At", + "description": "The timestamp when the order was submitted, if applicable." + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At", + "description": "The timestamp when the order was last modified, if applicable." + } + }, + "type": "object", + "required": [ + "order_id", + "name", + "state" + ], + "title": "OrderSummary", + "example": { + "name": "Spanish Dubs", + "order_id": "prodorder_01jgatk6h0fwxrtbjade61yqhx", + "sandbox": false, + "state": "submitted", + "submitted_at": "2025-03-15T10:30:00Z", + "total_amount_usd": 11, + "updated_at": "2025-03-15T10:30:00Z" + } + }, + "OutboundCallRecipient": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "phone_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Phone Number" + }, + "whatsapp_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Whatsapp User Id" + }, + "conversation_initiation_client_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataRequest-Input" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "OutboundCallRecipient" + }, + "OutboundCallRecipientResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "phone_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Phone Number" + }, + "whatsapp_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Whatsapp User Id" + }, + "status": { + "$ref": "#/components/schemas/BatchCallRecipientStatus" + }, + "created_at_unix": { + "type": "integer", + "title": "Created At Unix" + }, + "updated_at_unix": { + "type": "integer", + "title": "Updated At Unix" + }, + "conversation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Conversation Id" + }, + "conversation_initiation_client_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataInternal" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "id", + "status", + "created_at_unix", + "updated_at_unix", + "conversation_id" + ], + "title": "OutboundCallRecipientResponseModel" + }, + "OutboundSIPTrunkConfigRequestModel": { + "properties": { + "address": { + "type": "string", + "title": "Address", + "description": "Hostname or IP the SIP INVITE is sent to." + }, + "transport": { + "$ref": "#/components/schemas/SIPTrunkTransportEnum", + "description": "Protocol to use for SIP transport (signalling layer).", + "default": "auto" + }, + "media_encryption": { + "$ref": "#/components/schemas/SIPMediaEncryptionEnum", + "description": "Whether or not to encrypt media (data layer).", + "default": "allowed" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Headers", + "description": "SIP X-* headers for INVITE request. These headers are sent as-is and may help identify this call." + }, + "attributes_to_headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Attributes To Headers", + "description": "Map of dynamic variable name to header name for attributes_to_headers" + }, + "credentials": { + "anyOf": [ + { + "$ref": "#/components/schemas/SIPTrunkCredentialsRequestModel" + }, + { + "type": "null" + } + ], + "description": "Optional digest authentication credentials (username/password). If not provided, ACL authentication is assumed." + } + }, + "type": "object", + "required": [ + "address" + ], + "title": "OutboundSIPTrunkConfigRequestModel" + }, + "OutputFormat": { + "type": "string", + "enum": [ + "plain_text", + "markdown" + ], + "title": "OutputFormat" + }, + "PairedLanguagesResponse": { + "properties": { + "kind": { + "type": "string", + "const": "pair", + "title": "Kind", + "description": "Indicates this response contains source-to-destination language pairs.", + "default": "pair" + }, + "language_pairs": { + "items": { + "$ref": "#/components/schemas/LanguagePairInfo" + }, + "type": "array", + "title": "Language Pairs", + "description": "The list of available source-to-destination language mappings." + } + }, + "type": "object", + "required": [ + "language_pairs" + ], + "title": "PairedLanguagesResponse", + "example": { + "kind": "pair", + "language_pairs": [ + { + "destination_languages": [ + { + "code": "es", + "label": "Spanish" + }, + { + "code": "es-ES", + "label": "Spanish (Spain)" + }, + { + "code": "fr", + "label": "French" + } + ], + "source_language": { + "code": "en", + "label": "English" + } + }, + { + "destination_languages": [ + { + "code": "en", + "label": "English" + } + ], + "source_language": { + "code": "es-ES", + "label": "Spanish (Spain)" + } + } + ] + } + }, + "PatchConvAIDashboardSettingsRequest": { + "properties": { + "charts": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/DashboardCallSuccessChartModel" + }, + { + "$ref": "#/components/schemas/DashboardCriteriaChartModel" + }, + { + "$ref": "#/components/schemas/DashboardDataCollectionChartModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "call_success": "#/components/schemas/DashboardCallSuccessChartModel", + "criteria": "#/components/schemas/DashboardCriteriaChartModel", + "data_collection": "#/components/schemas/DashboardDataCollectionChartModel" + } + } + }, + "type": "array", + "maxItems": 4, + "title": "Charts" + } + }, + "type": "object", + "title": "PatchConvAIDashboardSettingsRequest" + }, + "PatchConvAISettingsRequest": { + "properties": { + "conversation_initiation_client_data_webhook": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInitiationClientDataWebhook" + }, + { + "type": "null" + } + ] + }, + "webhooks": { + "$ref": "#/components/schemas/ConvAIWebhooks" + }, + "can_use_mcp_servers": { + "type": "boolean", + "title": "Can Use Mcp Servers", + "description": "Whether the workspace can use MCP servers", + "default": false + }, + "rag_retention_period_days": { + "type": "integer", + "maximum": 30, + "exclusiveMinimum": 0, + "title": "Rag Retention Period Days", + "default": 10 + }, + "conversation_embedding_retention_days": { + "anyOf": [ + { + "type": "integer", + "maximum": 365, + "exclusiveMinimum": 0 + }, + { + "type": "null" + } + ], + "title": "Conversation Embedding Retention Days", + "description": "Days to retain conversation embeddings. None means use the system default (30 days)." + }, + "default_livekit_stack": { + "$ref": "#/components/schemas/LivekitStackType", + "default": "standard" + } + }, + "type": "object", + "title": "PatchConvAISettingsRequest" + }, + "PatchConversationTagRequestModel": { + "properties": { + "title": { + "anyOf": [ + { + "type": "string", + "maxLength": 120, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "If provided, replaces the tag title. Omit to leave unchanged." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 1000 + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "If provided, replaces the tag description. Omit to leave unchanged." + } + }, + "type": "object", + "title": "PatchConversationTagRequestModel" + }, + "PatchWorkspaceSecretRequest": { + "properties": { + "type": { + "type": "string", + "const": "update", + "title": "Type" + }, + "name": { + "type": "string", + "title": "Name" + }, + "value": { + "type": "string", + "title": "Value" + } + }, + "type": "object", + "required": [ + "type", + "name", + "value" + ], + "title": "PatchWorkspaceSecretRequest" + }, + "PatchWorkspaceWebhookResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the workspace webhook patch request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "PatchWorkspaceWebhookResponseModel", + "example": { + "status": "ok" + } + }, + "PdfExportOptions": { + "properties": { + "include_speakers": { + "type": "boolean", + "title": "Include Speakers", + "default": true + }, + "include_timestamps": { + "type": "boolean", + "title": "Include Timestamps", + "default": true + }, + "format": { + "type": "string", + "const": "pdf", + "title": "Format" + }, + "segment_on_silence_longer_than_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Segment On Silence Longer Than S" + }, + "max_segment_duration_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Segment Duration S" + }, + "max_segment_chars": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Segment Chars" + } + }, + "type": "object", + "required": [ + "format" + ], + "title": "PdfExportOptions" + }, + "PendingBlocksMetadataModel": { + "properties": { + "target_global_offset_ms": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Target Global Offset Ms" + }, + "block_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Block Ids" + } + }, + "type": "object", + "required": [ + "target_global_offset_ms", + "block_ids" + ], + "title": "PendingBlocksMetadataModel" + }, + "PendingCancellationResponseModel": { + "properties": { + "kind": { + "type": "string", + "const": "cancellation", + "title": "Kind", + "default": "cancellation" + }, + "timestamp_seconds": { + "type": "integer", + "title": "Timestamp Seconds", + "description": "The timestamp of the cancellation." + } + }, + "type": "object", + "required": [ + "timestamp_seconds" + ], + "title": "PendingCancellationResponseModel" + }, + "PendingClipTask": { + "properties": { + "type": { + "type": "string", + "enum": [ + "preprocessing", + "speech_import", + "dubbing", + "video_to_music", + "media_generation" + ], + "title": "Type" + }, + "progress": { + "type": "number", + "title": "Progress", + "default": 0 + }, + "started_at_ms": { + "type": "integer", + "title": "Started At Ms" + }, + "updated_at_ms": { + "type": "integer", + "title": "Updated At Ms" + }, + "metadata": { + "additionalProperties": true, + "type": "object", + "title": "Metadata" + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "PendingClipTask" + }, + "PendingExternalAudiosMetadataModel": { + "properties": { + "target_global_offset_ms": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Target Global Offset Ms" + }, + "external_audio_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "External Audio Ids" + } + }, + "type": "object", + "required": [ + "target_global_offset_ms", + "external_audio_ids" + ], + "title": "PendingExternalAudiosMetadataModel" + }, + "PendingSubscriptionSwitchResponseModel": { + "properties": { + "kind": { + "type": "string", + "const": "change", + "title": "Kind", + "default": "change" + }, + "next_tier": { + "type": "string", + "enum": [ + "free", + "starter", + "creator", + "pro", + "growing_business", + "scale_2024_08_10", + "grant_tier_1_2025_07_23", + "grant_tier_2_2025_07_23", + "trial", + "enterprise" + ], + "title": "Next Tier", + "description": "The tier to change to." + }, + "next_billing_period": { + "$ref": "#/components/schemas/BillingPeriod", + "description": "The billing period to change to." + }, + "timestamp_seconds": { + "type": "integer", + "title": "Timestamp Seconds", + "description": "The timestamp of the change." + } + }, + "type": "object", + "required": [ + "next_tier", + "next_billing_period", + "timestamp_seconds" + ], + "title": "PendingSubscriptionSwitchResponseModel" + }, + "PermissionType": { + "type": "string", + "enum": [ + "text_to_speech", + "speech_to_speech", + "speech_to_text", + "models_read", + "models_write", + "voices_read", + "voices_write", + "speech_history_read", + "speech_history_write", + "sound_generation", + "audio_isolation", + "voice_generation", + "dubbing_read", + "dubbing_write", + "pronunciation_dictionaries_read", + "pronunciation_dictionaries_write", + "user_read", + "user_write", + "projects_read", + "projects_write", + "audio_native_read", + "audio_native_write", + "workspace_read", + "workspace_write", + "forced_alignment", + "convai_read", + "convai_write", + "music_generation", + "image_video_generation", + "add_voice_from_voice_library", + "create_instant_voice_clone", + "create_professional_voice_clone", + "publish_voice_to_voice_library", + "share_voice_externally", + "create_user_api_key", + "workspace_analytics_full_read", + "webhooks_write", + "service_account_write", + "group_members_manage", + "workspace_members_read", + "workspace_members_invite", + "workspace_members_remove", + "terms_of_service_accept", + "audit_log_read", + "copy_resources_cross_workspace" + ], + "title": "PermissionType" + }, + "PhoneNumberAgentInfo": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "The ID of the agent" + }, + "agent_name": { + "type": "string", + "title": "Agent Name", + "description": "The name of the agent" + }, + "environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment", + "description": "Environment to use for resolving environment variables on calls to this number." + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id", + "description": "Agent branch to use for calls to this number." + } + }, + "type": "object", + "required": [ + "agent_id", + "agent_name" + ], + "title": "PhoneNumberAgentInfo", + "example": { + "agent_id": "F3Pbu5gP6NNKBscdCdwB", + "agent_name": "My Agent" + } + }, + "PhoneNumberDynamicVariableTransferDestination": { + "properties": { + "type": { + "type": "string", + "const": "phone_dynamic_variable", + "title": "Type", + "default": "phone_dynamic_variable" + }, + "phone_number": { + "type": "string", + "title": "Phone Number" + } + }, + "type": "object", + "required": [ + "phone_number" + ], + "title": "PhoneNumberDynamicVariableTransferDestination" + }, + "PhoneNumberTransfer": { + "properties": { + "custom_sip_headers": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CustomSIPHeader" + }, + { + "$ref": "#/components/schemas/CustomSIPHeaderWithDynamicVariable" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "dynamic": "#/components/schemas/CustomSIPHeaderWithDynamicVariable", + "static": "#/components/schemas/CustomSIPHeader" + } + } + }, + "type": "array", + "maxItems": 20, + "title": "Custom Sip Headers", + "description": "Custom SIP headers to include when transferring the call. Each header can be either a static value or a dynamic variable reference." + }, + "transfer_destination": { + "oneOf": [ + { + "$ref": "#/components/schemas/PhoneNumberTransferDestination" + }, + { + "$ref": "#/components/schemas/SIPUriTransferDestination" + }, + { + "$ref": "#/components/schemas/PhoneNumberDynamicVariableTransferDestination" + }, + { + "$ref": "#/components/schemas/SIPUriDynamicVariableTransferDestination" + } + ], + "title": "Transfer Destination", + "discriminator": { + "propertyName": "type", + "mapping": { + "phone": "#/components/schemas/PhoneNumberTransferDestination", + "phone_dynamic_variable": "#/components/schemas/PhoneNumberDynamicVariableTransferDestination", + "sip_uri": "#/components/schemas/SIPUriTransferDestination", + "sip_uri_dynamic_variable": "#/components/schemas/SIPUriDynamicVariableTransferDestination" + } + } + }, + "transfer_type": { + "$ref": "#/components/schemas/TransferTypeEnum", + "default": "conference" + }, + "post_dial_digits": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/PostDialDigitsStatic" + }, + { + "$ref": "#/components/schemas/PostDialDigitsDynamicVariable" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "dynamic": "#/components/schemas/PostDialDigitsDynamicVariable", + "static": "#/components/schemas/PostDialDigitsStatic" + } + } + }, + { + "type": "null" + } + ], + "title": "Post Dial Digits", + "description": "DTMF digits to send after call connects (e.g., 'ww1234' for extension). Can be either a static value or a dynamic variable reference. Use 'w' for 0.5s pause. Only supported for Twilio transfers." + }, + "phone_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Phone Number", + "deprecated": true + }, + "condition": { + "type": "string", + "title": "Condition" + } + }, + "type": "object", + "required": [ + "transfer_destination", + "condition" + ], + "title": "PhoneNumberTransfer" + }, + "PhoneNumberTransferDestination": { + "properties": { + "type": { + "type": "string", + "const": "phone", + "title": "Type", + "default": "phone" + }, + "phone_number": { + "type": "string", + "title": "Phone Number" + } + }, + "type": "object", + "required": [ + "phone_number" + ], + "title": "PhoneNumberTransferDestination" + }, + "PlayDTMFResultErrorModel": { + "properties": { + "result_type": { + "type": "string", + "const": "play_dtmf_error", + "title": "Result Type", + "default": "play_dtmf_error" + }, + "status": { + "type": "string", + "const": "error", + "title": "Status", + "default": "error" + }, + "error": { + "type": "string", + "title": "Error" + }, + "details": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Details" + } + }, + "type": "object", + "required": [ + "error" + ], + "title": "PlayDTMFResultErrorModel" + }, + "PlayDTMFResultSuccessModel": { + "properties": { + "result_type": { + "type": "string", + "const": "play_dtmf_success", + "title": "Result Type", + "default": "play_dtmf_success" + }, + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "dtmf_tones": { + "type": "string", + "title": "Dtmf Tones" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + } + }, + "type": "object", + "required": [ + "dtmf_tones" + ], + "title": "PlayDTMFResultSuccessModel" + }, + "PlayDTMFToolConfig": { + "properties": { + "system_tool_type": { + "type": "string", + "const": "play_keypad_touch_tone", + "title": "System Tool Type", + "default": "play_keypad_touch_tone" + }, + "use_out_of_band_dtmf": { + "type": "boolean", + "title": "Use Out Of Band Dtmf", + "description": "Send DTMF tones as out-of-band RTP events (RFC 4733) instead of in-band audio. Only effective for SIP trunk imported numbers.", + "default": true + }, + "suppress_turn_after_dtmf": { + "type": "boolean", + "title": "Suppress Turn After Dtmf", + "description": "If true, the agent will not generate further speech after playing DTMF tones. This prevents the agent's speech from interfering with IVR systems.", + "default": false + } + }, + "type": "object", + "title": "PlayDTMFToolConfig", + "description": "Allows the agent to play DTMF tones during a phone call.\n\nThis tool can be used to interact with automated phone systems, such as\nnavigating phone menus, entering extensions, or inputting numeric codes." + }, + "PodcastBulletinMode": { + "properties": { + "type": { + "type": "string", + "const": "bulletin", + "title": "Type", + "description": "The type of podcast to create." + }, + "bulletin": { + "$ref": "#/components/schemas/PodcastBulletinModeData", + "description": "The voice settings for the bulletin." + } + }, + "type": "object", + "required": [ + "type", + "bulletin" + ], + "title": "PodcastBulletinMode", + "example": { + "bulletin": { + "host_voice_id": "aw1NgEzBg83R7vgmiJt6" + }, + "type": "bulletin" + } + }, + "PodcastBulletinModeData": { + "properties": { + "host_voice_id": { + "type": "string", + "title": "Host Voice Id", + "description": "The ID of the host voice." + } + }, + "type": "object", + "required": [ + "host_voice_id" + ], + "title": "PodcastBulletinModeData", + "example": { + "host_voice_id": "aw1NgEzBg83R7vgmiJt6" + } + }, + "PodcastConversationMode": { + "properties": { + "type": { + "type": "string", + "const": "conversation", + "title": "Type", + "description": "The type of podcast to create." + }, + "conversation": { + "$ref": "#/components/schemas/PodcastConversationModeData", + "description": "The voice settings for the conversation." + } + }, + "type": "object", + "required": [ + "type", + "conversation" + ], + "title": "PodcastConversationMode", + "example": { + "conversation": { + "guest_voice_id": "aw1NgEzBg83R7vgmiJt7", + "host_voice_id": "aw1NgEzBg83R7vgmiJt6" + }, + "type": "conversation" + } + }, + "PodcastConversationModeData": { + "properties": { + "host_voice_id": { + "type": "string", + "title": "Host Voice Id", + "description": "The ID of the host voice." + }, + "guest_voice_id": { + "type": "string", + "title": "Guest Voice Id", + "description": "The ID of the guest voice." + } + }, + "type": "object", + "required": [ + "host_voice_id", + "guest_voice_id" + ], + "title": "PodcastConversationModeData", + "example": { + "guest_voice_id": "aw1NgEzBg83R7vgmiJt7", + "host_voice_id": "aw1NgEzBg83R7vgmiJt6" + } + }, + "PodcastProjectResponseModel": { + "properties": { + "project": { + "$ref": "#/components/schemas/ProjectResponseModel", + "description": "The project associated with the created podcast." + } + }, + "type": "object", + "required": [ + "project" + ], + "title": "PodcastProjectResponseModel" + }, + "PodcastTextSource": { + "properties": { + "type": { + "type": "string", + "const": "text", + "title": "Type", + "description": "The type of source to create." + }, + "text": { + "type": "string", + "title": "Text", + "description": "The text to create the podcast from." + } + }, + "type": "object", + "required": [ + "type", + "text" + ], + "title": "PodcastTextSource", + "example": { + "text": "This is a test podcast.", + "type": "text" + } + }, + "PodcastURLSource": { + "properties": { + "type": { + "type": "string", + "const": "url", + "title": "Type", + "description": "The type of source to create." + }, + "url": { + "type": "string", + "title": "Url", + "description": "The URL to create the podcast from." + } + }, + "type": "object", + "required": [ + "type", + "url" + ], + "title": "PodcastURLSource", + "example": { + "type": "url", + "url": "https://www.example.com" + } + }, + "Position-Input": { + "properties": { + "x": { + "type": "number", + "title": "X", + "default": 0 + }, + "y": { + "type": "number", + "title": "Y", + "default": 0 + } + }, + "type": "object", + "title": "Position" + }, + "Position-Output": { + "properties": { + "x": { + "type": "number", + "title": "X", + "default": 0 + }, + "y": { + "type": "number", + "title": "Y", + "default": 0 + } + }, + "type": "object", + "required": [ + "x", + "y" + ], + "title": "Position" + }, + "PostAgentAvatarResponseModel": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "avatar_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Avatar Url" + } + }, + "type": "object", + "required": [ + "agent_id" + ], + "title": "PostAgentAvatarResponseModel" + }, + "PostDialDigitsDynamicVariable": { + "properties": { + "type": { + "type": "string", + "const": "dynamic", + "title": "Type", + "default": "dynamic" + }, + "value": { + "type": "string", + "minLength": 1, + "title": "Value", + "description": "The dynamic variable name to resolve" + } + }, + "type": "object", + "required": [ + "value" + ], + "title": "PostDialDigitsDynamicVariable" + }, + "PostDialDigitsStatic": { + "properties": { + "type": { + "type": "string", + "const": "static", + "title": "Type", + "default": "static" + }, + "value": { + "type": "string", + "minLength": 1, + "pattern": "^[0-9*#wW]*$", + "title": "Value", + "description": "DTMF digits to send after call connects (e.g., 'ww1234' for extension)" + } + }, + "type": "object", + "required": [ + "value" + ], + "title": "PostDialDigitsStatic" + }, + "PostWorkspaceSecretRequest": { + "properties": { + "type": { + "type": "string", + "const": "new", + "title": "Type" + }, + "name": { + "type": "string", + "title": "Name" + }, + "value": { + "type": "string", + "title": "Value" + } + }, + "type": "object", + "required": [ + "type", + "name", + "value" + ], + "title": "PostWorkspaceSecretRequest" + }, + "PostWorkspaceSecretResponseModel": { + "properties": { + "type": { + "type": "string", + "const": "stored", + "title": "Type" + }, + "secret_id": { + "type": "string", + "title": "Secret Id" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "type", + "secret_id", + "name" + ], + "title": "PostWorkspaceSecretResponseModel" + }, + "PreToolSpeechMode": { + "type": "string", + "enum": [ + "auto", + "force", + "off" + ], + "title": "PreToolSpeechMode", + "default": "auto" + }, + "PreviewAudioDBModel": { + "properties": { + "voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Id" + }, + "text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text" + }, + "audio_url": { + "type": "string", + "title": "Audio Url" + }, + "hls_manifest_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Hls Manifest Url" + }, + "dash_manifest_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Dash Manifest Url" + }, + "is_auto_generated": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Auto Generated", + "default": false + }, + "generated_at_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Generated At Unix" + } + }, + "type": "object", + "required": [ + "audio_url" + ], + "title": "PreviewAudioDBModel" + }, + "Price": { + "properties": { + "amount": { + "type": "string", + "title": "Amount" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + } + }, + "type": "object", + "required": [ + "amount", + "currency" + ], + "title": "Price", + "description": "Currency/amount pair." + }, + "PrivacyConfig-Input": { + "properties": { + "record_voice": { + "type": "boolean", + "title": "Record Voice", + "description": "Whether to record the conversation", + "default": true + }, + "retention_days": { + "type": "integer", + "title": "Retention Days", + "description": "The number of days to retain the conversation. -1 indicates there is no retention limit", + "default": -1 + }, + "delete_transcript_and_pii": { + "type": "boolean", + "title": "Delete Transcript And Pii", + "description": "Whether to delete the transcript and PII", + "default": false + }, + "delete_audio": { + "type": "boolean", + "title": "Delete Audio", + "description": "Whether to delete the audio", + "default": false + }, + "apply_to_existing_conversations": { + "type": "boolean", + "title": "Apply To Existing Conversations", + "description": "Whether to apply the privacy settings to existing conversations", + "default": false + }, + "zero_retention_mode": { + "type": "boolean", + "title": "Zero Retention Mode", + "description": "Whether to enable zero retention mode - no PII data is stored", + "default": false + }, + "conversation_history_redaction": { + "$ref": "#/components/schemas/ConversationHistoryRedactionConfig", + "description": "Config for PII redaction in the conversation history" + } + }, + "type": "object", + "title": "PrivacyConfig", + "example": { + "apply_to_existing_conversations": false, + "delete_audio": false, + "delete_transcript_and_pii": false, + "record_voice": true, + "retention_days": -1, + "zero_retention_mode": false + } + }, + "PrivacyConfig-Output": { + "properties": { + "record_voice": { + "type": "boolean", + "title": "Record Voice", + "description": "Whether to record the conversation", + "default": true + }, + "retention_days": { + "type": "integer", + "title": "Retention Days", + "description": "The number of days to retain the conversation. -1 indicates there is no retention limit", + "default": -1 + }, + "delete_transcript_and_pii": { + "type": "boolean", + "title": "Delete Transcript And Pii", + "description": "Whether to delete the transcript and PII", + "default": false + }, + "delete_audio": { + "type": "boolean", + "title": "Delete Audio", + "description": "Whether to delete the audio", + "default": false + }, + "apply_to_existing_conversations": { + "type": "boolean", + "title": "Apply To Existing Conversations", + "description": "Whether to apply the privacy settings to existing conversations", + "default": false + }, + "zero_retention_mode": { + "type": "boolean", + "title": "Zero Retention Mode", + "description": "Whether to enable zero retention mode - no PII data is stored", + "default": false + }, + "conversation_history_redaction": { + "$ref": "#/components/schemas/ConversationHistoryRedactionConfig", + "description": "Config for PII redaction in the conversation history" + } + }, + "type": "object", + "title": "PrivacyConfig", + "example": { + "apply_to_existing_conversations": false, + "delete_audio": false, + "delete_transcript_and_pii": false, + "record_voice": true, + "retention_days": -1, + "zero_retention_mode": false + } + }, + "PrivateKeyJWTResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "private_key_jwt", + "title": "Auth Type", + "default": "private_key_jwt" + }, + "provider": { + "type": "string", + "title": "Provider" + }, + "algorithm": { + "type": "string", + "enum": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512" + ], + "title": "Algorithm", + "description": "JWT signing algorithm", + "default": "HS256" + }, + "key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Key Id", + "description": "Key ID (kid) for JWT header - useful for key rotation" + }, + "issuer": { + "type": "string", + "title": "Issuer", + "description": "JWT issuer (iss claim)" + }, + "audience": { + "type": "string", + "title": "Audience", + "description": "JWT audience (aud claim)" + }, + "subject": { + "type": "string", + "title": "Subject", + "description": "JWT subject (sub claim)" + }, + "expiration_seconds": { + "type": "integer", + "maximum": 86400, + "minimum": 60, + "title": "Expiration Seconds", + "description": "Token expiration time in seconds", + "default": 3600 + }, + "extra_params": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Extra Params", + "description": "Additional custom claims to include in the JWT" + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "name", + "provider", + "issuer", + "audience", + "subject", + "id" + ], + "title": "PrivateKeyJWTResponse", + "description": "Response model for Private Key JWT auth connections" + }, + "ProcedureAtVersion": { + "properties": { + "procedure_id": { + "type": "string", + "title": "Procedure Id", + "description": "Procedure ID" + }, + "name": { + "type": "string", + "maxLength": 200, + "title": "Name", + "description": "Procedure name" + }, + "content": { + "type": "string", + "maxLength": 50000, + "title": "Content", + "description": "Procedure content" + }, + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "Agent ID of the procedure" + }, + "version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id", + "description": "Version ID of a version of the procedure. None for a procedure never versioned." + } + }, + "type": "object", + "required": [ + "procedure_id", + "name", + "content", + "agent_id" + ], + "title": "ProcedureAtVersion" + }, + "ProcedureCompilerMode": { + "type": "string", + "enum": [ + "append", + "skills" + ], + "title": "ProcedureCompilerMode", + "default": "skills" + }, + "ProcedureRefResponseModel": { + "properties": { + "procedure_id": { + "type": "string", + "title": "Procedure Id", + "description": "Procedure ID" + }, + "version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id", + "description": "Version ID of a version of the procedure. None for a procedure never versioned." + }, + "name": { + "type": "string", + "title": "Name", + "description": "Procedure name", + "default": "" + } + }, + "type": "object", + "required": [ + "procedure_id" + ], + "title": "ProcedureRefResponseModel", + "example": { + "name": "Customer Support Procedure", + "procedure_id": "agtprc_6qbpwdq8n01bxhk44bgjy6f10ck3", + "version_id": "agtprcv_7rbqxer9o12cyxi55ckw6sgz1dl4" + } + }, + "ProcedureSettings": { + "properties": { + "compiler_mode": { + "$ref": "#/components/schemas/ProcedureCompilerMode", + "default": "skills" + } + }, + "type": "object", + "title": "ProcedureSettings" + }, + "ProjectCreationMetaResponseModel": { + "properties": { + "creation_progress": { + "type": "number", + "title": "Creation Progress", + "description": "The progress of the project creation." + }, + "status": { + "type": "string", + "enum": [ + "pending", + "creating", + "finished", + "failed" + ], + "title": "Status", + "description": "The status of the project creation action." + }, + "type": { + "type": "string", + "enum": [ + "blank", + "generate_podcast", + "auto_assign_voices", + "dub_video", + "import_speech" + ], + "title": "Type", + "description": "The type of the project creation action." + } + }, + "type": "object", + "required": [ + "creation_progress", + "status", + "type" + ], + "title": "ProjectCreationMetaResponseModel", + "example": { + "creation_progress": 0.5, + "status": "pending", + "type": "blank" + } + }, + "ProjectExtendedResponseModel": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the project." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the project." + }, + "create_date_unix": { + "type": "integer", + "title": "Create Date Unix", + "description": "The creation date of the project." + }, + "created_by_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created By User Id", + "description": "The user ID who created the project." + }, + "default_title_voice_id": { + "type": "string", + "title": "Default Title Voice Id", + "description": "The default title voice ID." + }, + "default_paragraph_voice_id": { + "type": "string", + "title": "Default Paragraph Voice Id", + "description": "The default paragraph voice ID." + }, + "default_model_id": { + "type": "string", + "title": "Default Model Id", + "description": "The default model ID." + }, + "last_conversion_date_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Last Conversion Date Unix", + "description": "The last conversion date of the project." + }, + "can_be_downloaded": { + "type": "boolean", + "title": "Can Be Downloaded", + "description": "Whether the project can be downloaded." + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "The title of the project." + }, + "author": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Author", + "description": "The author of the project." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of the project." + }, + "genres": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Genres", + "description": "List of genres of the project." + }, + "cover_image_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cover Image Url", + "description": "The cover image URL of the project." + }, + "target_audience": { + "anyOf": [ + { + "type": "string", + "enum": [ + "children", + "young adult", + "adult", + "all ages" + ] + }, + { + "type": "null" + } + ], + "title": "Target Audience", + "description": "The target audience of the project." + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "Two-letter language code (ISO 639-1) of the language of the project." + }, + "content_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type", + "description": "The content type of the project, e.g. 'Novel' or 'Short Story'" + }, + "original_publication_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Original Publication Date", + "description": "The original publication date of the project." + }, + "mature_content": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Mature Content", + "description": "Whether the project contains mature content." + }, + "isbn_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Isbn Number", + "description": "The ISBN number of the project." + }, + "volume_normalization": { + "type": "boolean", + "title": "Volume Normalization", + "description": "Whether the project uses volume normalization." + }, + "state": { + "type": "string", + "enum": [ + "creating", + "default", + "converting", + "in_queue" + ], + "title": "State", + "description": "The state of the project." + }, + "access_level": { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ], + "title": "Access Level", + "description": "The access level of the project." + }, + "fiction": { + "anyOf": [ + { + "type": "string", + "enum": [ + "fiction", + "non-fiction" + ] + }, + { + "type": "null" + } + ], + "title": "Fiction", + "description": "Whether the project is fiction." + }, + "quality_check_on": { + "type": "boolean", + "title": "Quality Check On", + "description": "Whether quality check is enabled for this project.", + "deprecated": true + }, + "quality_check_on_when_bulk_convert": { + "type": "boolean", + "title": "Quality Check On When Bulk Convert", + "description": "Whether quality check is enabled on the project when bulk converting.", + "deprecated": true + }, + "creation_meta": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProjectCreationMetaResponseModel" + }, + { + "type": "null" + } + ], + "description": "The creation meta of the project." + }, + "source_type": { + "anyOf": [ + { + "type": "string", + "enum": [ + "blank", + "book", + "article", + "genfm", + "video", + "screenplay" + ] + }, + { + "type": "null" + } + ], + "title": "Source Type", + "description": "The source type of the project." + }, + "chapters_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Chapters Enabled", + "description": "Whether chapters are enabled for the project.", + "default": true + }, + "captions_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Captions Enabled", + "description": "Whether captions are enabled for the project.", + "default": true + }, + "caption_style": { + "anyOf": [ + { + "$ref": "#/components/schemas/CaptionStyleModel" + }, + { + "type": "null" + } + ], + "description": "Global styling to be applied to all captions" + }, + "caption_style_template_overrides": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/CaptionStyleModel" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Caption Style Template Overrides", + "description": "Styling changes that have been made to the provided templates" + }, + "public_share_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Public Share Id", + "description": "The public share ID of the project." + }, + "aspect_ratio": { + "anyOf": [ + { + "type": "string", + "enum": [ + "16:9", + "9:16", + "4:5", + "1:1" + ] + }, + { + "type": "null" + } + ], + "title": "Aspect Ratio", + "description": "The aspect ratio of the project." + }, + "agent_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/StudioAgentSettingsModel" + }, + { + "type": "null" + } + ], + "description": "Agent-related settings for the project" + }, + "quality_preset": { + "$ref": "#/components/schemas/QualityPresetType", + "description": "The quality preset level of the project." + }, + "chapters": { + "items": { + "$ref": "#/components/schemas/ChapterResponseModel" + }, + "type": "array", + "title": "Chapters", + "description": "List of chapters of the project and their metadata." + }, + "pronunciation_dictionary_versions": { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryVersionResponseModel" + }, + "type": "array", + "title": "Pronunciation Dictionary Versions", + "description": "List of pronunciation dictionary versions of the project and their metadata." + }, + "pronunciation_dictionary_locators": { + "items": { + "$ref": "#/components/schemas/PronunciationDictionaryLocatorResponseModel" + }, + "type": "array", + "title": "Pronunciation Dictionary Locators", + "description": "List of pronunciation dictionary locators." + }, + "apply_text_normalization": { + "type": "string", + "enum": [ + "auto", + "on", + "off", + "apply_english" + ], + "title": "Apply Text Normalization", + "description": "Whether text normalization is applied to the project." + }, + "experimental": { + "additionalProperties": true, + "type": "object", + "title": "Experimental", + "description": "Experimental features for the project." + }, + "assets": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProjectVideoResponseModel" + }, + { + "$ref": "#/components/schemas/ProjectExternalAudioResponseModel" + }, + { + "$ref": "#/components/schemas/ProjectImageResponseModel" + } + ] + }, + "type": "array", + "title": "Assets", + "description": "List of uploaded assets e.g. videos, audios." + }, + "voices": { + "items": { + "$ref": "#/components/schemas/ProjectVoiceResponseModel" + }, + "type": "array", + "title": "Voices", + "description": "List of configured project voices." + }, + "base_voices": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/VoiceResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Base Voices", + "description": "List of voices used by the project." + }, + "publishing_read": { + "anyOf": [ + { + "$ref": "#/components/schemas/DirectPublishingReadResponseModel" + }, + { + "type": "null" + } + ], + "description": "The ElevenReader data if the book was published." + } + }, + "type": "object", + "required": [ + "project_id", + "name", + "create_date_unix", + "created_by_user_id", + "default_title_voice_id", + "default_paragraph_voice_id", + "default_model_id", + "can_be_downloaded", + "volume_normalization", + "state", + "access_level", + "quality_check_on", + "quality_check_on_when_bulk_convert", + "quality_preset", + "chapters", + "pronunciation_dictionary_versions", + "pronunciation_dictionary_locators", + "apply_text_normalization", + "assets", + "voices" + ], + "title": "ProjectExtendedResponseModel", + "example": { + "access_level": "viewer", + "apply_text_normalization": "auto", + "assets": [], + "author": "John Doe", + "base_voices": [], + "can_be_downloaded": true, + "chapters": [ + { + "can_be_downloaded": true, + "chapter_id": "aw1NgEzBg83R7vgmiJt6", + "conversion_progress": 0.5, + "last_conversion_date_unix": 1714204800, + "last_conversion_error": "Error message", + "name": "Chapter 1", + "state": "converting", + "statistics": { + "characters_converted": 500, + "characters_unconverted": 1000, + "credits_needed_to_convert": 1000, + "paragraphs_converted": 20, + "paragraphs_unconverted": 10, + "voice_statistics": [ + { + "characters_converted": 300, + "characters_unconverted": 600, + "voice_id": "voice123" + }, + { + "characters_converted": 200, + "characters_unconverted": 400, + "voice_id": "voice456" + } + ] + } + } + ], + "content_type": "Novel", + "cover_image_url": "https://example.com/cover.jpg", + "create_date_unix": 1714204800, + "created_by_user_id": "Vbtgl3bRdj6lk79rYAgx", + "creation_meta": { + "creation_progress": 0.5, + "status": "pending", + "type": "blank" + }, + "default_model_id": "eleven_multilingual_v2", + "default_paragraph_voice_id": "JBFqnCBsd6RMkjVDRZzb", + "default_title_voice_id": "JBFqnCBsd6RMkjVDRZzb", + "description": "This is a description of my project.", + "experimental": {}, + "fiction": "fiction", + "genres": [ + "Novel", + "Short Story" + ], + "isbn_number": "978-90-274-3964-2", + "language": "en", + "last_conversion_date_unix": 1714204800, + "mature_content": false, + "name": "My Project", + "original_publication_date": "2025-01-01", + "project_id": "aw1NgEzBg83R7vgmiJt6", + "pronunciation_dictionary_locators": [], + "pronunciation_dictionary_versions": [], + "public_share_id": "abc123def456789", + "quality_check_on": false, + "quality_check_on_when_bulk_convert": false, + "quality_preset": "standard", + "state": "default", + "target_audience": "young adult", + "title": "My Project", + "voices": [], + "volume_normalization": true + } + }, + "ProjectExternalAudioResponseModel": { + "properties": { + "external_audio_id": { + "type": "string", + "title": "External Audio Id" + }, + "filename": { + "type": "string", + "title": "Filename" + }, + "signed_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Signed Url" + }, + "offset_ms": { + "type": "integer", + "title": "Offset Ms" + }, + "duration_ms": { + "type": "integer", + "title": "Duration Ms" + }, + "start_time_ms": { + "type": "integer", + "title": "Start Time Ms" + }, + "end_time_ms": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "End Time Ms" + }, + "order": { + "type": "string", + "title": "Order" + }, + "track_id": { + "type": "string", + "title": "Track Id" + }, + "created_at_ms": { + "type": "integer", + "title": "Created At Ms" + }, + "updated_at_ms": { + "type": "integer", + "title": "Updated At Ms" + }, + "volume_gain_db": { + "type": "number", + "title": "Volume Gain Db", + "default": 0 + }, + "muted": { + "type": "boolean", + "title": "Muted", + "default": false + }, + "fade_in_ms": { + "type": "integer", + "title": "Fade In Ms", + "default": 0 + }, + "fade_out_ms": { + "type": "integer", + "title": "Fade Out Ms", + "default": 0 + }, + "source_external_audio_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source External Audio Id" + }, + "source_asset_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Asset Id" + }, + "source_platform_asset_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Platform Asset Id" + }, + "pending_blocks_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/PendingBlocksMetadataModel" + }, + { + "type": "null" + } + ] + }, + "pending_external_audios_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/PendingExternalAudiosMetadataModel" + }, + { + "type": "null" + } + ] + }, + "speech_imported": { + "type": "boolean", + "title": "Speech Imported", + "default": false + }, + "pending_task": { + "anyOf": [ + { + "$ref": "#/components/schemas/PendingClipTask" + }, + { + "type": "null" + } + ] + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error" + }, + "current_snapshot_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Current Snapshot Id" + }, + "source_context": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/SongSourceContext" + }, + { + "$ref": "#/components/schemas/MusicExploreSongSourceContext" + }, + { + "$ref": "#/components/schemas/SfxSourceContext" + } + ], + "discriminator": { + "propertyName": "source_type", + "mapping": { + "music_explore_song": "#/components/schemas/MusicExploreSongSourceContext", + "sfx": "#/components/schemas/SfxSourceContext", + "song": "#/components/schemas/SongSourceContext" + } + } + }, + { + "type": "null" + } + ], + "title": "Source Context" + }, + "analysis": { + "anyOf": [ + { + "$ref": "#/components/schemas/AudioAnalysis" + }, + { + "type": "null" + } + ] + }, + "transcription": { + "anyOf": [ + { + "$ref": "#/components/schemas/AssetTranscription" + }, + { + "type": "null" + } + ] + }, + "type": { + "type": "string", + "const": "audio", + "title": "Type", + "default": "audio" + }, + "import_speech_progress": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Import Speech Progress", + "readOnly": true + } + }, + "type": "object", + "required": [ + "external_audio_id", + "filename", + "signed_url", + "offset_ms", + "duration_ms", + "start_time_ms", + "end_time_ms", + "order", + "track_id", + "created_at_ms", + "updated_at_ms", + "import_speech_progress" + ], + "title": "ProjectExternalAudioResponseModel" + }, + "ProjectImageResponseModel": { + "properties": { + "image_id": { + "type": "string", + "title": "Image Id" + }, + "filename": { + "type": "string", + "title": "Filename" + }, + "signed_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Signed Url" + }, + "thumbnail_signed_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Thumbnail Signed Url" + }, + "type": { + "type": "string", + "const": "image", + "title": "Type", + "default": "image" + }, + "source": { + "type": "string", + "const": "upload", + "title": "Source", + "default": "upload" + }, + "file_size_bytes": { + "type": "integer", + "title": "File Size Bytes" + }, + "width": { + "type": "integer", + "title": "Width" + }, + "height": { + "type": "integer", + "title": "Height" + }, + "track_id": { + "type": "string", + "title": "Track Id", + "default": "v0" + }, + "offset_ms": { + "type": "integer", + "title": "Offset Ms" + }, + "duration_ms": { + "type": "integer", + "title": "Duration Ms" + }, + "order": { + "type": "string", + "title": "Order" + }, + "canvas_placement": { + "$ref": "#/components/schemas/CanvasPlacement" + }, + "animation": { + "$ref": "#/components/schemas/ClipAnimation", + "default": { + "enter_effect": "none", + "enter_duration_ms": 0, + "exit_effect": "none", + "exit_duration_ms": 0 + } + }, + "opacity": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Opacity", + "default": 1 + }, + "created_at_ms": { + "type": "integer", + "title": "Created At Ms" + }, + "updated_at_ms": { + "type": "integer", + "title": "Updated At Ms" + }, + "current_snapshot_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Current Snapshot Id" + }, + "source_asset_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Asset Id" + }, + "source_platform_asset_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Platform Asset Id" + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error" + }, + "pending_task": { + "anyOf": [ + { + "$ref": "#/components/schemas/PendingClipTask" + }, + { + "type": "null" + } + ] + }, + "analysis": { + "anyOf": [ + { + "$ref": "#/components/schemas/ImageAnalysis" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "image_id", + "filename", + "file_size_bytes", + "width", + "height", + "offset_ms", + "duration_ms", + "order", + "canvas_placement", + "created_at_ms", + "updated_at_ms" + ], + "title": "ProjectImageResponseModel" + }, + "ProjectMutedTracksResponseModel": { + "properties": { + "chapter_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Chapter Ids", + "description": "List of chapter IDs that have muted tracks." + } + }, + "type": "object", + "required": [ + "chapter_ids" + ], + "title": "ProjectMutedTracksResponseModel", + "example": { + "chapter_ids": [ + "aw1NgEzBg83R7vgmiJt6" + ] + } + }, + "ProjectResponseModel": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the project." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the project." + }, + "create_date_unix": { + "type": "integer", + "title": "Create Date Unix", + "description": "The creation date of the project." + }, + "created_by_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created By User Id", + "description": "The user ID who created the project." + }, + "default_title_voice_id": { + "type": "string", + "title": "Default Title Voice Id", + "description": "The default title voice ID." + }, + "default_paragraph_voice_id": { + "type": "string", + "title": "Default Paragraph Voice Id", + "description": "The default paragraph voice ID." + }, + "default_model_id": { + "type": "string", + "title": "Default Model Id", + "description": "The default model ID." + }, + "last_conversion_date_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Last Conversion Date Unix", + "description": "The last conversion date of the project." + }, + "can_be_downloaded": { + "type": "boolean", + "title": "Can Be Downloaded", + "description": "Whether the project can be downloaded." + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "The title of the project." + }, + "author": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Author", + "description": "The author of the project." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of the project." + }, + "genres": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Genres", + "description": "List of genres of the project." + }, + "cover_image_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cover Image Url", + "description": "The cover image URL of the project." + }, + "target_audience": { + "anyOf": [ + { + "type": "string", + "enum": [ + "children", + "young adult", + "adult", + "all ages" + ] + }, + { + "type": "null" + } + ], + "title": "Target Audience", + "description": "The target audience of the project." + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "Two-letter language code (ISO 639-1) of the language of the project." + }, + "content_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type", + "description": "The content type of the project, e.g. 'Novel' or 'Short Story'" + }, + "original_publication_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Original Publication Date", + "description": "The original publication date of the project." + }, + "mature_content": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Mature Content", + "description": "Whether the project contains mature content." + }, + "isbn_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Isbn Number", + "description": "The ISBN number of the project." + }, + "volume_normalization": { + "type": "boolean", + "title": "Volume Normalization", + "description": "Whether the project uses volume normalization." + }, + "state": { + "type": "string", + "enum": [ + "creating", + "default", + "converting", + "in_queue" + ], + "title": "State", + "description": "The state of the project." + }, + "access_level": { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ], + "title": "Access Level", + "description": "The access level of the project." + }, + "fiction": { + "anyOf": [ + { + "type": "string", + "enum": [ + "fiction", + "non-fiction" + ] + }, + { + "type": "null" + } + ], + "title": "Fiction", + "description": "Whether the project is fiction." + }, + "quality_check_on": { + "type": "boolean", + "title": "Quality Check On", + "description": "Whether quality check is enabled for this project.", + "deprecated": true + }, + "quality_check_on_when_bulk_convert": { + "type": "boolean", + "title": "Quality Check On When Bulk Convert", + "description": "Whether quality check is enabled on the project when bulk converting.", + "deprecated": true + }, + "creation_meta": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProjectCreationMetaResponseModel" + }, + { + "type": "null" + } + ], + "description": "The creation meta of the project." + }, + "source_type": { + "anyOf": [ + { + "type": "string", + "enum": [ + "blank", + "book", + "article", + "genfm", + "video", + "screenplay" + ] + }, + { + "type": "null" + } + ], + "title": "Source Type", + "description": "The source type of the project." + }, + "chapters_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Chapters Enabled", + "description": "Whether chapters are enabled for the project.", + "default": true + }, + "captions_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Captions Enabled", + "description": "Whether captions are enabled for the project.", + "default": true + }, + "caption_style": { + "anyOf": [ + { + "$ref": "#/components/schemas/CaptionStyleModel" + }, + { + "type": "null" + } + ], + "description": "Global styling to be applied to all captions" + }, + "caption_style_template_overrides": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/CaptionStyleModel" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Caption Style Template Overrides", + "description": "Styling changes that have been made to the provided templates" + }, + "public_share_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Public Share Id", + "description": "The public share ID of the project." + }, + "aspect_ratio": { + "anyOf": [ + { + "type": "string", + "enum": [ + "16:9", + "9:16", + "4:5", + "1:1" + ] + }, + { + "type": "null" + } + ], + "title": "Aspect Ratio", + "description": "The aspect ratio of the project." + }, + "agent_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/StudioAgentSettingsModel" + }, + { + "type": "null" + } + ], + "description": "Agent-related settings for the project" + } + }, + "type": "object", + "required": [ + "project_id", + "name", + "create_date_unix", + "created_by_user_id", + "default_title_voice_id", + "default_paragraph_voice_id", + "default_model_id", + "can_be_downloaded", + "volume_normalization", + "state", + "access_level", + "quality_check_on", + "quality_check_on_when_bulk_convert" + ], + "title": "ProjectResponseModel", + "example": { + "access_level": "viewer", + "author": "John Doe", + "can_be_downloaded": true, + "content_type": "Novel", + "cover_image_url": "https://example.com/cover.jpg", + "create_date_unix": 1714204800, + "created_by_user_id": "Vbtgl3bRdj6lk79rYAgx", + "creation_meta": { + "creation_progress": 0.5, + "status": "pending", + "type": "blank" + }, + "default_model_id": "eleven_multilingual_v2", + "default_paragraph_voice_id": "JBFqnCBsd6RMkjVDRZzb", + "default_title_voice_id": "JBFqnCBsd6RMkjVDRZzb", + "description": "This is a description of my project.", + "fiction": "fiction", + "genres": [ + "Novel", + "Short Story" + ], + "isbn_number": "978-90-274-3964-2", + "language": "en", + "last_conversion_date_unix": 1714204800, + "mature_content": false, + "name": "My Project", + "original_publication_date": "2025-01-01", + "project_id": "aw1NgEzBg83R7vgmiJt6", + "public_share_id": "abc123def456789", + "quality_check_on": false, + "quality_check_on_when_bulk_convert": false, + "state": "default", + "target_audience": "young adult", + "title": "My Project", + "volume_normalization": true + } + }, + "ProjectSnapshotExtendedResponseModel": { + "properties": { + "project_snapshot_id": { + "type": "string", + "title": "Project Snapshot Id", + "description": "The ID of the project snapshot." + }, + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the project." + }, + "created_at_unix": { + "type": "integer", + "title": "Created At Unix", + "description": "The creation date of the project snapshot." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the project snapshot." + }, + "audio_upload": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Audio Upload", + "description": "(Deprecated)" + }, + "zip_upload": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Zip Upload", + "description": "(Deprecated)" + }, + "character_alignments": { + "items": { + "$ref": "#/components/schemas/CharacterAlignmentModel" + }, + "type": "array", + "title": "Character Alignments" + }, + "audio_duration_secs": { + "type": "number", + "title": "Audio Duration Secs", + "description": "The total duration of the audio in seconds." + } + }, + "type": "object", + "required": [ + "project_snapshot_id", + "project_id", + "created_at_unix", + "name", + "character_alignments", + "audio_duration_secs" + ], + "title": "ProjectSnapshotExtendedResponseModel", + "example": { + "audio_duration_secs": 123.45, + "character_alignments": [], + "created_at_unix": 1714204800, + "name": "My Project Snapshot", + "project_id": "aw1NgEzBg83R7vgmiJt6", + "project_snapshot_id": "aw1NgEzBg83R7vgmiJt6" + } + }, + "ProjectSnapshotResponseModel": { + "properties": { + "project_snapshot_id": { + "type": "string", + "title": "Project Snapshot Id", + "description": "The ID of the project snapshot." + }, + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the project." + }, + "created_at_unix": { + "type": "integer", + "title": "Created At Unix", + "description": "The creation date of the project snapshot." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the project snapshot." + }, + "audio_upload": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Audio Upload", + "description": "(Deprecated)" + }, + "zip_upload": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Zip Upload", + "description": "(Deprecated)" + } + }, + "type": "object", + "required": [ + "project_snapshot_id", + "project_id", + "created_at_unix", + "name" + ], + "title": "ProjectSnapshotResponseModel", + "example": { + "created_at_unix": 1714204800, + "name": "My Project Snapshot", + "project_id": "aw1NgEzBg83R7vgmiJt6", + "project_snapshot_id": "aw1NgEzBg83R7vgmiJt6" + } + }, + "ProjectSnapshotsResponseModel": { + "properties": { + "snapshots": { + "items": { + "$ref": "#/components/schemas/ProjectSnapshotResponseModel" + }, + "type": "array", + "title": "Snapshots", + "description": "List of project snapshots." + } + }, + "type": "object", + "required": [ + "snapshots" + ], + "title": "ProjectSnapshotsResponseModel", + "example": { + "snapshots": [ + { + "created_at_unix": 1714204800, + "name": "My Project Snapshot", + "project_id": "aw1NgEzBg83R7vgmiJt6", + "project_snapshot_id": "aw1NgEzBg83R7vgmiJt6" + } + ] + } + }, + "ProjectVideoResponseModel": { + "properties": { + "video_id": { + "type": "string", + "title": "Video Id" + }, + "filename": { + "type": "string", + "title": "Filename" + }, + "signed_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Signed Url" + }, + "signed_preview_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Signed Preview Url" + }, + "offset_ms": { + "type": "integer", + "title": "Offset Ms" + }, + "duration_ms": { + "type": "integer", + "title": "Duration Ms" + }, + "volume_gain_db": { + "type": "number", + "title": "Volume Gain Db" + }, + "muted": { + "type": "boolean", + "title": "Muted" + }, + "fade_in_ms": { + "type": "integer", + "title": "Fade In Ms", + "default": 0 + }, + "fade_out_ms": { + "type": "integer", + "title": "Fade Out Ms", + "default": 0 + }, + "width": { + "type": "integer", + "title": "Width" + }, + "height": { + "type": "integer", + "title": "Height" + }, + "codec": { + "type": "string", + "title": "Codec" + }, + "order": { + "type": "string", + "title": "Order" + }, + "created_at_ms": { + "type": "integer", + "title": "Created At Ms" + }, + "updated_at_ms": { + "type": "integer", + "title": "Updated At Ms" + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error" + }, + "thumbnail_interval_seconds": { + "type": "number", + "title": "Thumbnail Interval Seconds" + }, + "thumbnail_size": { + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "items": { + "type": "integer" + }, + "type": "array", + "maxItems": 2, + "minItems": 2, + "title": "Thumbnail Size" + }, + "thumbnail_sheets": { + "items": { + "$ref": "#/components/schemas/ProjectVideoThumbnailSheetResponseModel" + }, + "type": "array", + "title": "Thumbnail Sheets" + }, + "start_time_ms": { + "type": "integer", + "title": "Start Time Ms" + }, + "end_time_ms": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "End Time Ms" + }, + "asset_preview_signed_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Asset Preview Signed Url" + }, + "source_video_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Video Id" + }, + "source_asset_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Asset Id" + }, + "source_platform_asset_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Platform Asset Id" + }, + "pending_blocks_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/PendingBlocksMetadataModel" + }, + { + "type": "null" + } + ] + }, + "pending_external_audios_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/PendingExternalAudiosMetadataModel" + }, + { + "type": "null" + } + ] + }, + "speech_imported": { + "type": "boolean", + "title": "Speech Imported", + "default": false + }, + "pending_task": { + "anyOf": [ + { + "$ref": "#/components/schemas/PendingClipTask" + }, + { + "type": "null" + } + ] + }, + "audio_track_ready": { + "type": "boolean", + "title": "Audio Track Ready", + "default": true + }, + "export_format_ready": { + "type": "boolean", + "title": "Export Format Ready", + "default": true + }, + "current_snapshot_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Current Snapshot Id" + }, + "source_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/GenerationSourceContext" + }, + { + "type": "null" + } + ] + }, + "analysis": { + "anyOf": [ + { + "$ref": "#/components/schemas/VideoAnalysis" + }, + { + "type": "null" + } + ] + }, + "transcription": { + "anyOf": [ + { + "$ref": "#/components/schemas/AssetTranscription" + }, + { + "type": "null" + } + ] + }, + "type": { + "type": "string", + "const": "video", + "title": "Type", + "default": "video" + }, + "canvas_placement": { + "$ref": "#/components/schemas/CanvasPlacement" + }, + "animation": { + "$ref": "#/components/schemas/ClipAnimation" + }, + "playback_speed": { + "type": "number", + "title": "Playback Speed", + "default": 1 + }, + "opacity": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Opacity", + "default": 1 + }, + "track_id": { + "type": "string", + "title": "Track Id", + "default": "v0" + }, + "preview_job_progress": { + "type": "number", + "title": "Preview Job Progress", + "readOnly": true + }, + "import_speech_progress": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Import Speech Progress", + "readOnly": true + } + }, + "type": "object", + "required": [ + "video_id", + "filename", + "signed_url", + "signed_preview_url", + "offset_ms", + "duration_ms", + "volume_gain_db", + "muted", + "width", + "height", + "codec", + "order", + "created_at_ms", + "updated_at_ms", + "thumbnail_interval_seconds", + "thumbnail_size", + "thumbnail_sheets", + "start_time_ms", + "end_time_ms", + "preview_job_progress", + "import_speech_progress" + ], + "title": "ProjectVideoResponseModel" + }, + "ProjectVideoThumbnailSheetResponseModel": { + "properties": { + "start_thumbnail_index": { + "type": "integer", + "title": "Start Thumbnail Index" + }, + "thumbnail_count": { + "type": "integer", + "title": "Thumbnail Count" + }, + "signed_cloud_url": { + "type": "string", + "title": "Signed Cloud Url" + } + }, + "type": "object", + "required": [ + "start_thumbnail_index", + "thumbnail_count", + "signed_cloud_url" + ], + "title": "ProjectVideoThumbnailSheetResponseModel" + }, + "ProjectVoiceResponseModel": { + "properties": { + "voice_id": { + "type": "string", + "title": "Voice Id" + }, + "alias": { + "type": "string", + "title": "Alias" + }, + "stability": { + "type": "number", + "title": "Stability" + }, + "similarity_boost": { + "type": "number", + "title": "Similarity Boost" + }, + "style": { + "type": "number", + "title": "Style" + }, + "is_pinned": { + "type": "boolean", + "title": "Is Pinned" + }, + "use_speaker_boost": { + "type": "boolean", + "title": "Use Speaker Boost" + }, + "volume_gain": { + "type": "number", + "title": "Volume Gain" + }, + "speed": { + "type": "number", + "title": "Speed" + } + }, + "type": "object", + "required": [ + "voice_id", + "alias", + "stability", + "similarity_boost", + "style", + "is_pinned", + "use_speaker_boost", + "volume_gain", + "speed" + ], + "title": "ProjectVoiceResponseModel" + }, + "PromptAgentAPIModel-Input": { + "properties": { + "prompt": { + "type": "string", + "title": "Prompt", + "description": "The prompt for the agent", + "default": "", + "x-convai-client-override": true + }, + "llm": { + "$ref": "#/components/schemas/LLM", + "description": "The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment", + "default": "gemini-2.5-flash", + "x-convai-client-override": true + }, + "reasoning_effort": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLMReasoningEffort" + }, + { + "type": "null" + } + ], + "description": "Reasoning effort of the model. Only available for some models." + }, + "thinking_budget": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Thinking Budget", + "description": "Max number of tokens used for thinking. Use 0 to turn off if supported by the model." + }, + "temperature": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Temperature", + "description": "The temperature for the LLM. Defaults to 0. Set to null to omit the parameter from the LLM request entirely (useful for custom LLMs that reject the temperature field).", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "title": "Max Tokens", + "description": "If greater than 0, maximum number of tokens the LLM can predict", + "default": -1 + }, + "tool_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tool Ids", + "description": "A list of IDs of tools used by the agent", + "x-convai-client-override": true + }, + "built_in_tools": { + "$ref": "#/components/schemas/BuiltInTools-Input", + "description": "Built-in system tools to be used by the agent" + }, + "mcp_server_ids": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 10, + "title": "Mcp Server Ids", + "description": "A list of MCP server ids to be used by the agent" + }, + "native_mcp_server_ids": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 10, + "title": "Native Mcp Server Ids", + "description": "A list of Native MCP server ids to be used by the agent", + "x-convai-client-override": true + }, + "knowledge_base": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseLocator" + }, + "type": "array", + "title": "Knowledge Base", + "description": "A list of knowledge bases to be used by the agent", + "x-convai-client-override": true + }, + "custom_llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/CustomLLM" + }, + { + "type": "null" + } + ], + "description": "Definition for a custom LLM if LLM field is set to 'CUSTOM_LLM'" + }, + "ignore_default_personality": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Ignore Default Personality", + "description": "Whether to remove the default personality lines from the system prompt", + "default": false + }, + "rag": { + "$ref": "#/components/schemas/RagConfig", + "description": "Configuration for RAG" + }, + "timezone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Timezone", + "description": "Timezone for displaying current time in system prompt. If set, the current time will be included in the system prompt using this timezone. Must be a valid timezone name (e.g., 'America/New_York', 'Europe/London', 'UTC'). Recommended for accurate time-aware responses; without this, the agent has no knowledge of the current date/time unless you provide it via dynamic variables or tools, which can lead to incorrect or hallucinated time references." + }, + "backup_llm_config": { + "oneOf": [ + { + "$ref": "#/components/schemas/BackupLLMDefault" + }, + { + "$ref": "#/components/schemas/BackupLLMDisabled" + }, + { + "$ref": "#/components/schemas/BackupLLMOverride" + } + ], + "title": "Backup Llm Config", + "description": "Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order.", + "discriminator": { + "propertyName": "preference", + "mapping": { + "default": "#/components/schemas/BackupLLMDefault", + "disabled": "#/components/schemas/BackupLLMDisabled", + "override": "#/components/schemas/BackupLLMOverride" + } + } + }, + "cascade_timeout_seconds": { + "type": "number", + "maximum": 15, + "minimum": 2, + "title": "Cascade Timeout Seconds", + "description": "Time in seconds before cascading to backup LLM. Must be between 2 and 15 seconds.", + "default": 8 + }, + "tools": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/WebhookToolConfig-Input" + }, + { + "$ref": "#/components/schemas/ClientToolConfig-Input" + }, + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "$ref": "#/components/schemas/MCPToolConfig-Input" + }, + { + "$ref": "#/components/schemas/ApiIntegrationWebhookToolConfig-Input" + }, + { + "$ref": "#/components/schemas/SMBToolConfig" + }, + { + "$ref": "#/components/schemas/CodeToolConfig-Input" + } + ], + "description": "The type of tool", + "discriminator": { + "propertyName": "type", + "mapping": { + "api_integration_webhook": "#/components/schemas/ApiIntegrationWebhookToolConfig-Input", + "client": "#/components/schemas/ClientToolConfig-Input", + "code": "#/components/schemas/CodeToolConfig-Input", + "mcp": "#/components/schemas/MCPToolConfig-Input", + "smb": "#/components/schemas/SMBToolConfig", + "system": "#/components/schemas/SystemToolConfig-Input", + "webhook": "#/components/schemas/WebhookToolConfig-Input" + } + } + }, + "type": "array", + "title": "Tools", + "description": "A list of tools that the agent can use over the course of the conversation, use tool_ids instead", + "deprecated": true + } + }, + "type": "object", + "title": "PromptAgentAPIModel", + "example": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "max_tokens": -1, + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "temperature": 0, + "tool_ids": [], + "tools": [] + } + }, + "PromptAgentAPIModel-Output": { + "properties": { + "prompt": { + "type": "string", + "title": "Prompt", + "description": "The prompt for the agent", + "default": "", + "x-convai-client-override": true + }, + "llm": { + "$ref": "#/components/schemas/LLM", + "description": "The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment", + "default": "gemini-2.5-flash", + "x-convai-client-override": true + }, + "reasoning_effort": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLMReasoningEffort" + }, + { + "type": "null" + } + ], + "description": "Reasoning effort of the model. Only available for some models." + }, + "thinking_budget": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Thinking Budget", + "description": "Max number of tokens used for thinking. Use 0 to turn off if supported by the model." + }, + "temperature": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Temperature", + "description": "The temperature for the LLM. Defaults to 0. Set to null to omit the parameter from the LLM request entirely (useful for custom LLMs that reject the temperature field).", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "title": "Max Tokens", + "description": "If greater than 0, maximum number of tokens the LLM can predict", + "default": -1 + }, + "tool_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tool Ids", + "description": "A list of IDs of tools used by the agent", + "x-convai-client-override": true + }, + "built_in_tools": { + "$ref": "#/components/schemas/BuiltInTools-Output", + "description": "Built-in system tools to be used by the agent" + }, + "mcp_server_ids": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 10, + "title": "Mcp Server Ids", + "description": "A list of MCP server ids to be used by the agent" + }, + "native_mcp_server_ids": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 10, + "title": "Native Mcp Server Ids", + "description": "A list of Native MCP server ids to be used by the agent", + "x-convai-client-override": true + }, + "knowledge_base": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseLocator" + }, + "type": "array", + "title": "Knowledge Base", + "description": "A list of knowledge bases to be used by the agent", + "x-convai-client-override": true + }, + "custom_llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/CustomLLM" + }, + { + "type": "null" + } + ], + "description": "Definition for a custom LLM if LLM field is set to 'CUSTOM_LLM'" + }, + "ignore_default_personality": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Ignore Default Personality", + "description": "Whether to remove the default personality lines from the system prompt", + "default": false + }, + "rag": { + "$ref": "#/components/schemas/RagConfig", + "description": "Configuration for RAG" + }, + "timezone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Timezone", + "description": "Timezone for displaying current time in system prompt. If set, the current time will be included in the system prompt using this timezone. Must be a valid timezone name (e.g., 'America/New_York', 'Europe/London', 'UTC'). Recommended for accurate time-aware responses; without this, the agent has no knowledge of the current date/time unless you provide it via dynamic variables or tools, which can lead to incorrect or hallucinated time references." + }, + "backup_llm_config": { + "oneOf": [ + { + "$ref": "#/components/schemas/BackupLLMDefault" + }, + { + "$ref": "#/components/schemas/BackupLLMDisabled" + }, + { + "$ref": "#/components/schemas/BackupLLMOverride" + } + ], + "title": "Backup Llm Config", + "description": "Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order.", + "discriminator": { + "propertyName": "preference", + "mapping": { + "default": "#/components/schemas/BackupLLMDefault", + "disabled": "#/components/schemas/BackupLLMDisabled", + "override": "#/components/schemas/BackupLLMOverride" + } + } + }, + "cascade_timeout_seconds": { + "type": "number", + "maximum": 15, + "minimum": 2, + "title": "Cascade Timeout Seconds", + "description": "Time in seconds before cascading to backup LLM. Must be between 2 and 15 seconds.", + "default": 8 + }, + "tools": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/WebhookToolConfig-Output" + }, + { + "$ref": "#/components/schemas/ClientToolConfig-Output" + }, + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "$ref": "#/components/schemas/MCPToolConfig-Output" + }, + { + "$ref": "#/components/schemas/ApiIntegrationWebhookToolConfig-Output" + }, + { + "$ref": "#/components/schemas/SMBToolConfig" + }, + { + "$ref": "#/components/schemas/CodeToolConfig-Output" + } + ], + "description": "The type of tool", + "discriminator": { + "propertyName": "type", + "mapping": { + "api_integration_webhook": "#/components/schemas/ApiIntegrationWebhookToolConfig-Output", + "client": "#/components/schemas/ClientToolConfig-Output", + "code": "#/components/schemas/CodeToolConfig-Output", + "mcp": "#/components/schemas/MCPToolConfig-Output", + "smb": "#/components/schemas/SMBToolConfig", + "system": "#/components/schemas/SystemToolConfig-Output", + "webhook": "#/components/schemas/WebhookToolConfig-Output" + } + } + }, + "type": "array", + "title": "Tools", + "description": "A list of tools that the agent can use over the course of the conversation, use tool_ids instead", + "deprecated": true + } + }, + "type": "object", + "title": "PromptAgentAPIModel", + "example": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "max_tokens": -1, + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "temperature": 0, + "tool_ids": [], + "tools": [] + } + }, + "PromptAgentAPIModelOverride-Input": { + "properties": { + "prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt", + "description": "The prompt for the agent", + "x-convai-client-override": true + }, + "llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment", + "x-convai-client-override": true + }, + "tool_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tool Ids", + "description": "A list of IDs of tools used by the agent", + "x-convai-client-override": true + }, + "native_mcp_server_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Native Mcp Server Ids", + "description": "A list of Native MCP server ids to be used by the agent", + "x-convai-client-override": true + }, + "knowledge_base": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseLocator" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Knowledge Base", + "description": "A list of knowledge bases to be used by the agent", + "x-convai-client-override": true + } + }, + "type": "object", + "title": "PromptAgentAPIModelOverride", + "example": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "tool_ids": [] + } + }, + "PromptAgentAPIModelOverride-Output": { + "properties": { + "prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt", + "description": "The prompt for the agent", + "x-convai-client-override": true + }, + "llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment", + "x-convai-client-override": true + }, + "tool_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tool Ids", + "description": "A list of IDs of tools used by the agent", + "x-convai-client-override": true + }, + "native_mcp_server_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Native Mcp Server Ids", + "description": "A list of Native MCP server ids to be used by the agent", + "x-convai-client-override": true + }, + "knowledge_base": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseLocator" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Knowledge Base", + "description": "A list of knowledge bases to be used by the agent", + "x-convai-client-override": true + } + }, + "type": "object", + "title": "PromptAgentAPIModelOverride", + "example": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "tool_ids": [] + } + }, + "PromptAgentAPIModelOverrideConfig": { + "properties": { + "prompt": { + "type": "boolean", + "title": "Prompt", + "description": "Whether to allow overriding the prompt field.", + "default": false + }, + "llm": { + "type": "boolean", + "title": "Llm", + "description": "Whether to allow overriding the llm field.", + "default": false + }, + "tool_ids": { + "type": "boolean", + "title": "Tool Ids", + "description": "Whether to allow overriding the tool_ids field.", + "default": false + }, + "native_mcp_server_ids": { + "type": "boolean", + "title": "Native Mcp Server Ids", + "description": "Whether to allow overriding the native_mcp_server_ids field.", + "default": false + }, + "knowledge_base": { + "type": "boolean", + "title": "Knowledge Base", + "description": "Whether to allow overriding the knowledge_base field.", + "default": false + } + }, + "type": "object", + "title": "PromptAgentAPIModelOverrideConfig" + }, + "PromptAgentAPIModelWorkflowOverride-Input": { + "properties": { + "prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt", + "description": "The prompt for the agent", + "x-convai-client-override": true + }, + "llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment", + "x-convai-client-override": true + }, + "reasoning_effort": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLMReasoningEffort" + }, + { + "type": "null" + } + ], + "description": "Reasoning effort of the model. Only available for some models." + }, + "thinking_budget": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Thinking Budget", + "description": "Max number of tokens used for thinking. Use 0 to turn off if supported by the model." + }, + "temperature": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Temperature", + "description": "The temperature for the LLM. Defaults to 0. Set to null to omit the parameter from the LLM request entirely (useful for custom LLMs that reject the temperature field)." + }, + "max_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Tokens", + "description": "If greater than 0, maximum number of tokens the LLM can predict" + }, + "tool_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tool Ids", + "description": "A list of IDs of tools used by the agent", + "x-convai-client-override": true + }, + "built_in_tools": { + "anyOf": [ + { + "$ref": "#/components/schemas/BuiltInToolsWorkflowOverride-Input" + }, + { + "type": "null" + } + ], + "description": "Built-in system tools to be used by the agent" + }, + "mcp_server_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Mcp Server Ids", + "description": "A list of MCP server ids to be used by the agent" + }, + "native_mcp_server_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Native Mcp Server Ids", + "description": "A list of Native MCP server ids to be used by the agent", + "x-convai-client-override": true + }, + "knowledge_base": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseLocator" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Knowledge Base", + "description": "A list of knowledge bases to be used by the agent", + "x-convai-client-override": true + }, + "custom_llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/CustomLLM" + }, + { + "type": "null" + } + ], + "description": "Definition for a custom LLM if LLM field is set to 'CUSTOM_LLM'" + }, + "ignore_default_personality": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Ignore Default Personality", + "description": "Whether to remove the default personality lines from the system prompt" + }, + "rag": { + "anyOf": [ + { + "$ref": "#/components/schemas/RagConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for RAG" + }, + "timezone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Timezone", + "description": "Timezone for displaying current time in system prompt. If set, the current time will be included in the system prompt using this timezone. Must be a valid timezone name (e.g., 'America/New_York', 'Europe/London', 'UTC'). Recommended for accurate time-aware responses; without this, the agent has no knowledge of the current date/time unless you provide it via dynamic variables or tools, which can lead to incorrect or hallucinated time references." + }, + "backup_llm_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/BackupLLMDefault" + }, + { + "$ref": "#/components/schemas/BackupLLMDisabled" + }, + { + "$ref": "#/components/schemas/BackupLLMOverride" + }, + { + "type": "null" + } + ], + "title": "Backup Llm Config", + "description": "Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order." + }, + "cascade_timeout_seconds": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Cascade Timeout Seconds", + "description": "Time in seconds before cascading to backup LLM. Must be between 2 and 15 seconds." + }, + "tools": { + "anyOf": [ + { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/WebhookToolConfig-Input" + }, + { + "$ref": "#/components/schemas/ClientToolConfig-Input" + }, + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "$ref": "#/components/schemas/MCPToolConfig-Input" + }, + { + "$ref": "#/components/schemas/ApiIntegrationWebhookToolConfig-Input" + }, + { + "$ref": "#/components/schemas/SMBToolConfig" + }, + { + "$ref": "#/components/schemas/CodeToolConfig-Input" + } + ], + "description": "The type of tool", + "discriminator": { + "propertyName": "type", + "mapping": { + "api_integration_webhook": "#/components/schemas/ApiIntegrationWebhookToolConfig-Input", + "client": "#/components/schemas/ClientToolConfig-Input", + "code": "#/components/schemas/CodeToolConfig-Input", + "mcp": "#/components/schemas/MCPToolConfig-Input", + "smb": "#/components/schemas/SMBToolConfig", + "system": "#/components/schemas/SystemToolConfig-Input", + "webhook": "#/components/schemas/WebhookToolConfig-Input" + } + } + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tools", + "description": "A list of tools that the agent can use over the course of the conversation, use tool_ids instead" + } + }, + "type": "object", + "title": "PromptAgentAPIModelWorkflowOverride", + "example": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "max_tokens": -1, + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "temperature": 0, + "tool_ids": [], + "tools": [] + } + }, + "PromptAgentAPIModelWorkflowOverride-Output": { + "properties": { + "prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt", + "description": "The prompt for the agent", + "x-convai-client-override": true + }, + "llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment", + "x-convai-client-override": true + }, + "reasoning_effort": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLMReasoningEffort" + }, + { + "type": "null" + } + ], + "description": "Reasoning effort of the model. Only available for some models." + }, + "thinking_budget": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Thinking Budget", + "description": "Max number of tokens used for thinking. Use 0 to turn off if supported by the model." + }, + "temperature": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Temperature", + "description": "The temperature for the LLM. Defaults to 0. Set to null to omit the parameter from the LLM request entirely (useful for custom LLMs that reject the temperature field)." + }, + "max_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Tokens", + "description": "If greater than 0, maximum number of tokens the LLM can predict" + }, + "tool_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tool Ids", + "description": "A list of IDs of tools used by the agent", + "x-convai-client-override": true + }, + "built_in_tools": { + "anyOf": [ + { + "$ref": "#/components/schemas/BuiltInToolsWorkflowOverride-Output" + }, + { + "type": "null" + } + ], + "description": "Built-in system tools to be used by the agent" + }, + "mcp_server_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Mcp Server Ids", + "description": "A list of MCP server ids to be used by the agent" + }, + "native_mcp_server_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Native Mcp Server Ids", + "description": "A list of Native MCP server ids to be used by the agent", + "x-convai-client-override": true + }, + "knowledge_base": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseLocator" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Knowledge Base", + "description": "A list of knowledge bases to be used by the agent", + "x-convai-client-override": true + }, + "custom_llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/CustomLLM" + }, + { + "type": "null" + } + ], + "description": "Definition for a custom LLM if LLM field is set to 'CUSTOM_LLM'" + }, + "ignore_default_personality": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Ignore Default Personality", + "description": "Whether to remove the default personality lines from the system prompt" + }, + "rag": { + "anyOf": [ + { + "$ref": "#/components/schemas/RagConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for RAG" + }, + "timezone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Timezone", + "description": "Timezone for displaying current time in system prompt. If set, the current time will be included in the system prompt using this timezone. Must be a valid timezone name (e.g., 'America/New_York', 'Europe/London', 'UTC'). Recommended for accurate time-aware responses; without this, the agent has no knowledge of the current date/time unless you provide it via dynamic variables or tools, which can lead to incorrect or hallucinated time references." + }, + "backup_llm_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/BackupLLMDefault" + }, + { + "$ref": "#/components/schemas/BackupLLMDisabled" + }, + { + "$ref": "#/components/schemas/BackupLLMOverride" + }, + { + "type": "null" + } + ], + "title": "Backup Llm Config", + "description": "Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order." + }, + "cascade_timeout_seconds": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Cascade Timeout Seconds", + "description": "Time in seconds before cascading to backup LLM. Must be between 2 and 15 seconds." + }, + "tools": { + "anyOf": [ + { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/WebhookToolConfig-Output" + }, + { + "$ref": "#/components/schemas/ClientToolConfig-Output" + }, + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "$ref": "#/components/schemas/MCPToolConfig-Output" + }, + { + "$ref": "#/components/schemas/ApiIntegrationWebhookToolConfig-Output" + }, + { + "$ref": "#/components/schemas/SMBToolConfig" + }, + { + "$ref": "#/components/schemas/CodeToolConfig-Output" + } + ], + "description": "The type of tool", + "discriminator": { + "propertyName": "type", + "mapping": { + "api_integration_webhook": "#/components/schemas/ApiIntegrationWebhookToolConfig-Output", + "client": "#/components/schemas/ClientToolConfig-Output", + "code": "#/components/schemas/CodeToolConfig-Output", + "mcp": "#/components/schemas/MCPToolConfig-Output", + "smb": "#/components/schemas/SMBToolConfig", + "system": "#/components/schemas/SystemToolConfig-Output", + "webhook": "#/components/schemas/WebhookToolConfig-Output" + } + } + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tools", + "description": "A list of tools that the agent can use over the course of the conversation, use tool_ids instead" + } + }, + "type": "object", + "title": "PromptAgentAPIModelWorkflowOverride", + "example": { + "knowledge_base": [], + "llm": "gemini-2.0-flash-001", + "max_tokens": -1, + "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "temperature": 0, + "tool_ids": [], + "tools": [] + } + }, + "PromptEvaluationCriteria": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The unique identifier for the evaluation criteria" + }, + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "const": "prompt", + "title": "Type", + "description": "The type of evaluation criteria", + "default": "prompt" + }, + "conversation_goal_prompt": { + "type": "string", + "maxLength": 2000, + "title": "Conversation Goal Prompt", + "description": "The prompt that the agent should use to evaluate the conversation" + }, + "use_knowledge_base": { + "type": "boolean", + "title": "Use Knowledge Base", + "description": "When evaluating the prompt, should the agent's knowledge base be used.", + "default": false + }, + "scope": { + "$ref": "#/components/schemas/AnalysisScope", + "description": "The scope of transcript context used when evaluating this criterion. 'conversation' uses the full transcript; 'agent' uses only the portion where the defining agent was active.", + "default": "conversation" + }, + "llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "LLM model to use for this evaluation criteria. If not set, uses agent's analysis_llm default." + } + }, + "type": "object", + "required": [ + "id", + "name", + "conversation_goal_prompt" + ], + "title": "PromptEvaluationCriteria", + "description": "An evaluation using the transcript and a prompt for a yes/no achieved answer", + "example": { + "conversation_goal_prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", + "id": "1234567890", + "name": "Customer satisfaction check", + "scope": "conversation", + "use_knowledge_base": false + } + }, + "PromptInjectionGuardrail": { + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Is Enabled", + "default": false + } + }, + "type": "object", + "title": "PromptInjectionGuardrail" + }, + "PronunciationDictionaryAliasRuleRequestModel": { + "properties": { + "string_to_replace": { + "type": "string", + "title": "String To Replace", + "description": "The string to replace. Must be a non-empty string." + }, + "case_sensitive": { + "type": "boolean", + "title": "Case Sensitive", + "description": "Whether the rule should match case-sensitively.", + "default": true + }, + "word_boundaries": { + "type": "boolean", + "title": "Word Boundaries", + "description": "Whether the rule should only match at word boundaries.", + "default": true + }, + "type": { + "type": "string", + "const": "alias", + "title": "Type", + "description": "The type of the rule." + }, + "alias": { + "type": "string", + "title": "Alias", + "description": "The alias for the string to be replaced." + } + }, + "type": "object", + "required": [ + "string_to_replace", + "type", + "alias" + ], + "title": "PronunciationDictionaryAliasRuleRequestModel", + "example": { + "alias": "tie-land", + "case_sensitive": true, + "string_to_replace": "Thailand", + "type": "alias", + "word_boundaries": true + } + }, + "PronunciationDictionaryAliasRuleResponseModel": { + "properties": { + "string_to_replace": { + "type": "string", + "title": "String To Replace" + }, + "case_sensitive": { + "type": "boolean", + "title": "Case Sensitive", + "description": "Whether the rule matches case-sensitively.", + "default": true + }, + "word_boundaries": { + "type": "boolean", + "title": "Word Boundaries", + "description": "Whether the rule only matches at word boundaries.", + "default": true + }, + "type": { + "type": "string", + "const": "alias", + "title": "Type" + }, + "alias": { + "type": "string", + "title": "Alias" + } + }, + "type": "object", + "required": [ + "string_to_replace", + "type", + "alias" + ], + "title": "PronunciationDictionaryAliasRuleResponseModel" + }, + "PronunciationDictionaryLocatorResponseModel": { + "properties": { + "pronunciation_dictionary_id": { + "type": "string", + "title": "Pronunciation Dictionary Id" + }, + "version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id" + } + }, + "type": "object", + "required": [ + "pronunciation_dictionary_id", + "version_id" + ], + "title": "PronunciationDictionaryLocatorResponseModel" + }, + "PronunciationDictionaryPhonemeRuleRequestModel": { + "properties": { + "string_to_replace": { + "type": "string", + "title": "String To Replace", + "description": "The string to replace. Must be a non-empty string." + }, + "case_sensitive": { + "type": "boolean", + "title": "Case Sensitive", + "description": "Whether the rule should match case-sensitively.", + "default": true + }, + "word_boundaries": { + "type": "boolean", + "title": "Word Boundaries", + "description": "Whether the rule should only match at word boundaries.", + "default": true + }, + "type": { + "type": "string", + "const": "phoneme", + "title": "Type", + "description": "The type of the rule." + }, + "phoneme": { + "type": "string", + "title": "Phoneme", + "description": "The phoneme rule." + }, + "alphabet": { + "type": "string", + "title": "Alphabet", + "description": "The alphabet to use with the phoneme rule." + } + }, + "type": "object", + "required": [ + "string_to_replace", + "type", + "phoneme", + "alphabet" + ], + "title": "PronunciationDictionaryPhonemeRuleRequestModel", + "example": { + "alphabet": "ipa", + "case_sensitive": true, + "phoneme": "/ˈtaɪ.lænd/", + "string_to_replace": "Thailand", + "type": "phoneme", + "word_boundaries": true + } + }, + "PronunciationDictionaryPhonemeRuleResponseModel": { + "properties": { + "string_to_replace": { + "type": "string", + "title": "String To Replace" + }, + "case_sensitive": { + "type": "boolean", + "title": "Case Sensitive", + "description": "Whether the rule matches case-sensitively.", + "default": true + }, + "word_boundaries": { + "type": "boolean", + "title": "Word Boundaries", + "description": "Whether the rule only matches at word boundaries.", + "default": true + }, + "type": { + "type": "string", + "const": "phoneme", + "title": "Type" + }, + "phoneme": { + "type": "string", + "title": "Phoneme" + }, + "alphabet": { + "type": "string", + "title": "Alphabet" + } + }, + "type": "object", + "required": [ + "string_to_replace", + "type", + "phoneme", + "alphabet" + ], + "title": "PronunciationDictionaryPhonemeRuleResponseModel" + }, + "PronunciationDictionaryRulesResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the pronunciation dictionary." + }, + "version_id": { + "type": "string", + "title": "Version Id", + "description": "The version ID of the pronunciation dictionary." + }, + "version_rules_num": { + "type": "integer", + "title": "Version Rules Num", + "description": "The number of rules in the version of the pronunciation dictionary." + } + }, + "type": "object", + "required": [ + "id", + "version_id", + "version_rules_num" + ], + "title": "PronunciationDictionaryRulesResponseModel", + "example": { + "id": "5xM3yVvZQKV0EfqQpLrJ", + "version_id": "5xM3yVvZQKV0EfqQpLr2", + "version_rules_num": 5 + } + }, + "PronunciationDictionaryVersionLocatorDBModel": { + "properties": { + "pronunciation_dictionary_id": { + "type": "string", + "title": "Pronunciation Dictionary Id" + }, + "version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id" + } + }, + "type": "object", + "required": [ + "pronunciation_dictionary_id", + "version_id" + ], + "title": "PronunciationDictionaryVersionLocatorDBModel" + }, + "PronunciationDictionaryVersionLocatorRequestModel": { + "properties": { + "pronunciation_dictionary_id": { + "type": "string", + "title": "Pronunciation Dictionary Id", + "description": "The ID of the pronunciation dictionary." + }, + "version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id", + "description": "The ID of the version of the pronunciation dictionary. If not provided, the latest version will be used." + } + }, + "type": "object", + "required": [ + "pronunciation_dictionary_id" + ], + "title": "PronunciationDictionaryVersionLocatorRequestModel" + }, + "PronunciationDictionaryVersionResponseModel": { + "properties": { + "version_id": { + "type": "string", + "title": "Version Id" + }, + "version_rules_num": { + "type": "integer", + "title": "Version Rules Num" + }, + "pronunciation_dictionary_id": { + "type": "string", + "title": "Pronunciation Dictionary Id" + }, + "dictionary_name": { + "type": "string", + "title": "Dictionary Name" + }, + "version_name": { + "type": "string", + "title": "Version Name" + }, + "permission_on_resource": { + "anyOf": [ + { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ] + }, + { + "type": "null" + } + ], + "title": "Permission On Resource" + }, + "created_by": { + "type": "string", + "title": "Created By" + }, + "creation_time_unix": { + "type": "integer", + "title": "Creation Time Unix" + }, + "archived_time_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Archived Time Unix" + } + }, + "type": "object", + "required": [ + "version_id", + "version_rules_num", + "pronunciation_dictionary_id", + "dictionary_name", + "version_name", + "permission_on_resource", + "created_by", + "creation_time_unix" + ], + "title": "PronunciationDictionaryVersionResponseModel" + }, + "PydanticPronunciationDictionaryVersionLocator": { + "properties": { + "pronunciation_dictionary_id": { + "type": "string", + "title": "Pronunciation Dictionary Id", + "description": "The ID of the pronunciation dictionary" + }, + "version_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id", + "description": "The ID of the version of the pronunciation dictionary" + } + }, + "type": "object", + "required": [ + "pronunciation_dictionary_id", + "version_id" + ], + "title": "PydanticPronunciationDictionaryVersionLocator", + "description": "A locator for other documents to be able to reference a specific dictionary and it's version.\nThis is a pydantic version of PronunciationDictionaryVersionLocatorDBModel.\nRequired to ensure compat with the rest of the agent data models." + }, + "QualityPresetType": { + "type": "string", + "enum": [ + "standard", + "high", + "ultra", + "ultra_lossless" + ], + "default": "standard" + }, + "QueryParamsJsonSchema": { + "properties": { + "properties": { + "additionalProperties": { + "$ref": "#/components/schemas/LiteralJsonSchemaProperty" + }, + "type": "object", + "minProperties": 1, + "title": "Properties" + }, + "required": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Required" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "properties" + ], + "title": "QueryParamsJsonSchema" + }, + "QuoteInfo": { + "properties": { + "amount_usd": { + "type": "number", + "title": "Amount Usd", + "description": "The quoted price for this item in USD. Use the order's total_amount_usd for the combined order total." + } + }, + "type": "object", + "required": [ + "amount_usd" + ], + "title": "QuoteInfo", + "example": { + "amount_usd": 11 + } + }, + "RAGDocumentIndexResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "model": { + "$ref": "#/components/schemas/EmbeddingModelEnum" + }, + "status": { + "$ref": "#/components/schemas/RAGIndexStatus" + }, + "progress_percentage": { + "type": "number", + "title": "Progress Percentage" + }, + "document_model_index_usage": { + "$ref": "#/components/schemas/RAGDocumentIndexUsage" + } + }, + "type": "object", + "required": [ + "id", + "model", + "status", + "progress_percentage", + "document_model_index_usage" + ], + "title": "RAGDocumentIndexResponseModel" + }, + "RAGDocumentIndexUsage": { + "properties": { + "used_bytes": { + "type": "integer", + "title": "Used Bytes" + } + }, + "type": "object", + "required": [ + "used_bytes" + ], + "title": "RAGDocumentIndexUsage" + }, + "RAGDocumentIndexesResponseModel": { + "properties": { + "indexes": { + "items": { + "$ref": "#/components/schemas/RAGDocumentIndexResponseModel" + }, + "type": "array", + "title": "Indexes" + } + }, + "type": "object", + "required": [ + "indexes" + ], + "title": "RAGDocumentIndexesResponseModel" + }, + "RAGIndexBatchSuccessfulResponseModel": { + "properties": { + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "data": { + "$ref": "#/components/schemas/RAGDocumentIndexResponseModel" + } + }, + "type": "object", + "required": [ + "status", + "data" + ], + "title": "RAGIndexBatchSuccessfulResponseModel" + }, + "RAGIndexOverviewEmbeddingModelResponseModel": { + "properties": { + "model": { + "$ref": "#/components/schemas/EmbeddingModelEnum" + }, + "used_bytes": { + "type": "integer", + "title": "Used Bytes" + } + }, + "type": "object", + "required": [ + "model", + "used_bytes" + ], + "title": "RAGIndexOverviewEmbeddingModelResponseModel" + }, + "RAGIndexOverviewResponseModel": { + "properties": { + "total_used_bytes": { + "type": "integer", + "title": "Total Used Bytes" + }, + "total_max_bytes": { + "type": "integer", + "title": "Total Max Bytes" + }, + "models": { + "items": { + "$ref": "#/components/schemas/RAGIndexOverviewEmbeddingModelResponseModel" + }, + "type": "array", + "title": "Models" + } + }, + "type": "object", + "required": [ + "total_used_bytes", + "total_max_bytes", + "models" + ], + "title": "RAGIndexOverviewResponseModel" + }, + "RAGIndexRequestModel": { + "properties": { + "model": { + "$ref": "#/components/schemas/EmbeddingModelEnum" + } + }, + "type": "object", + "required": [ + "model" + ], + "title": "RAGIndexRequestModel" + }, + "RAGIndexStatus": { + "type": "string", + "enum": [ + "new", + "created", + "processing", + "failed", + "succeeded", + "rag_limit_exceeded", + "document_too_small", + "cannot_index_folder" + ], + "title": "RAGIndexStatus" + }, + "RagChunkMetadata": { + "properties": { + "document_id": { + "type": "string", + "title": "Document Id" + }, + "chunk_id": { + "type": "string", + "title": "Chunk Id" + }, + "vector_distance": { + "type": "number", + "title": "Vector Distance" + } + }, + "type": "object", + "required": [ + "document_id", + "chunk_id", + "vector_distance" + ], + "title": "RagChunkMetadata" + }, + "RagConfig": { + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "default": false + }, + "embedding_model": { + "$ref": "#/components/schemas/EmbeddingModelEnum", + "default": "e5_mistral_7b_instruct" + }, + "max_vector_distance": { + "type": "number", + "exclusiveMaximum": 1, + "exclusiveMinimum": 0, + "title": "Max Vector Distance", + "description": "Maximum vector distance of retrieved chunks.", + "default": 0.6, + "examples": [ + 0.5 + ] + }, + "max_documents_length": { + "type": "integer", + "exclusiveMaximum": 10000000, + "exclusiveMinimum": 0, + "title": "Max Documents Length", + "description": "Maximum total length of document chunks retrieved from RAG.", + "default": 50000, + "examples": [ + "50000" + ] + }, + "max_retrieved_rag_chunks_count": { + "type": "integer", + "maximum": 20, + "exclusiveMinimum": 0, + "title": "Max Retrieved Rag Chunks Count", + "description": "Maximum number of RAG document chunks to initially retrieve from the vector store. These are then further filtered by vector distance and total length.", + "default": 20, + "examples": [ + 5 + ] + }, + "num_candidates": { + "anyOf": [ + { + "type": "integer", + "maximum": 10000, + "exclusiveMinimum": 0 + }, + { + "type": "null" + } + ], + "title": "Num Candidates", + "description": "Number of candidates evaluated in ANN vector search. Higher number means better results, but higher latency. Minimum recommended value is 100. If disabled, the default value is used.", + "examples": [ + 300 + ] + }, + "query_rewrite_prompt_override": { + "anyOf": [ + { + "type": "string", + "maxLength": 1000, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Query Rewrite Prompt Override", + "description": "Custom prompt for rewriting user queries before RAG retrieval. The conversation history will be automatically appended at the end. If not set, the default prompt will be used.", + "examples": [ + "You are given a conversation between a user and an assistant. Rewrite the last question to be self-contained and clear." + ] + } + }, + "type": "object", + "title": "RagConfig" + }, + "RagConfigWorkflowOverride": { + "properties": { + "enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enabled" + }, + "embedding_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/EmbeddingModelEnum" + }, + { + "type": "null" + } + ] + }, + "max_vector_distance": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Vector Distance", + "description": "Maximum vector distance of retrieved chunks.", + "examples": [ + 0.5 + ] + }, + "max_documents_length": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Documents Length", + "description": "Maximum total length of document chunks retrieved from RAG.", + "examples": [ + "50000" + ] + }, + "max_retrieved_rag_chunks_count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Retrieved Rag Chunks Count", + "description": "Maximum number of RAG document chunks to initially retrieve from the vector store. These are then further filtered by vector distance and total length.", + "examples": [ + 5 + ] + }, + "num_candidates": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Num Candidates", + "description": "Number of candidates evaluated in ANN vector search. Higher number means better results, but higher latency. Minimum recommended value is 100. If disabled, the default value is used.", + "examples": [ + 300 + ] + }, + "query_rewrite_prompt_override": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Query Rewrite Prompt Override", + "description": "Custom prompt for rewriting user queries before RAG retrieval. The conversation history will be automatically appended at the end. If not set, the default prompt will be used.", + "examples": [ + "You are given a conversation between a user and an assistant. Rewrite the last question to be self-contained and clear." + ] + } + }, + "type": "object", + "title": "RagConfigWorkflowOverride" + }, + "RagRetrievalInfo": { + "properties": { + "chunks": { + "items": { + "$ref": "#/components/schemas/RagChunkMetadata" + }, + "type": "array", + "title": "Chunks" + }, + "embedding_model": { + "$ref": "#/components/schemas/EmbeddingModelEnum" + }, + "retrieval_query": { + "type": "string", + "title": "Retrieval Query" + }, + "rag_latency_secs": { + "type": "number", + "title": "Rag Latency Secs" + }, + "used_chunk_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Used Chunk Ids" + } + }, + "type": "object", + "required": [ + "chunks", + "embedding_model", + "retrieval_query", + "rag_latency_secs" + ], + "title": "RagRetrievalInfo" + }, + "ReadLegalTerms": { + "properties": { + "terms": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms" + }, + "start_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Start Date" + }, + "end_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "End Date" + } + }, + "type": "object", + "title": "ReadLegalTerms" + }, + "ReadMetadataChapterDBModel": { + "properties": { + "chapter_name": { + "type": "string", + "title": "Chapter Name" + }, + "word_count": { + "type": "integer", + "title": "Word Count" + }, + "char_count": { + "type": "integer", + "title": "Char Count" + }, + "starting_char_offset": { + "type": "integer", + "title": "Starting Char Offset" + }, + "has_parsed_html": { + "type": "boolean", + "title": "Has Parsed Html", + "default": false + }, + "has_summary": { + "type": "boolean", + "title": "Has Summary", + "default": false + }, + "duration_seconds": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Duration Seconds" + }, + "file_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Number" + }, + "is_fallback_name": { + "type": "boolean", + "title": "Is Fallback Name", + "default": false + } + }, + "type": "object", + "required": [ + "chapter_name", + "word_count", + "char_count", + "starting_char_offset" + ], + "title": "ReadMetadataChapterDBModel" + }, + "ReaderResourceResponseModel": { + "properties": { + "resource_type": { + "type": "string", + "enum": [ + "read", + "collection" + ], + "title": "Resource Type", + "description": "The type of resource." + }, + "resource_id": { + "type": "string", + "title": "Resource Id", + "description": "The ID of the resource." + } + }, + "type": "object", + "required": [ + "resource_type", + "resource_id" + ], + "title": "ReaderResourceResponseModel", + "example": { + "resource_id": "FCwhRBWXzGAHq8TQ4Fs18", + "resource_type": "read" + } + }, + "RecordingResponseModel": { + "properties": { + "recording_id": { + "type": "string", + "title": "Recording Id", + "description": "The ID of the recording." + }, + "mime_type": { + "type": "string", + "title": "Mime Type", + "description": "The MIME type of the recording." + }, + "size_bytes": { + "type": "integer", + "title": "Size Bytes", + "description": "The size of the recording in bytes." + }, + "upload_date_unix": { + "type": "integer", + "title": "Upload Date Unix", + "description": "The date of the recording in Unix time." + }, + "transcription": { + "type": "string", + "title": "Transcription", + "description": "The transcription of the recording." + } + }, + "type": "object", + "required": [ + "recording_id", + "mime_type", + "size_bytes", + "upload_date_unix", + "transcription" + ], + "title": "RecordingResponseModel", + "example": { + "mime_type": "audio/mpeg", + "recording_id": "CwhRBWXzGAHq8TQ4Fs17", + "size_bytes": 1000000, + "transcription": "Hello, how are you?", + "upload_date_unix": 1714204800 + } + }, + "ReferenceVideo": { + "properties": { + "generation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Generation Id" + }, + "content_asset_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Asset Id" + }, + "template_node_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Template Node Id" + }, + "studio_clip": { + "anyOf": [ + { + "$ref": "#/components/schemas/StudioClipReference" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "ReferenceVideo" + }, + "ReferencedToolCommonModel": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the tool" + }, + "type": { + "type": "string", + "enum": [ + "system", + "webhook", + "client", + "workflow", + "api_integration_webhook", + "mcp", + "code" + ], + "description": "The type of the tool" + } + }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "ReferencedToolCommonModel", + "description": "Reference to a tool for unit test evaluation." + }, + "RegexParameterEvaluationStrategy": { + "properties": { + "type": { + "type": "string", + "const": "regex", + "title": "Type" + }, + "pattern": { + "type": "string", + "title": "Pattern", + "description": "A regex pattern to match the agent's response against." + } + }, + "type": "object", + "required": [ + "type", + "pattern" + ], + "title": "RegexParameterEvaluationStrategy" + }, + "RegionConfigRequest": { + "properties": { + "region_id": { + "$ref": "#/components/schemas/TwilioRegionId", + "description": "Region ID" + }, + "token": { + "type": "string", + "title": "Token", + "description": "Auth Token for this region" + }, + "edge_location": { + "$ref": "#/components/schemas/TwilioEdgeLocation", + "description": "Edge location for this region" + } + }, + "type": "object", + "required": [ + "region_id", + "token", + "edge_location" + ], + "title": "RegionConfigRequest" + }, + "RegionalProcessingSurchargeInfo": { + "properties": { + "multiplier": { + "type": "number", + "title": "Multiplier", + "description": "The surcharge multiplier applied to this model's pricing (e.g. 1.1 for a 10% surcharge)." + } + }, + "type": "object", + "required": [ + "multiplier" + ], + "title": "RegionalProcessingSurchargeInfo", + "example": { + "multiplier": 1.1 + } + }, + "RegisterForGroupSessionParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "register_for_group_session", + "title": "Smb Tool Type", + "default": "register_for_group_session" + } + }, + "type": "object", + "title": "RegisterForGroupSessionParams", + "description": "Register a client for a scheduled group session." + }, + "RegisterMediaResponse": { + "properties": { + "media_id": { + "$ref": "#/components/schemas/MediaId", + "description": "The ID of the uploaded media file." + } + }, + "type": "object", + "required": [ + "media_id" + ], + "title": "RegisterMediaResponse", + "example": { + "media_id": "prodmedia_01jgb2zd68f8f9tfvbb968wb8z" + } + }, + "RemoveOrderItemResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success", + "description": "Whether the item was successfully removed." + } + }, + "type": "object", + "required": [ + "success" + ], + "title": "RemoveOrderItemResponse", + "example": { + "success": true + } + }, + "Render": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "version": { + "type": "integer", + "title": "Version" + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language" + }, + "type": { + "anyOf": [ + { + "$ref": "#/components/schemas/RenderType" + }, + { + "type": "null" + } + ] + }, + "media_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/DubbingMediaReference" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string", + "enum": [ + "complete", + "processing", + "failed" + ], + "title": "Status" + } + }, + "type": "object", + "required": [ + "id", + "version", + "language", + "type", + "media_ref", + "status" + ], + "title": "Render" + }, + "RenderType": { + "type": "string", + "enum": [ + "mp4", + "aac", + "mp3", + "wav", + "aaf", + "tracks_zip", + "clips_zip" + ], + "title": "RenderType" + }, + "ReportKnowledgeGapParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "report_knowledge_gap", + "title": "Smb Tool Type", + "default": "report_knowledge_gap" + } + }, + "type": "object", + "title": "ReportKnowledgeGapParams" + }, + "RequestPVCManualVerificationResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the request PVC manual verification request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "RequestPVCManualVerificationResponseModel", + "example": { + "status": "ok" + } + }, + "RequiredConstraint": { + "properties": { + "required": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Required" + } + }, + "type": "object", + "required": [ + "required" + ], + "title": "RequiredConstraint", + "description": "A set of fields that must all be present to satisfy this constraint." + }, + "RequiredConstraints": { + "properties": { + "any_of": { + "items": { + "$ref": "#/components/schemas/RequiredConstraint" + }, + "type": "array", + "title": "Any Of" + }, + "all_of": { + "items": { + "$ref": "#/components/schemas/RequiredConstraint" + }, + "type": "array", + "title": "All Of" + } + }, + "type": "object", + "title": "RequiredConstraints", + "description": "Wrapper for anyOf/allOf composition constraints scoped to required fields." + }, + "ResourceAccessInfo": { + "properties": { + "is_creator": { + "type": "boolean", + "title": "Is Creator", + "description": "Whether the user making the request is the creator of the agent" + }, + "creator_name": { + "type": "string", + "title": "Creator Name", + "description": "Name of the agent's creator" + }, + "creator_email": { + "type": "string", + "title": "Creator Email", + "description": "Email of the agent's creator" + }, + "role": { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ], + "title": "Role", + "description": "The role of the user making the request" + }, + "anonymous_access_level_override": { + "anyOf": [ + { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ] + }, + { + "type": "null" + } + ], + "title": "Anonymous Access Level Override", + "description": "The access level for anonymous users. If None, the resource is not shared publicly." + } + }, + "type": "object", + "required": [ + "is_creator", + "creator_name", + "creator_email", + "role" + ], + "title": "ResourceAccessInfo", + "example": { + "creator_email": "john.doe@example.com", + "creator_name": "John Doe", + "is_creator": true, + "role": "admin" + } + }, + "ResourceMetadataResponseModel": { + "properties": { + "resource_id": { + "type": "string", + "title": "Resource Id", + "description": "The ID of the resource." + }, + "resource_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Resource Name", + "description": "The name of the resource, if available." + }, + "resource_type": { + "$ref": "#/components/schemas/WorkspaceResourceType", + "description": "The type of the resource." + }, + "creator_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Creator User Id", + "description": "The ID of the user who created the resource." + }, + "anonymous_access_level_override": { + "anyOf": [ + { + "type": "string", + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ] + }, + { + "type": "null" + } + ], + "title": "Anonymous Access Level Override", + "description": "The access level for anonymous users. If None, the resource is not shared publicly." + }, + "role_to_group_ids": { + "additionalProperties": { + "items": { + "type": "string" + }, + "type": "array" + }, + "propertyNames": { + "enum": [ + "admin", + "editor", + "commenter", + "viewer" + ] + }, + "type": "object", + "title": "Role To Group Ids", + "description": "A mapping of roles to group IDs. When the resource is shared with a user, the group id is the user's id." + }, + "share_options": { + "items": { + "$ref": "#/components/schemas/ShareOptionResponseModel" + }, + "type": "array", + "title": "Share Options", + "description": "List of options for sharing the resource further in the workspace. These are users who don't have access to the resource yet." + } + }, + "type": "object", + "required": [ + "resource_id", + "resource_name", + "resource_type", + "creator_user_id", + "anonymous_access_level_override", + "role_to_group_ids", + "share_options" + ], + "title": "ResourceMetadataResponseModel", + "example": { + "anonymous_access_level_override": "viewer", + "creator_user_id": "5zavrE1kZXv2lFw9BKgEkf0B5Wqo", + "resource_id": "4ZUqyldxf71HqUbcP2Lc", + "resource_name": "My Custom Voice", + "resource_type": "voice", + "role_to_group_ids": { + "admin": [ + "5zavrE1kZXv2lFw9BKgEkf0B5Wqo" + ], + "editor": [ + "8ruQDGM2R4w1mFbHI5aROCUjIpJZ" + ], + "viewer": [] + }, + "share_options": [ + { + "id": "i2YYI6huwBmcgYydAXARmQJc3pmX", + "name": "user@example.com", + "type": "user" + }, + { + "id": "x1AfvYKAmiqxCnbvZeNXHqqthJaC", + "name": "mygroup", + "type": "group" + } + ] + } + }, + "ResponseFilter": { + "properties": { + "mode": { + "$ref": "#/components/schemas/ResponseFilterMode", + "description": "Controls how tool responses are filtered. 'all' returns entire response, 'allow' returns only specified paths, 'hide_all' hides the entire response.", + "default": "all" + }, + "filters": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Filters", + "description": "Dot notation paths to include when mode is 'allow' (e.g., ['ticket.id', 'ticket.status'])." + }, + "content_type": { + "type": "string", + "const": "application/json", + "title": "Content Type", + "description": "Content type for response filtering. Only 'application/json' responses are filtered.", + "default": "application/json" + } + }, + "type": "object", + "title": "ResponseFilter", + "description": "Configuration for filtering tool responses before they are visible to the agent." + }, + "ResponseFilterMode": { + "type": "string", + "enum": [ + "all", + "allow", + "hide_all" + ], + "title": "ResponseFilterMode", + "description": "Controls how tool responses are filtered before being visible to the agent.", + "default": "all" + }, + "ResponseUnitTestModel": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Output" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Output" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Output" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "llm", + "title": "Type", + "default": "llm" + }, + "success_condition": { + "type": "string", + "title": "Success Condition", + "description": "A prompt that evaluates whether the agent's response is successful. Should return True or False.", + "default": "" + }, + "success_examples": { + "items": { + "$ref": "#/components/schemas/AgentSuccessfulResponseExample" + }, + "type": "array", + "maxItems": 5, + "title": "Success Examples", + "description": "Non-empty list of example responses that should be considered successful" + }, + "failure_examples": { + "items": { + "$ref": "#/components/schemas/AgentFailureResponseExample" + }, + "type": "array", + "maxItems": 5, + "title": "Failure Examples", + "description": "Non-empty list of example responses that should be considered failures" + } + }, + "type": "object", + "title": "ResponseUnitTestModel" + }, + "ResubmitTestsRequestModel": { + "properties": { + "test_run_ids": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 1000, + "minItems": 1, + "title": "Test Run Ids", + "description": "List of test run IDs to resubmit" + }, + "agent_config_override": { + "anyOf": [ + { + "$ref": "#/components/schemas/AdhocAgentConfigOverrideForTestRequestModel" + }, + { + "type": "null" + } + ], + "description": "Configuration overrides to use for testing. If not provided, the agent's default configuration will be used." + }, + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "Agent ID to resubmit tests for" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id", + "description": "ID of the branch to run the tests on. If not provided, the tests will be run on the agent default configuration." + } + }, + "type": "object", + "required": [ + "test_run_ids", + "agent_id" + ], + "title": "ResubmitTestsRequestModel" + }, + "RetryTriggerAction": { + "properties": { + "type": { + "type": "string", + "const": "retry", + "title": "Type", + "default": "retry" + }, + "feedback": { + "type": "string", + "title": "Feedback", + "description": "Custom feedback to inject into the agent when retrying after guardrail trigger.", + "default": "Your response was blocked by a guardrail that blocks content that matches this condition/category: '{{trigger_reason}}' During your next turn you must tell the user \"I'm sorry but I can't answer that question, would you like to know something else?\"." + } + }, + "type": "object", + "title": "RetryTriggerAction" + }, + "ReviewResponseModel": { + "properties": { + "review_status": { + "type": "string", + "enum": [ + "approved", + "edits_required", + "rejected" + ], + "title": "Review Status" + }, + "reviewed_at_unix": { + "type": "integer", + "title": "Reviewed At Unix" + }, + "reviewed_by": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reviewed By" + }, + "reject_reasons": { + "anyOf": [ + { + "items": { + "type": "string", + "enum": [ + "lacks_structure", + "doesnt_open", + "not_literary_work", + "language_not_supported", + "too_short", + "duplicate", + "promotional", + "formatting_issues", + "low_quality", + "metadata_incomplete", + "metadata_inaccurate", + "typos", + "review_error", + "spam", + "legal_violation", + "content_policy", + "public_domain", + "other" + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Reject Reasons" + }, + "scores_breakdown": { + "anyOf": [ + { + "additionalProperties": { + "type": "integer" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Scores Breakdown" + }, + "rejected_details": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Rejected Details" + }, + "explanation": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Explanation" + } + }, + "type": "object", + "required": [ + "review_status", + "reviewed_at_unix" + ], + "title": "ReviewResponseModel" + }, + "RunAgentTestsRequestModel": { + "properties": { + "tests": { + "items": { + "$ref": "#/components/schemas/SingleTestRunRequestModel" + }, + "type": "array", + "maxItems": 1000, + "minItems": 1, + "title": "Tests", + "description": "List of tests to run on the agent" + }, + "agent_config_override": { + "anyOf": [ + { + "$ref": "#/components/schemas/AdhocAgentConfigOverrideForTestRequestModel" + }, + { + "type": "null" + } + ], + "description": "Configuration overrides to use for testing. If not provided, the agent's default configuration will be used." + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id", + "description": "ID of the branch to run the tests on. If not provided, the tests will be run on the agent default configuration." + } + }, + "type": "object", + "required": [ + "tests" + ], + "title": "RunAgentTestsRequestModel" + }, + "SIPLogMessage": { + "properties": { + "call_id": { + "type": "string", + "title": "Call Id" + }, + "phone_numbers": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Phone Numbers" + }, + "local_address": { + "type": "string", + "title": "Local Address" + }, + "remote_address": { + "type": "string", + "title": "Remote Address" + }, + "transport": { + "type": "string", + "title": "Transport" + }, + "raw_message": { + "type": "string", + "title": "Raw Message" + }, + "error_message": { + "type": "string", + "title": "Error Message" + }, + "direction": { + "$ref": "#/components/schemas/SIPLogMessageDirection" + }, + "created_at_unix_micro": { + "type": "integer", + "title": "Created At Unix Micro" + } + }, + "type": "object", + "required": [ + "call_id", + "phone_numbers", + "local_address", + "remote_address", + "transport", + "raw_message", + "error_message", + "direction", + "created_at_unix_micro" + ], + "title": "SIPLogMessage" + }, + "SIPLogMessageDirection": { + "type": "string", + "enum": [ + "in", + "out" + ], + "title": "SIPLogMessageDirection" + }, + "SIPMediaEncryptionEnum": { + "type": "string", + "enum": [ + "disabled", + "allowed", + "required" + ], + "title": "SIPMediaEncryptionEnum", + "default": "allowed" + }, + "SIPTrunkCredentialsRequestModel": { + "properties": { + "username": { + "type": "string", + "title": "Username", + "description": "SIP trunk username" + }, + "password": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Password", + "description": "SIP trunk password - if not specified, then remain unchanged" + } + }, + "type": "object", + "required": [ + "username" + ], + "title": "SIPTrunkCredentialsRequestModel" + }, + "SIPTrunkOutboundCallResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success" + }, + "message": { + "type": "string", + "title": "Message" + }, + "conversation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Conversation Id" + }, + "sip_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sip Call Id" + } + }, + "type": "object", + "required": [ + "success", + "message", + "conversation_id", + "sip_call_id" + ], + "title": "SIPTrunkOutboundCallResponse" + }, + "SIPTrunkTransportEnum": { + "type": "string", + "enum": [ + "auto", + "udp", + "tcp", + "tls" + ], + "title": "SIPTrunkTransportEnum", + "default": "auto" + }, + "SIPUriDynamicVariableTransferDestination": { + "properties": { + "type": { + "type": "string", + "const": "sip_uri_dynamic_variable", + "title": "Type", + "default": "sip_uri_dynamic_variable" + }, + "sip_uri": { + "type": "string", + "title": "Sip Uri" + } + }, + "type": "object", + "required": [ + "sip_uri" + ], + "title": "SIPUriDynamicVariableTransferDestination" + }, + "SIPUriTransferDestination": { + "properties": { + "type": { + "type": "string", + "const": "sip_uri", + "title": "Type", + "default": "sip_uri" + }, + "sip_uri": { + "type": "string", + "title": "Sip Uri" + } + }, + "type": "object", + "required": [ + "sip_uri" + ], + "title": "SIPUriTransferDestination" + }, + "SMBToolConfig": { + "properties": { + "type": { + "type": "string", + "const": "smb", + "title": "Type", + "description": "Tool type identifier", + "default": "smb" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does.", + "default": "" + }, + "response_timeout_secs": { + "type": "integer", + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete.", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "enabled": { + "type": "boolean", + "title": "Enabled", + "description": "Whether this tool is enabled for the agent", + "default": true + }, + "params": { + "oneOf": [ + { + "$ref": "#/components/schemas/SearchClientsParams" + }, + { + "$ref": "#/components/schemas/ListClientsParams" + }, + { + "$ref": "#/components/schemas/GetClientByPhoneParams" + }, + { + "$ref": "#/components/schemas/CreateClientParams" + }, + { + "$ref": "#/components/schemas/UpdateClientParams" + }, + { + "$ref": "#/components/schemas/DeleteClientParams" + }, + { + "$ref": "#/components/schemas/ListStaffParams" + }, + { + "$ref": "#/components/schemas/CreateStaffParams" + }, + { + "$ref": "#/components/schemas/UpdateStaffParams" + }, + { + "$ref": "#/components/schemas/DeleteStaffParams" + }, + { + "$ref": "#/components/schemas/ListAssetsParams" + }, + { + "$ref": "#/components/schemas/CreateAssetParams" + }, + { + "$ref": "#/components/schemas/UpdateAssetParams" + }, + { + "$ref": "#/components/schemas/DeleteAssetParams" + }, + { + "$ref": "#/components/schemas/ListServicesParams" + }, + { + "$ref": "#/components/schemas/CreateServiceParams" + }, + { + "$ref": "#/components/schemas/UpdateServiceParams" + }, + { + "$ref": "#/components/schemas/DeleteServiceParams" + }, + { + "$ref": "#/components/schemas/ListProductsParams" + }, + { + "$ref": "#/components/schemas/CreateProductParams" + }, + { + "$ref": "#/components/schemas/UpdateProductParams" + }, + { + "$ref": "#/components/schemas/DeleteProductParams" + }, + { + "$ref": "#/components/schemas/CheckServiceAvailabilityParams" + }, + { + "$ref": "#/components/schemas/CreateClientAppointmentParams" + }, + { + "$ref": "#/components/schemas/GetClientAppointmentsParams" + }, + { + "$ref": "#/components/schemas/GetAppointmentByConfirmationNumberParams" + }, + { + "$ref": "#/components/schemas/ListGroupSessionsParams" + }, + { + "$ref": "#/components/schemas/ScheduleGroupSessionParams" + }, + { + "$ref": "#/components/schemas/RegisterForGroupSessionParams" + }, + { + "$ref": "#/components/schemas/CancelGroupSessionRegistrationParams" + }, + { + "$ref": "#/components/schemas/UpdateGroupSessionSeatsParams" + }, + { + "$ref": "#/components/schemas/CancelGroupSessionForAllParams" + }, + { + "$ref": "#/components/schemas/DeleteGroupSessionParams" + }, + { + "$ref": "#/components/schemas/ListCalendarEventsParams" + }, + { + "$ref": "#/components/schemas/UpdateCalendarEventParams" + }, + { + "$ref": "#/components/schemas/CancelCalendarEventParams" + }, + { + "$ref": "#/components/schemas/DeleteCalendarEventParams" + }, + { + "$ref": "#/components/schemas/ListCustomerFacingAgentsParams" + }, + { + "$ref": "#/components/schemas/ListAgentRulesParams" + }, + { + "$ref": "#/components/schemas/CreateAgentRuleParams" + }, + { + "$ref": "#/components/schemas/UpdateAgentRuleParams" + }, + { + "$ref": "#/components/schemas/DeleteAgentRuleParams" + }, + { + "$ref": "#/components/schemas/ListHolidaysParams" + }, + { + "$ref": "#/components/schemas/CreateHolidayParams" + }, + { + "$ref": "#/components/schemas/UpdateHolidayParams" + }, + { + "$ref": "#/components/schemas/DeleteHolidayParams" + }, + { + "$ref": "#/components/schemas/GetScheduleParams" + }, + { + "$ref": "#/components/schemas/UpdateBusinessInfoParams" + }, + { + "$ref": "#/components/schemas/UpdateCustomerFacingConfigParams" + }, + { + "$ref": "#/components/schemas/GetAnalyticsSummaryParams" + }, + { + "$ref": "#/components/schemas/GetBookingPageSettingsParams" + }, + { + "$ref": "#/components/schemas/UpdateBookingPageSettingsParams" + }, + { + "$ref": "#/components/schemas/GetBookingSlugStatusParams" + }, + { + "$ref": "#/components/schemas/SetBookingSlugParams" + }, + { + "$ref": "#/components/schemas/ListClientInteractionsParams" + }, + { + "$ref": "#/components/schemas/CreateClientInteractionParams" + }, + { + "$ref": "#/components/schemas/DeleteClientInteractionParams" + }, + { + "$ref": "#/components/schemas/ListLocationsParams" + }, + { + "$ref": "#/components/schemas/CreateLocationParams" + }, + { + "$ref": "#/components/schemas/UpdateLocationParams" + }, + { + "$ref": "#/components/schemas/DeleteLocationParams" + }, + { + "$ref": "#/components/schemas/LeaveMessageParams" + }, + { + "$ref": "#/components/schemas/ReportKnowledgeGapParams" + } + ], + "title": "Params", + "discriminator": { + "propertyName": "smb_tool_type", + "mapping": { + "cancel_calendar_event": "#/components/schemas/CancelCalendarEventParams", + "cancel_group_session_for_all": "#/components/schemas/CancelGroupSessionForAllParams", + "cancel_group_session_registration": "#/components/schemas/CancelGroupSessionRegistrationParams", + "check_service_availability": "#/components/schemas/CheckServiceAvailabilityParams", + "create_agent_rule": "#/components/schemas/CreateAgentRuleParams", + "create_asset": "#/components/schemas/CreateAssetParams", + "create_client": "#/components/schemas/CreateClientParams", + "create_client_appointment": "#/components/schemas/CreateClientAppointmentParams", + "create_client_interaction": "#/components/schemas/CreateClientInteractionParams", + "create_holiday": "#/components/schemas/CreateHolidayParams", + "create_location": "#/components/schemas/CreateLocationParams", + "create_product": "#/components/schemas/CreateProductParams", + "create_service": "#/components/schemas/CreateServiceParams", + "create_staff": "#/components/schemas/CreateStaffParams", + "delete_agent_rule": "#/components/schemas/DeleteAgentRuleParams", + "delete_asset": "#/components/schemas/DeleteAssetParams", + "delete_calendar_event": "#/components/schemas/DeleteCalendarEventParams", + "delete_client": "#/components/schemas/DeleteClientParams", + "delete_client_interaction": "#/components/schemas/DeleteClientInteractionParams", + "delete_group_session": "#/components/schemas/DeleteGroupSessionParams", + "delete_holiday": "#/components/schemas/DeleteHolidayParams", + "delete_location": "#/components/schemas/DeleteLocationParams", + "delete_product": "#/components/schemas/DeleteProductParams", + "delete_service": "#/components/schemas/DeleteServiceParams", + "delete_staff": "#/components/schemas/DeleteStaffParams", + "get_analytics_summary": "#/components/schemas/GetAnalyticsSummaryParams", + "get_appointment_by_confirmation_number": "#/components/schemas/GetAppointmentByConfirmationNumberParams", + "get_booking_page_settings": "#/components/schemas/GetBookingPageSettingsParams", + "get_booking_slug_status": "#/components/schemas/GetBookingSlugStatusParams", + "get_client_appointments": "#/components/schemas/GetClientAppointmentsParams", + "get_client_by_phone": "#/components/schemas/GetClientByPhoneParams", + "get_schedule": "#/components/schemas/GetScheduleParams", + "leave_message": "#/components/schemas/LeaveMessageParams", + "list_agent_rules": "#/components/schemas/ListAgentRulesParams", + "list_assets": "#/components/schemas/ListAssetsParams", + "list_calendar_events": "#/components/schemas/ListCalendarEventsParams", + "list_client_interactions": "#/components/schemas/ListClientInteractionsParams", + "list_clients": "#/components/schemas/ListClientsParams", + "list_customer_facing_agents": "#/components/schemas/ListCustomerFacingAgentsParams", + "list_group_sessions": "#/components/schemas/ListGroupSessionsParams", + "list_holidays": "#/components/schemas/ListHolidaysParams", + "list_locations": "#/components/schemas/ListLocationsParams", + "list_products": "#/components/schemas/ListProductsParams", + "list_services": "#/components/schemas/ListServicesParams", + "list_staff": "#/components/schemas/ListStaffParams", + "register_for_group_session": "#/components/schemas/RegisterForGroupSessionParams", + "report_knowledge_gap": "#/components/schemas/ReportKnowledgeGapParams", + "schedule_group_session": "#/components/schemas/ScheduleGroupSessionParams", + "search_clients": "#/components/schemas/SearchClientsParams", + "set_booking_slug": "#/components/schemas/SetBookingSlugParams", + "update_agent_rule": "#/components/schemas/UpdateAgentRuleParams", + "update_asset": "#/components/schemas/UpdateAssetParams", + "update_booking_page_settings": "#/components/schemas/UpdateBookingPageSettingsParams", + "update_business_info": "#/components/schemas/UpdateBusinessInfoParams", + "update_calendar_event": "#/components/schemas/UpdateCalendarEventParams", + "update_client": "#/components/schemas/UpdateClientParams", + "update_customer_facing_config": "#/components/schemas/UpdateCustomerFacingConfigParams", + "update_group_session_seats": "#/components/schemas/UpdateGroupSessionSeatsParams", + "update_holiday": "#/components/schemas/UpdateHolidayParams", + "update_location": "#/components/schemas/UpdateLocationParams", + "update_product": "#/components/schemas/UpdateProductParams", + "update_service": "#/components/schemas/UpdateServiceParams", + "update_staff": "#/components/schemas/UpdateStaffParams" + } + } + } + }, + "type": "object", + "required": [ + "name", + "params" + ], + "title": "SMBToolConfig", + "description": "SMB tool configuration that wraps SMB tool parameters.", + "examples": [ + { + "description": "", + "enabled": true, + "name": "search_clients", + "params": { + "smb_tool_type": "search_clients" + }, + "type": "smb" + } + ], + "x-fern-ignore": true + }, + "SMSConversationInfo": { + "properties": { + "direction": { + "type": "string", + "enum": [ + "inbound", + "outbound" + ], + "title": "Direction" + }, + "phone_number_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Phone Number Id" + }, + "sms_user_phone_number": { + "type": "string", + "title": "Sms User Phone Number" + }, + "agent_phone_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Phone Number" + } + }, + "type": "object", + "required": [ + "direction", + "sms_user_phone_number" + ], + "title": "SMSConversationInfo" + }, + "SafetyCommonModel": { + "properties": { + "ivc": { + "$ref": "#/components/schemas/SafetyEvaluation" + }, + "non_ivc": { + "$ref": "#/components/schemas/SafetyEvaluation" + } + }, + "type": "object", + "title": "SafetyCommonModel", + "description": "Safety object that has the information of safety evaluations based on used voice." + }, + "SafetyEvaluation": { + "properties": { + "is_unsafe": { + "type": "boolean", + "title": "Is Unsafe", + "default": false + }, + "llm_reason": { + "type": "string", + "title": "Llm Reason", + "default": "" + }, + "safety_prompt_version": { + "type": "integer", + "title": "Safety Prompt Version", + "default": 0 + }, + "matched_rule_id": { + "items": { + "$ref": "#/components/schemas/SafetyRule" + }, + "type": "array", + "title": "Matched Rule Id" + } + }, + "type": "object", + "title": "SafetyEvaluation", + "description": "Safety evaluation of the agent. Prompt and first message is taken into account.\nThe unsafe reason is provided from the evaluation" + }, + "SafetyResponseModel": { + "properties": { + "is_blocked_ivc": { + "type": "boolean", + "title": "Is Blocked Ivc", + "default": false + }, + "is_blocked_non_ivc": { + "type": "boolean", + "title": "Is Blocked Non Ivc", + "default": false + }, + "ignore_safety_evaluation": { + "type": "boolean", + "title": "Ignore Safety Evaluation", + "default": false + } + }, + "type": "object", + "title": "SafetyResponseModel" + }, + "SafetyRule": { + "type": "string", + "enum": [ + "sexual_minors", + "forget_moderation", + "extremism", + "scam_fraud", + "political", + "self_harm", + "illegal_distribution_medical", + "sexual_adults", + "unknown" + ], + "title": "SafetyRule" + }, + "SampleConfigDBModel": { + "properties": { + "is_sample": { + "type": "boolean", + "title": "Is Sample", + "default": false + }, + "parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + }, + "parent_type": { + "anyOf": [ + { + "type": "string", + "enum": [ + "read", + "collection" + ] + }, + { + "type": "null" + } + ], + "title": "Parent Type" + }, + "chapter_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Chapter Ids" + } + }, + "type": "object", + "title": "SampleConfigDBModel" + }, + "SampleResponseModel": { + "properties": { + "sample_id": { + "type": "string", + "title": "Sample Id", + "description": "The ID of the sample." + }, + "file_name": { + "type": "string", + "title": "File Name", + "description": "The name of the sample file." + }, + "mime_type": { + "type": "string", + "title": "Mime Type", + "description": "The MIME type of the sample file." + }, + "size_bytes": { + "type": "integer", + "title": "Size Bytes", + "description": "The size of the sample file in bytes." + }, + "hash": { + "type": "string", + "title": "Hash", + "description": "The hash of the sample file." + }, + "duration_secs": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Duration Secs" + }, + "remove_background_noise": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Remove Background Noise" + }, + "has_isolated_audio": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Has Isolated Audio" + }, + "has_isolated_audio_preview": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Has Isolated Audio Preview" + }, + "speaker_separation": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpeakerSeparationResponseModel" + }, + { + "type": "null" + } + ] + }, + "trim_start": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Trim Start" + }, + "trim_end": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Trim End" + } + }, + "type": "object", + "required": [ + "sample_id", + "file_name", + "mime_type", + "size_bytes", + "hash" + ], + "title": "SampleResponseModel", + "example": { + "file_name": "sample.mp3", + "hash": "1234567890", + "mime_type": "audio/mpeg", + "sample_id": "DCwhRBWXzGAHq8TQ4Fs18", + "size_bytes": 1000000 + } + }, + "SayNodeLiteralMessage-Input": { + "properties": { + "type": { + "type": "string", + "const": "literal", + "title": "Type", + "default": "literal" + }, + "text": { + "type": "string", + "minLength": 1, + "title": "Text", + "description": "Literal text message to be spoken by the agent." + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "SayNodeLiteralMessage" + }, + "SayNodeLiteralMessage-Output": { + "properties": { + "type": { + "type": "string", + "const": "literal", + "title": "Type", + "default": "literal" + }, + "text": { + "type": "string", + "minLength": 1, + "title": "Text", + "description": "Literal text message to be spoken by the agent." + } + }, + "type": "object", + "required": [ + "type", + "text" + ], + "title": "SayNodeLiteralMessage" + }, + "SayNodePromptMessage-Input": { + "properties": { + "type": { + "type": "string", + "const": "prompt", + "title": "Type", + "default": "prompt" + }, + "prompt": { + "type": "string", + "title": "Prompt", + "description": "LLM prompt describing what message should be generated." + } + }, + "type": "object", + "required": [ + "prompt" + ], + "title": "SayNodePromptMessage" + }, + "SayNodePromptMessage-Output": { + "properties": { + "type": { + "type": "string", + "const": "prompt", + "title": "Type", + "default": "prompt" + }, + "prompt": { + "type": "string", + "title": "Prompt", + "description": "LLM prompt describing what message should be generated." + } + }, + "type": "object", + "required": [ + "type", + "prompt" + ], + "title": "SayNodePromptMessage" + }, + "ScheduleGroupSessionParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "schedule_group_session", + "title": "Smb Tool Type", + "default": "schedule_group_session" + } + }, + "type": "object", + "title": "ScheduleGroupSessionParams", + "description": "Schedule a single instance of a group service.\n\nThe session's duration is derived from the parent service so the assistant\nonly has to pin start time, the (optional) instructor / room, and the\nlocation. Participants register separately via\n``register_for_group_session``." + }, + "ScopedAnalysisResult": { + "properties": { + "scope": { + "$ref": "#/components/schemas/AnalysisScope", + "description": "The scope of the analysis. 'conversation' uses the full transcript; 'agent' uses only the portion where the defining agent was active." + }, + "source_agent_id": { + "type": "string", + "title": "Source Agent Id" + }, + "source_branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Branch Id", + "description": "Branch of the agent for this scoped block; disambiguates repeated agent_id." + }, + "evaluation_criteria_results": { + "additionalProperties": { + "$ref": "#/components/schemas/ConversationHistoryEvaluationCriteriaResultCommonModel" + }, + "type": "object", + "title": "Evaluation Criteria Results" + }, + "data_collection_results": { + "additionalProperties": { + "$ref": "#/components/schemas/DataCollectionResultCommonModel" + }, + "type": "object", + "title": "Data Collection Results" + }, + "successful": { + "$ref": "#/components/schemas/EvaluationSuccessResult" + } + }, + "type": "object", + "required": [ + "scope", + "source_agent_id", + "successful" + ], + "title": "ScopedAnalysisResult" + }, + "SearchClientsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "search_clients", + "title": "Smb Tool Type", + "default": "search_clients" + } + }, + "type": "object", + "title": "SearchClientsParams", + "description": "Search for clients by name, phone number, or email." + }, + "SearchHighlightSegment": { + "properties": { + "value": { + "type": "string", + "title": "Value" + }, + "is_hit": { + "type": "boolean", + "title": "Is Hit" + } + }, + "type": "object", + "required": [ + "value", + "is_hit" + ], + "title": "SearchHighlightSegment" + }, + "SeatType": { + "type": "string", + "enum": [ + "workspace_admin", + "workspace_member", + "workspace_lite_member" + ], + "title": "SeatType", + "description": "Seat types for workspace members." + }, + "SecretDependencyResourceType": { + "type": "string", + "enum": [ + "tools", + "agents", + "phone_numbers" + ], + "title": "SecretDependencyResourceType" + }, + "SecretDependencyType": { + "type": "string", + "enum": [ + "conversation_initiation_webhook" + ], + "title": "SecretDependencyType" + }, + "SectionSource": { + "properties": { + "song_id": { + "type": "string", + "maxLength": 100, + "minLength": 1, + "title": "Song Id", + "description": "The ID of the song to source the section from. You can find the song ID in the response headers when you generate a song." + }, + "range": { + "$ref": "#/components/schemas/TimeRange", + "description": "The range to extract from the source song." + }, + "negative_ranges": { + "items": { + "$ref": "#/components/schemas/TimeRange" + }, + "type": "array", + "maxItems": 10, + "title": "Negative Ranges", + "description": "The ranges to exclude from the 'range'." + } + }, + "type": "object", + "required": [ + "song_id", + "range" + ], + "title": "SectionSource" + }, + "SegmentCreatePayload": { + "properties": { + "start_time": { + "type": "number", + "title": "Start Time" + }, + "end_time": { + "type": "number", + "title": "End Time" + }, + "text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text" + }, + "translations": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Translations" + } + }, + "type": "object", + "required": [ + "start_time", + "end_time" + ], + "title": "SegmentCreatePayload" + }, + "SegmentCreateResponse": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + }, + "new_segment": { + "type": "string", + "title": "New Segment" + } + }, + "type": "object", + "required": [ + "version", + "new_segment" + ], + "title": "SegmentCreateResponse" + }, + "SegmentDeleteResponse": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + } + }, + "type": "object", + "required": [ + "version" + ], + "title": "SegmentDeleteResponse" + }, + "SegmentDubResponse": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + } + }, + "type": "object", + "required": [ + "version" + ], + "title": "SegmentDubResponse" + }, + "SegmentMigrationResponse": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + } + }, + "type": "object", + "required": [ + "version" + ], + "title": "SegmentMigrationResponse" + }, + "SegmentSubtitleFrame": { + "properties": { + "start_time": { + "type": "number", + "title": "Start Time" + }, + "end_time": { + "type": "number", + "title": "End Time" + }, + "lines": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lines" + } + }, + "type": "object", + "required": [ + "start_time", + "end_time", + "lines" + ], + "title": "SegmentSubtitleFrame" + }, + "SegmentTranscriptionResponse": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + } + }, + "type": "object", + "required": [ + "version" + ], + "title": "SegmentTranscriptionResponse" + }, + "SegmentTranslationResponse": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + } + }, + "type": "object", + "required": [ + "version" + ], + "title": "SegmentTranslationResponse" + }, + "SegmentUpdatePayload": { + "properties": { + "start_time": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Start Time" + }, + "end_time": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "End Time" + }, + "text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text" + } + }, + "type": "object", + "title": "SegmentUpdatePayload" + }, + "SegmentUpdateResponse": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + } + }, + "type": "object", + "required": [ + "version" + ], + "title": "SegmentUpdateResponse" + }, + "SegmentedJsonExportOptions": { + "properties": { + "include_speakers": { + "type": "boolean", + "title": "Include Speakers", + "default": true + }, + "include_timestamps": { + "type": "boolean", + "title": "Include Timestamps", + "default": true + }, + "format": { + "type": "string", + "const": "segmented_json", + "title": "Format" + }, + "segment_on_silence_longer_than_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Segment On Silence Longer Than S" + }, + "max_segment_duration_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Segment Duration S" + }, + "max_segment_chars": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Segment Chars" + } + }, + "type": "object", + "required": [ + "format" + ], + "title": "SegmentedJsonExportOptions" + }, + "SetBookingSlugParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "set_booking_slug", + "title": "Smb Tool Type", + "default": "set_booking_slug" + } + }, + "type": "object", + "title": "SetBookingSlugParams" + }, + "SeverityId": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 99 + ], + "title": "SeverityId", + "description": "OCSF Severity levels.\n\nSpec: https://schema.ocsf.io/1.6.0/objects/severity_id" + }, + "SfxSourceContext": { + "properties": { + "source_type": { + "type": "string", + "const": "sfx", + "title": "Source Type", + "default": "sfx" + }, + "sound_generation_history_item_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sound Generation History Item Id" + }, + "text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text" + }, + "generation_config": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Generation Config" + } + }, + "type": "object", + "title": "SfxSourceContext", + "description": "Context for sound effect clips." + }, + "ShareOptionResponseModel": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the principal." + }, + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the principal." + }, + "type": { + "type": "string", + "enum": [ + "user", + "group", + "key" + ], + "title": "Type", + "description": "The type of the principal: user, group, or service account (under 'key')." + } + }, + "type": "object", + "required": [ + "name", + "id", + "type" + ], + "title": "ShareOptionResponseModel" + }, + "SimilarVoice": { + "properties": { + "voice_id": { + "type": "string", + "title": "Voice Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "category": { + "$ref": "#/components/schemas/VOICE_CATEGORY" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "preview_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Preview Url" + } + }, + "type": "object", + "required": [ + "voice_id", + "name", + "category" + ], + "title": "SimilarVoice" + }, + "SimilarVoicesForSpeakerResponse": { + "properties": { + "voices": { + "items": { + "$ref": "#/components/schemas/SimilarVoice" + }, + "type": "array", + "title": "Voices" + } + }, + "type": "object", + "required": [ + "voices" + ], + "title": "SimilarVoicesForSpeakerResponse" + }, + "SimulationTestModel": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Output" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Output" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Output" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "simulation", + "title": "Type", + "default": "simulation" + }, + "success_condition": { + "type": "string", + "title": "Success Condition", + "description": "A prompt that evaluates whether the agent's response is successful. Should return True or False.", + "default": "" + }, + "simulation_scenario": { + "type": "string", + "title": "Simulation Scenario", + "description": "Description of the simulation scenario and user persona for simulation tests.", + "default": "" + }, + "simulation_max_turns": { + "type": "integer", + "maximum": 50, + "minimum": 1, + "title": "Simulation Max Turns", + "description": "Maximum number of conversation turns for simulation tests.", + "default": 5 + }, + "simulation_environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Simulation Environment", + "description": "The environment to use when running this simulation test. If not provided, defaults to 'production'." + }, + "tool_mock_config": { + "$ref": "#/components/schemas/SimulationToolMockBehaviorConfig", + "description": "Configuration for which tools to mock and fallback behavior." + }, + "evaluation_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "LLM model to use for evaluating simulation results. Defaults to Claude Sonnet 4.6." + }, + "simulated_user_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "LLM model for the simulated user. Defaults to Claude Sonnet 4.6." + } + }, + "type": "object", + "title": "SimulationTestModel" + }, + "SimulationToolMockBehaviorConfig": { + "properties": { + "mocking_strategy": { + "$ref": "#/components/schemas/MockingStrategy", + "description": "Which tools to mock: 'all' mocks every mockable tool, 'selected' mocks only those in mocked_tool_names/mocked_tool_ids, 'none' disables mocking.", + "default": "none" + }, + "fallback_strategy": { + "$ref": "#/components/schemas/MockNoMatchBehavior", + "description": "Behavior when no mock matches a tool call.", + "default": "raise_error" + }, + "mocked_tool_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Mocked Tool Ids", + "description": "Tool IDs to mock. Resolved to tool names before being passed to the orchestrator." + } + }, + "type": "object", + "title": "SimulationToolMockBehaviorConfig", + "description": "Simulation/preview-side config: tools are identified by IDs, resolved to names at runtime." + }, + "SingleLanguagesResponse": { + "properties": { + "kind": { + "type": "string", + "const": "single", + "title": "Kind", + "description": "Indicates this response contains single languages (not source-to-destination pairs).", + "default": "single" + }, + "languages": { + "items": { + "$ref": "#/components/schemas/LanguageInfo" + }, + "type": "array", + "title": "Languages", + "description": "The list of available languages." + } + }, + "type": "object", + "required": [ + "languages" + ], + "title": "SingleLanguagesResponse", + "example": { + "kind": "single", + "languages": [ + { + "code": "en", + "label": "English" + }, + { + "code": "es-ES", + "label": "Spanish (Spain)" + }, + { + "code": "fr", + "label": "French" + } + ] + } + }, + "SingleTestRunRequestModel": { + "properties": { + "test_id": { + "type": "string", + "title": "Test Id", + "description": "ID of the test to run" + }, + "workflow_node_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workflow Node Id", + "description": "ID of the workflow node to run the test on. If not provided, the test will be run on the agent's default workflow node." + }, + "root_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Root Folder Id", + "description": "ID of the root folder to run the test on. If not provided, the test will be run on the agent's default folder." + }, + "root_folder_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Root Folder Name", + "description": "Name of the root folder to run the test on. If not provided, the test will be run on the agent's default folder." + } + }, + "type": "object", + "required": [ + "test_id" + ], + "title": "SingleTestRunRequestModel" + }, + "SingleUseTokenResponseModel": { + "properties": { + "token": { + "type": "string", + "title": "Token", + "description": "A time bound single use token that expires after 15 minutes. Will be consumed on use." + } + }, + "type": "object", + "required": [ + "token" + ], + "title": "SingleUseTokenResponseModel", + "example": { + "token": "sutkn_1234567890" + } + }, + "SingleUseTokenType": { + "type": "string", + "enum": [ + "realtime_scribe", + "tts_websocket" + ], + "title": "SingleUseTokenType" + }, + "SkipTurnToolConfig": { + "properties": { + "system_tool_type": { + "type": "string", + "const": "skip_turn", + "title": "System Tool Type", + "default": "skip_turn" + } + }, + "type": "object", + "title": "SkipTurnToolConfig", + "description": "Allows the agent to explicitly skip its turn.\n\nThis tool should be invoked by the LLM when the user indicates they would like\nto think or take a short pause before continuing the conversation—e.g. when\nthey say: \"Give me a second\", \"Let me think\", or \"One moment please\". After\ncalling this tool, the assistant should not speak until the user speaks\nagain, or another normal turn-taking condition is met. The tool itself has\nno parameters and performs no side-effects other than informing the backend\nthat the current turn generation is complete." + }, + "SkipTurnToolResponseModel": { + "properties": { + "result_type": { + "type": "string", + "const": "skip_turn_success", + "title": "Result Type", + "default": "skip_turn_success" + }, + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + } + }, + "type": "object", + "title": "SkipTurnToolResponseModel" + }, + "SlackBotAuthResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "slack_bot_auth", + "title": "Auth Type", + "default": "slack_bot_auth" + }, + "provider": { + "type": "string", + "const": "Slack", + "title": "Provider", + "default": "Slack" + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "name", + "id" + ], + "title": "SlackBotAuthResponse", + "description": "Response model for the internal Slack BYO bot auth connection." + }, + "SoftTimeoutConfig": { + "properties": { + "timeout_seconds": { + "type": "number", + "title": "Timeout Seconds", + "description": "Time in seconds before showing the predefined message while waiting for LLM response. Set to -1 to disable.", + "default": -1 + }, + "message": { + "type": "string", + "maxLength": 200, + "minLength": 1, + "title": "Message", + "description": "Message to show when soft timeout is reached while waiting for LLM response", + "default": "Hhmmmm...yeah.", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "use_llm_generated_message": { + "type": "boolean", + "title": "Use Llm Generated Message", + "description": "If enabled, the soft timeout message will be generated dynamically instead of using the static message.", + "default": false + } + }, + "type": "object", + "title": "SoftTimeoutConfig", + "description": "Configuration for soft timeout functionality during LLM response generation.", + "example": { + "message": "Hhmmmm...yeah.", + "timeout_seconds": 2, + "use_llm_generated_message": false + } + }, + "SoftTimeoutConfigOverride": { + "properties": { + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message", + "description": "Message to show when soft timeout is reached while waiting for LLM response", + "x-convai-client-override": true, + "x-convai-language-override": true + } + }, + "type": "object", + "title": "SoftTimeoutConfigOverride", + "example": { + "message": "Hhmmmm...yeah." + } + }, + "SoftTimeoutConfigOverrideConfig": { + "properties": { + "message": { + "type": "boolean", + "title": "Message", + "description": "Whether to allow overriding the message field.", + "default": false + } + }, + "type": "object", + "title": "SoftTimeoutConfigOverrideConfig" + }, + "SoftTimeoutConfigWorkflowOverride": { + "properties": { + "timeout_seconds": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Timeout Seconds", + "description": "Time in seconds before showing the predefined message while waiting for LLM response. Set to -1 to disable." + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message", + "description": "Message to show when soft timeout is reached while waiting for LLM response", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "use_llm_generated_message": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Use Llm Generated Message", + "description": "If enabled, the soft timeout message will be generated dynamically instead of using the static message." + } + }, + "type": "object", + "title": "SoftTimeoutConfigWorkflowOverride", + "example": { + "message": "Hhmmmm...yeah.", + "timeout_seconds": -1, + "use_llm_generated_message": false + } + }, + "SongMetadata": { + "properties": { + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "The title of the song" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of the song" + }, + "genres": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Genres", + "description": "The genres of the song" + }, + "languages": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Languages", + "description": "The languages of the song" + }, + "is_explicit": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Explicit", + "description": "Whether the song is explicit" + } + }, + "type": "object", + "required": [ + "title", + "description", + "genres", + "languages", + "is_explicit" + ], + "title": "SongMetadata", + "example": { + "description": "My Song Description", + "genres": [ + "pop", + "rock", + "jazz" + ], + "is_explicit": false, + "languages": [ + "en", + "fr" + ], + "title": "My Song" + } + }, + "SongSection": { + "properties": { + "section_name": { + "type": "string", + "maxLength": 100, + "minLength": 1, + "title": "Section Name", + "description": "The name of the section. Must be between 1 and 100 characters." + }, + "positive_local_styles": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 50, + "title": "Positive Local Styles", + "description": "The styles and musical directions that should be present in this section. Use English language for best result." + }, + "negative_local_styles": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 50, + "title": "Negative Local Styles", + "description": "The styles and musical directions that should not be present in this section. Use English language for best result." + }, + "duration_ms": { + "type": "integer", + "maximum": 120000, + "minimum": 3000, + "title": "Duration Ms", + "description": "The duration of the section in milliseconds. Must be between 3000ms and 120000ms." + }, + "lines": { + "items": { + "type": "string", + "maxLength": 200 + }, + "type": "array", + "maxItems": 30, + "title": "Lines", + "description": "The lyrics of the section. Max 200 characters per line." + }, + "source_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/SectionSource" + }, + { + "type": "null" + } + ], + "description": "Optional source to extract the section from. Used for inpainting. Only available to enterprise clients with access to the inpainting feature." + } + }, + "type": "object", + "required": [ + "section_name", + "positive_local_styles", + "negative_local_styles", + "duration_ms", + "lines" + ], + "title": "SongSection" + }, + "SongSourceContext": { + "properties": { + "source_type": { + "type": "string", + "const": "song", + "title": "Source Type", + "default": "song" + }, + "song_id": { + "type": "string", + "title": "Song Id" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "genres": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Genres" + }, + "languages": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Languages" + }, + "is_explicit": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Explicit" + }, + "bpm": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Bpm" + }, + "generation_settings": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Generation Settings" + } + }, + "type": "object", + "required": [ + "song_id" + ], + "title": "SongSourceContext" + }, + "SortDirection": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "SortDirection" + }, + "SpeakerAudioResponseModel": { + "properties": { + "audio_base_64": { + "type": "string", + "title": "Audio Base 64", + "description": "The base64 encoded audio." + }, + "media_type": { + "type": "string", + "title": "Media Type", + "description": "The media type of the audio." + }, + "duration_secs": { + "type": "number", + "title": "Duration Secs", + "description": "The duration of the audio in seconds." + } + }, + "type": "object", + "required": [ + "audio_base_64", + "media_type", + "duration_secs" + ], + "title": "SpeakerAudioResponseModel", + "example": { + "audio_base_64": "audio_base_64", + "duration_secs": 5, + "media_type": "audio/mpeg" + } + }, + "SpeakerCreatedResponse": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + }, + "speaker_id": { + "type": "string", + "title": "Speaker Id" + } + }, + "type": "object", + "required": [ + "version", + "speaker_id" + ], + "title": "SpeakerCreatedResponse" + }, + "SpeakerResponseModel": { + "properties": { + "speaker_id": { + "type": "string", + "title": "Speaker Id", + "description": "The ID of the speaker." + }, + "duration_secs": { + "type": "number", + "title": "Duration Secs", + "description": "The duration of the speaker segment in seconds." + }, + "utterances": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/UtteranceResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Utterances", + "description": "The utterances of the speaker." + } + }, + "type": "object", + "required": [ + "speaker_id", + "duration_secs" + ], + "title": "SpeakerResponseModel", + "example": { + "duration_secs": 5, + "speaker_id": "DCwhRBWXzGAHq8TQ4Fs18" + } + }, + "SpeakerSegment": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "start_time": { + "type": "number", + "title": "Start Time" + }, + "end_time": { + "type": "number", + "title": "End Time" + }, + "text": { + "type": "string", + "title": "Text" + }, + "subtitles": { + "items": { + "$ref": "#/components/schemas/SegmentSubtitleFrame" + }, + "type": "array", + "title": "Subtitles" + }, + "dubs": { + "additionalProperties": { + "$ref": "#/components/schemas/DubbedSegment" + }, + "type": "object", + "title": "Dubs" + } + }, + "type": "object", + "required": [ + "id", + "start_time", + "end_time", + "text", + "subtitles", + "dubs" + ], + "title": "SpeakerSegment" + }, + "SpeakerSeparationResponseModel": { + "properties": { + "voice_id": { + "type": "string", + "title": "Voice Id", + "description": "The ID of the voice." + }, + "sample_id": { + "type": "string", + "title": "Sample Id", + "description": "The ID of the sample." + }, + "status": { + "type": "string", + "enum": [ + "not_started", + "pending", + "completed", + "failed" + ], + "title": "Status", + "description": "The status of the speaker separation." + }, + "speakers": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/SpeakerResponseModel" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Speakers", + "description": "The speakers of the sample." + }, + "selected_speaker_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Selected Speaker Ids", + "description": "The IDs of the selected speakers." + } + }, + "type": "object", + "required": [ + "voice_id", + "sample_id", + "status" + ], + "title": "SpeakerSeparationResponseModel", + "example": { + "sample_id": "DCwhRBWXzGAHq8TQ4Fs18", + "status": "not_started", + "voice_id": "DCwhRBWXzGAHq8TQ4Fs18" + } + }, + "SpeakerTrack": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "media_ref": { + "$ref": "#/components/schemas/DubbingMediaReference" + }, + "speaker_name": { + "type": "string", + "title": "Speaker Name" + }, + "voices": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Voices" + }, + "segments": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Segments" + } + }, + "type": "object", + "required": [ + "id", + "media_ref", + "speaker_name", + "voices", + "segments" + ], + "title": "SpeakerTrack" + }, + "SpeakerUpdatedResponse": { + "properties": { + "version": { + "type": "integer", + "title": "Version" + } + }, + "type": "object", + "required": [ + "version" + ], + "title": "SpeakerUpdatedResponse" + }, + "SpeechEngineConfig": { + "properties": { + "ws_url": { + "type": "string", + "title": "Ws Url", + "description": "The WebSocket URL for the transcript server" + }, + "request_headers": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "$ref": "#/components/schemas/ConvAIDynamicVariable" + } + ] + }, + "type": "object", + "title": "Request Headers", + "description": "Headers to include in the WebSocket connection request" + } + }, + "type": "object", + "required": [ + "ws_url" + ], + "title": "SpeechEngineConfig" + }, + "SpeechEngineConversationInitiationClientDataConfig": { + "properties": { + "first_message": { + "type": "boolean", + "title": "First Message", + "description": "Whether the first message can be overridden by the client", + "default": false + } + }, + "type": "object", + "title": "SpeechEngineConversationInitiationClientDataConfig" + }, + "SpeechEngineResponse": { + "properties": { + "speech_engine_id": { + "type": "string", + "title": "Speech Engine Id", + "description": "The speech engine resource ID" + }, + "name": { + "type": "string", + "title": "Name", + "description": "Human-readable name for the speech engine" + }, + "speech_engine": { + "$ref": "#/components/schemas/SpeechEngineConfig", + "description": "WebSocket connection settings for the upstream transcript server" + }, + "asr": { + "$ref": "#/components/schemas/ASRConversationalConfig", + "description": "Automatic speech recognition configuration" + }, + "tts": { + "$ref": "#/components/schemas/TTSConversationalConfig-Output", + "description": "Text-to-speech output configuration" + }, + "turn": { + "$ref": "#/components/schemas/BaseTurnConfig", + "description": "Turn detection configuration" + }, + "conversation": { + "$ref": "#/components/schemas/ConversationConfig-Output", + "description": "Conversation-level settings including client events and duration limits" + }, + "privacy": { + "$ref": "#/components/schemas/PrivacyConfig-Output", + "description": "Privacy settings controlling recording, retention, and PII handling" + }, + "call_limits": { + "$ref": "#/components/schemas/AgentCallLimits", + "description": "Concurrency and daily conversation limits for this speech engine" + }, + "language": { + "type": "string", + "title": "Language", + "description": "ISO language code used by the speech engine (e.g. 'en')" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tags", + "description": "Arbitrary tags for categorization and filtering" + }, + "overrides": { + "$ref": "#/components/schemas/SpeechEngineConversationInitiationClientDataConfig", + "description": "Override settings the client may set during conversation initiation" + }, + "metadata": { + "$ref": "#/components/schemas/AgentMetadataDBModel", + "description": "Creation and update timestamps with source information" + }, + "access_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + { + "type": "null" + } + ], + "description": "The access information of the speech engine for the user" + } + }, + "type": "object", + "required": [ + "speech_engine_id", + "name", + "speech_engine", + "asr", + "tts", + "turn", + "conversation", + "privacy", + "call_limits", + "language", + "tags", + "overrides", + "metadata" + ], + "title": "SpeechEngineResponse", + "example": { + "asr": { + "keywords": [], + "provider": "elevenlabs", + "quality": "high", + "user_input_audio_format": "pcm_16000" + }, + "call_limits": { + "agent_concurrency_limit": -1, + "bursting_enabled": true, + "daily_limit": 100000 + }, + "conversation": { + "client_events": [ + "audio", + "interruption", + "agent_response", + "user_transcript" + ], + "max_duration_seconds": 600 + }, + "language": "en", + "metadata": { + "created_at_unix_secs": 1714000000, + "created_from": "api", + "last_updated_from": "api", + "updated_at_unix_secs": 1714000000 + }, + "name": "My Speech Engine", + "overrides": { + "first_message": false + }, + "privacy": { + "apply_to_existing_conversations": false, + "delete_audio": false, + "delete_transcript_and_pii": false, + "record_voice": true, + "retention_days": -1, + "zero_retention_mode": false + }, + "speech_engine": { + "request_headers": {}, + "ws_url": "wss://example.com/transcript" + }, + "speech_engine_id": "seng_3701k3ttaq12ewp8b7qv5rfyszkz", + "tags": [ + "production", + "v1" + ], + "tts": { + "agent_output_audio_format": "pcm_16000", + "model_id": "eleven_flash_v2", + "optimize_streaming_latency": 3, + "similarity_boost": 0.8, + "speed": 1, + "stability": 0.5, + "voice_id": "cjVigY5qzO86Huf0OWal" + }, + "turn": { + "mode": "turn", + "silence_end_call_timeout": -1, + "turn_eagerness": "normal", + "turn_timeout": 7 + } + } + }, + "SpeechEngineSummaryResponse": { + "properties": { + "speech_engine_id": { + "type": "string", + "title": "Speech Engine Id", + "description": "The speech engine resource ID" + }, + "name": { + "type": "string", + "title": "Name", + "description": "Human-readable name for the speech engine" + }, + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs", + "description": "Creation time in Unix seconds" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tags", + "description": "Arbitrary tags for categorization and filtering" + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo", + "description": "The access information of the speech engine for the user" + } + }, + "type": "object", + "required": [ + "speech_engine_id", + "name", + "created_at_unix_secs", + "tags", + "access_info" + ], + "title": "SpeechEngineSummaryResponse", + "example": { + "access_info": { + "creator_email": "john@example.com", + "creator_name": "John Doe", + "is_creator": true, + "role": "admin" + }, + "created_at_unix_secs": 1714000000, + "name": "My Speech Engine", + "speech_engine_id": "seng_3701k3ttaq12ewp8b7qv5rfyszkz", + "tags": [ + "production", + "v1" + ] + } + }, + "SpeechHistoryItemResponseModel": { + "properties": { + "history_item_id": { + "type": "string", + "title": "History Item Id", + "description": "The ID of the history item." + }, + "request_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Request Id", + "description": "The ID of the request." + }, + "voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Id", + "description": "The ID of the voice used." + }, + "model_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Model Id", + "description": "The ID of the model." + }, + "voice_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Name", + "description": "The name of the voice." + }, + "voice_category": { + "anyOf": [ + { + "type": "string", + "enum": [ + "premade", + "cloned", + "generated", + "professional" + ] + }, + { + "type": "null" + } + ], + "title": "Voice Category", + "description": "The category of the voice. Either 'premade', 'cloned', 'generated' or 'professional'." + }, + "text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text", + "description": "The text used to generate the audio item." + }, + "date_unix": { + "type": "integer", + "title": "Date Unix", + "description": "Unix timestamp of when the item was created." + }, + "character_count_change_from": { + "type": "integer", + "title": "Character Count Change From", + "description": "The character count change from." + }, + "character_count_change_to": { + "type": "integer", + "title": "Character Count Change To", + "description": "The character count change to." + }, + "content_type": { + "type": "string", + "title": "Content Type", + "description": "The content type of the generated item." + }, + "state": { + "type": "string", + "enum": [ + "created", + "deleted", + "processing" + ], + "title": "State", + "description": "The state of the history item." + }, + "settings": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Settings", + "description": "The settings of the history item." + }, + "feedback": { + "anyOf": [ + { + "$ref": "#/components/schemas/FeedbackResponseModel" + }, + { + "type": "null" + } + ], + "description": "Feedback associated with the generated item. Returns null if no feedback has been provided." + }, + "share_link_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Share Link Id", + "description": "The ID of the share link." + }, + "source": { + "anyOf": [ + { + "type": "string", + "enum": [ + "TTS", + "STS", + "Projects", + "PD", + "AN", + "Dubbing", + "PlayAPI", + "ConvAI", + "VoiceGeneration", + "InVPC" + ] + }, + { + "type": "null" + } + ], + "title": "Source", + "description": "The source of the history item. Either TTS (text to speech), STS (speech to text), AN (audio native), Projects, Dubbing, PlayAPI, PD (pronunciation dictionary) or ConvAI (Agents Platform)." + }, + "alignments": { + "anyOf": [ + { + "$ref": "#/components/schemas/HistoryAlignmentsResponseModel" + }, + { + "type": "null" + } + ], + "description": "The alignments of the history item." + }, + "dialogue": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/DialogueInputResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Dialogue", + "description": "The dialogue (voice and text pairs) used to generate the audio item. If this is set then the top level `text` and `voice_id` fields will be empty." + }, + "output_format": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Output Format", + "description": "The output format the audio was originally generated in." + } + }, + "type": "object", + "required": [ + "history_item_id", + "date_unix", + "character_count_change_from", + "character_count_change_to", + "content_type", + "state" + ], + "title": "SpeechHistoryItemResponseModel", + "example": { + "character_count_change_from": 17189, + "character_count_change_to": 17231, + "content_type": "audio/mpeg", + "date_unix": 1714650306, + "history_item_id": "ja9xsmfGhxYcymxGcOGB", + "model_id": "eleven_multilingual_v2", + "request_id": "BF0BZg4IwLGBlaVjv9Im", + "settings": { + "similarity_boost": 0.5, + "stability": 0.71, + "style": 0, + "use_speaker_boost": true + }, + "source": "TTS", + "state": "created", + "text": "Hello, world!", + "voice_category": "premade", + "voice_id": "21m00Tcm4TlvDq8ikWAM", + "voice_name": "Rachel" + } + }, + "SpeechToTextCharacterResponseModel": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The character that was transcribed." + }, + "start": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Start", + "description": "The start time of the character in seconds." + }, + "end": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "End", + "description": "The end time of the character in seconds." + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "SpeechToTextCharacterResponseModel", + "example": { + "end": 0.1, + "start": 0, + "text": "H" + } + }, + "SpeechToTextChunkResponseModel": { + "properties": { + "language_code": { + "type": "string", + "title": "Language Code", + "description": "The detected language code (e.g. 'eng' for English)." + }, + "language_probability": { + "type": "number", + "title": "Language Probability", + "description": "The confidence score of the language detection (0 to 1)." + }, + "text": { + "type": "string", + "title": "Text", + "description": "The raw text of the transcription." + }, + "words": { + "items": { + "$ref": "#/components/schemas/SpeechToTextWordResponseModel" + }, + "type": "array", + "title": "Words", + "description": "List of words with their timing information." + }, + "channel_index": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Channel Index", + "description": "The channel index this transcript belongs to (for multichannel audio)." + }, + "additional_formats": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/AdditionalFormatResponseModel" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Additional Formats", + "description": "Requested additional formats of the transcript." + }, + "transcription_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Transcription Id", + "description": "The transcription ID of the response." + }, + "entities": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/DetectedEntity" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Entities", + "description": "List of detected entities with their text, type, and character positions in the transcript." + }, + "audio_duration_secs": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Audio Duration Secs", + "description": "The duration of the audio that was transcribed in seconds." + } + }, + "type": "object", + "required": [ + "language_code", + "language_probability", + "text", + "words" + ], + "title": "SpeechToTextChunkResponseModel", + "description": "Chunk-level detail of the transcription with timing information.", + "example": { + "language_code": "en", + "language_probability": 0.98, + "text": "Hello world!", + "words": [ + { + "end": 0.5, + "logprob": -0.124, + "speaker_id": "speaker_1", + "start": 0, + "text": "Hello", + "type": "word" + }, + { + "end": 0.5, + "logprob": 0, + "speaker_id": "speaker_1", + "start": 0.5, + "text": " ", + "type": "spacing" + }, + { + "end": 1.2, + "logprob": -0.089, + "speaker_id": "speaker_1", + "start": 0.5, + "text": "world!", + "type": "word" + } + ] + } + }, + "SpeechToTextWebhookResponseModel": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "description": "The message of the webhook response." + }, + "request_id": { + "type": "string", + "title": "Request Id", + "description": "The request ID of the webhook response." + }, + "transcription_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Transcription Id", + "description": "The transcription ID of the webhook response." + } + }, + "type": "object", + "required": [ + "message", + "request_id" + ], + "title": "SpeechToTextWebhookResponseModel", + "example": { + "message": "Request accepted. Transcription result will be sent to the webhook endpoint.", + "request_id": "1234567890" + } + }, + "SpeechToTextWordResponseModel": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The word or sound that was transcribed." + }, + "start": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Start", + "description": "The start time of the word or sound in seconds." + }, + "end": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "End", + "description": "The end time of the word or sound in seconds." + }, + "type": { + "type": "string", + "enum": [ + "word", + "spacing", + "audio_event" + ], + "title": "Type", + "description": "The type of the word or sound. 'audio_event' is used for non-word sounds like laughter or footsteps." + }, + "speaker_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Speaker Id", + "description": "Unique identifier for the speaker of this word." + }, + "logprob": { + "type": "number", + "title": "Logprob", + "description": "The log of the probability with which this word was predicted. Logprobs are in range [-infinity, 0], higher logprobs indicate a higher confidence the model has in its predictions." + }, + "characters": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SpeechToTextCharacterResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Characters", + "description": "The characters that make up the word and their timing information." + } + }, + "type": "object", + "required": [ + "text", + "type", + "logprob" + ], + "title": "SpeechToTextWordResponseModel", + "description": "Word-level detail of the transcription with timing information.", + "example": { + "characters": [ + { + "end": 0.1, + "start": 0, + "text": "H" + }, + { + "end": 0.2, + "start": 0.1, + "text": "e" + }, + { + "end": 0.3, + "start": 0.2, + "text": "l" + }, + { + "end": 0.4, + "start": 0.3, + "text": "l" + }, + { + "end": 0.5, + "start": 0.4, + "text": "o" + } + ], + "end": 0.5, + "logprob": -0.124, + "speaker_id": "speaker_1", + "start": 0, + "text": "Hello", + "type": "word" + } + }, + "SpellingPatience": { + "type": "string", + "enum": [ + "auto", + "off" + ], + "title": "SpellingPatience", + "description": "Controls if the agent should be more patient when user is spelling numbers and named entities.", + "default": "auto" + }, + "SrtExportOptions": { + "properties": { + "max_characters_per_line": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Characters Per Line", + "default": 42 + }, + "include_speakers": { + "type": "boolean", + "title": "Include Speakers", + "default": false + }, + "include_timestamps": { + "type": "boolean", + "title": "Include Timestamps", + "default": true + }, + "format": { + "type": "string", + "const": "srt", + "title": "Format" + }, + "segment_on_silence_longer_than_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Segment On Silence Longer Than S", + "default": 0.8 + }, + "max_segment_duration_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Segment Duration S", + "default": 4 + }, + "max_segment_chars": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Segment Chars", + "default": 84 + } + }, + "type": "object", + "required": [ + "format" + ], + "title": "SrtExportOptions" + }, + "StartPVCVoiceTrainingResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the start PVC voice training request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "StartPVCVoiceTrainingResponseModel", + "example": { + "status": "ok" + } + }, + "StartSpeakerSeparationResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the start speaker seperation request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "StartSpeakerSeparationResponseModel", + "example": { + "status": "ok" + } + }, + "StatusId": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 99 + ], + "title": "StatusId", + "description": "OCSF Status levels.\n\nSpec: https://schema.ocsf.io/1.6.0/objects/status_id" + }, + "StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel": { + "properties": { + "audio_base64": { + "type": "string", + "title": "Audio Base64", + "description": "Base64 encoded audio data" + }, + "alignment": { + "anyOf": [ + { + "$ref": "#/components/schemas/CharacterAlignmentResponseModel" + }, + { + "type": "null" + } + ], + "description": "Timestamp information for each character in the original text" + }, + "normalized_alignment": { + "anyOf": [ + { + "$ref": "#/components/schemas/CharacterAlignmentResponseModel" + }, + { + "type": "null" + } + ], + "description": "Timestamp information for each character in the normalized text" + }, + "voice_segments": { + "items": { + "$ref": "#/components/schemas/VoiceSegment" + }, + "type": "array", + "title": "Voice Segments", + "description": "Voice segments for the audio" + } + }, + "type": "object", + "required": [ + "audio_base64", + "voice_segments" + ], + "title": "StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel", + "example": { + "alignment": { + "character_end_times_seconds": [ + 0.1, + 0.2 + ], + "character_start_times_seconds": [ + 0, + 0.1 + ], + "characters": [ + "H", + "e" + ] + }, + "audio_base64": "base64_encoded_audio_chunk", + "normalized_alignment": { + "character_end_times_seconds": [ + 0.1, + 0.2 + ], + "character_start_times_seconds": [ + 0, + 0.1 + ], + "characters": [ + "H", + "e" + ] + }, + "voice_segments": [ + { + "character_end_index": 2, + "character_start_index": 0, + "dialogue_input_index": 0, + "end_time_seconds": 0.2, + "start_time_seconds": 0, + "voice_id": "VEDscrYI8uIMttlO2Ztu" + } + ] + } + }, + "StreamingAudioChunkWithTimestampsResponseModel": { + "properties": { + "audio_base64": { + "type": "string", + "title": "Audio Base64", + "description": "Base64 encoded audio data" + }, + "alignment": { + "anyOf": [ + { + "$ref": "#/components/schemas/CharacterAlignmentResponseModel" + }, + { + "type": "null" + } + ], + "description": "Timestamp information for each character in the original text" + }, + "normalized_alignment": { + "anyOf": [ + { + "$ref": "#/components/schemas/CharacterAlignmentResponseModel" + }, + { + "type": "null" + } + ], + "description": "Timestamp information for each character in the normalized text" + } + }, + "type": "object", + "required": [ + "audio_base64" + ], + "title": "StreamingAudioChunkWithTimestampsResponseModel", + "example": { + "alignment": { + "character_end_times_seconds": [ + 0.1, + 0.2 + ], + "character_start_times_seconds": [ + 0, + 0.1 + ], + "characters": [ + "H", + "e" + ] + }, + "audio_base64": "base64_encoded_audio_chunk", + "normalized_alignment": { + "character_end_times_seconds": [ + 0.1, + 0.2 + ], + "character_start_times_seconds": [ + 0, + 0.1 + ], + "characters": [ + "H", + "e" + ] + } + } + }, + "StudioAgentSettingsModel": { + "properties": { + "tool_settings": { + "additionalProperties": { + "$ref": "#/components/schemas/StudioAgentToolSettingsModel" + }, + "type": "object", + "title": "Tool Settings" + } + }, + "type": "object", + "title": "StudioAgentSettingsModel" + }, + "StudioAgentToolSettingsModel": { + "properties": { + "skip_confirmation": { + "type": "boolean", + "title": "Skip Confirmation", + "default": false + } + }, + "type": "object", + "title": "StudioAgentToolSettingsModel" + }, + "StudioClipReference": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "chapter_id": { + "type": "string", + "title": "Chapter Id" + }, + "clip_type": { + "type": "string", + "enum": [ + "video", + "image", + "external_audio", + "tts_node" + ], + "title": "Clip Type" + }, + "clip_id": { + "type": "string", + "title": "Clip Id" + }, + "block_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Block Id" + }, + "preview_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Preview Url" + } + }, + "type": "object", + "required": [ + "project_id", + "chapter_id", + "clip_type", + "clip_id" + ], + "title": "StudioClipReference" + }, + "StudioTextStyleOutlineModel": { + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled" + }, + "color": { + "type": "string", + "title": "Color" + }, + "opacity": { + "type": "number", + "title": "Opacity" + }, + "width": { + "type": "number", + "title": "Width" + } + }, + "type": "object", + "required": [ + "enabled", + "color", + "opacity", + "width" + ], + "title": "StudioTextStyleOutlineModel" + }, + "StudioTextStyleShadowModel": { + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled" + }, + "color": { + "type": "string", + "title": "Color" + }, + "opacity": { + "type": "number", + "title": "Opacity" + }, + "blur": { + "type": "number", + "title": "Blur" + }, + "offset_x": { + "type": "number", + "title": "Offset X" + }, + "offset_y": { + "type": "number", + "title": "Offset Y" + } + }, + "type": "object", + "required": [ + "enabled", + "color", + "opacity", + "blur", + "offset_x", + "offset_y" + ], + "title": "StudioTextStyleShadowModel" + }, + "SubmitOrderResponse": { + "properties": { + "order_id": { + "$ref": "#/components/schemas/OrderId", + "description": "The ID of the submitted order." + }, + "state": { + "$ref": "#/components/schemas/OrderState", + "description": "The current state of the order after submission." + }, + "submitted_at": { + "type": "string", + "format": "date-time", + "title": "Submitted At", + "description": "The timestamp when the order was submitted." + } + }, + "type": "object", + "required": [ + "order_id", + "state", + "submitted_at" + ], + "title": "SubmitOrderResponse", + "example": { + "order_id": "prodorder_01jgatk6h0fwxrtbjade61yqhx", + "state": "submitted", + "submitted_at": "2025-03-15T10:30:00Z" + } + }, + "SubscriptionResponseModel": { + "properties": { + "tier": { + "type": "string", + "title": "Tier", + "description": "The tier of the user's subscription." + }, + "character_count": { + "type": "integer", + "title": "Character Count", + "description": "The number of characters used by the user." + }, + "character_limit": { + "type": "integer", + "title": "Character Limit", + "description": "The maximum number of characters allowed in the current billing period." + }, + "max_character_limit_extension": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Character Limit Extension", + "description": "Deprecated: use `max_credit_limit_extension`. Maximum number of characters that the character limit can be exceeded by. Managed by the workspace admin." + }, + "max_credit_limit_extension": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string", + "const": "unlimited" + } + ], + "title": "Max Credit Limit Extension", + "description": "Maximum number of credits that the credit limit can be exceeded by. Managed by the workspace admin. `\"unlimited\"` means no cap, `0` means usage-based billing is disabled." + }, + "can_extend_character_limit": { + "type": "boolean", + "title": "Can Extend Character Limit", + "description": "Whether the workspace is entitled to enter overages (usage-based billing)." + }, + "allowed_to_extend_character_limit": { + "type": "boolean", + "title": "Allowed To Extend Character Limit", + "description": "Deprecated: use `max_credit_limit_extension != 0`. Whether the user is allowed to extend their character limit." + }, + "next_character_count_reset_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Next Character Count Reset Unix", + "description": "The Unix timestamp of the next character count reset." + }, + "voice_slots_used": { + "type": "integer", + "title": "Voice Slots Used", + "description": "The number of voice slots used by the user." + }, + "professional_voice_slots_used": { + "type": "integer", + "title": "Professional Voice Slots Used", + "description": "The number of professional voice slots used by the workspace/user if single seat." + }, + "voice_limit": { + "type": "integer", + "title": "Voice Limit", + "description": "The maximum number of voice slots allowed for the user." + }, + "max_voice_add_edits": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Voice Add Edits", + "description": "The maximum number of voice add/edits allowed for the user." + }, + "voice_add_edit_counter": { + "type": "integer", + "title": "Voice Add Edit Counter", + "description": "The number of voice add/edits used by the user." + }, + "professional_voice_limit": { + "type": "integer", + "title": "Professional Voice Limit", + "description": "The maximum number of professional voices allowed for the user." + }, + "can_extend_voice_limit": { + "type": "boolean", + "title": "Can Extend Voice Limit", + "description": "Whether the user can extend their voice limit." + }, + "can_use_instant_voice_cloning": { + "type": "boolean", + "title": "Can Use Instant Voice Cloning", + "description": "Whether the user can use instant voice cloning." + }, + "can_use_professional_voice_cloning": { + "type": "boolean", + "title": "Can Use Professional Voice Cloning", + "description": "Whether the user can use professional voice cloning." + }, + "currency": { + "anyOf": [ + { + "$ref": "#/components/schemas/Currency" + }, + { + "type": "null" + } + ], + "description": "The currency of the user's subscription." + }, + "current_overage": { + "$ref": "#/components/schemas/Price", + "description": "The current usage-based overage cost." + }, + "status": { + "$ref": "#/components/schemas/SubscriptionStatusType", + "description": "The status of the user's subscription." + }, + "billing_period": { + "anyOf": [ + { + "$ref": "#/components/schemas/BillingPeriod" + }, + { + "type": "null" + } + ], + "description": "The billing period of the user's subscription." + }, + "character_refresh_period": { + "anyOf": [ + { + "$ref": "#/components/schemas/CharacterRefreshPeriod" + }, + { + "type": "null" + } + ], + "description": "The character refresh period of the user's subscription." + } + }, + "type": "object", + "required": [ + "tier", + "character_count", + "character_limit", + "max_character_limit_extension", + "max_credit_limit_extension", + "can_extend_character_limit", + "allowed_to_extend_character_limit", + "voice_slots_used", + "professional_voice_slots_used", + "voice_limit", + "voice_add_edit_counter", + "professional_voice_limit", + "can_extend_voice_limit", + "can_use_instant_voice_cloning", + "can_use_professional_voice_cloning", + "current_overage", + "status" + ], + "title": "SubscriptionResponseModel", + "example": { + "allowed_to_extend_character_limit": false, + "billing_period": "monthly_period", + "can_extend_character_limit": false, + "can_extend_voice_limit": false, + "can_use_instant_voice_cloning": true, + "can_use_professional_voice_cloning": true, + "character_count": 17231, + "character_limit": 100000, + "character_refresh_period": "monthly_period", + "currency": "usd", + "current_overage": { + "amount": "0", + "currency": "usd" + }, + "max_character_limit_extension": 10000, + "max_credit_limit_extension": 10000, + "max_voice_add_edits": 230, + "next_character_count_reset_unix": 1738356858, + "professional_voice_limit": 1, + "professional_voice_slots_used": 0, + "status": "free", + "tier": "trial", + "voice_add_edit_counter": 212, + "voice_limit": 120, + "voice_slots_used": 1 + } + }, + "SubscriptionStatusType": { + "type": "string", + "enum": [ + "trialing", + "active", + "incomplete", + "past_due", + "free", + "free_disabled" + ], + "title": "SubscriptionStatusType" + }, + "SubtitleOrderItemRequest": { + "properties": { + "kind": { + "type": "string", + "const": "subtitles", + "title": "Kind", + "description": "The type of order item.", + "default": "subtitles" + }, + "media_ids": { + "items": { + "$ref": "#/components/schemas/MediaId" + }, + "type": "array", + "title": "Media Ids", + "description": "The IDs of the uploaded media files to generate subtitles for." + }, + "source_language": { + "type": "string", + "title": "Source Language", + "description": "The language code of the source media (e.g. 'en', 'es')." + }, + "destination_languages": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Destination Languages", + "description": "List of target language codes. Subtitles will be generated for each media file in each destination language." + }, + "cue_options": { + "$ref": "#/components/schemas/CueOptionsRequest", + "description": "Formatting options for subtitle cues such as duration, line count, and character limits." + }, + "sdh": { + "type": "boolean", + "title": "Sdh", + "description": "Whether subtitles should use SDH format, which includes descriptions for deaf and hard-of-hearing viewers.", + "default": false + }, + "instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Instructions", + "description": "Optional free-text instructions for the subtitling team." + } + }, + "type": "object", + "required": [ + "media_ids", + "source_language", + "destination_languages" + ], + "title": "SubtitleOrderItemRequest", + "example": { + "cue_options": { + "max_chars_per_line": 42, + "max_duration_ms": 7000, + "max_lines_per_cue": 2, + "min_duration_ms": 1000 + }, + "destination_languages": [ + "hi", + "fr-FR", + "de" + ], + "instructions": "Keep reading speed moderate; preserve humor in idioms.", + "kind": "subtitles", + "media_ids": [ + "prodmedia_01jgatk6h0fwxrtbjade61yqhx", + "prodmedia_01jgb2zd68f8f9tfvbb968wb8z" + ], + "sdh": false, + "source_language": "en" + } + }, + "SuggestedAudioTag": { + "properties": { + "tag": { + "type": "string", + "maxLength": 30, + "minLength": 1, + "title": "Tag", + "description": "Audio tag to use (for best performance, 1-2 words, e.g., 'happy', 'excited')" + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 200 + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Optional description of when to use this tag" + } + }, + "type": "object", + "required": [ + "tag" + ], + "title": "SuggestedAudioTag" + }, + "SupportedVoice": { + "properties": { + "label": { + "type": "string", + "minLength": 1, + "title": "Label" + }, + "voice_id": { + "type": "string", + "minLength": 1, + "title": "Voice Id" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language" + }, + "model_family": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSModelFamily" + }, + { + "type": "null" + } + ] + }, + "optimize_streaming_latency": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSOptimizeStreamingLatency" + }, + { + "type": "null" + } + ] + }, + "stability": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Stability" + }, + "speed": { + "anyOf": [ + { + "type": "number", + "maximum": 1.2, + "minimum": 0.7 + }, + { + "type": "null" + } + ], + "title": "Speed" + }, + "similarity_boost": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Similarity Boost" + } + }, + "type": "object", + "required": [ + "label", + "voice_id" + ], + "title": "SupportedVoice" + }, + "SystemToolConfig-Input": { + "properties": { + "type": { + "type": "string", + "const": "system", + "title": "Type", + "description": "The type of tool", + "default": "system" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does. Leave empty to use the default description that's optimized for the specific tool type.", + "default": "" + }, + "response_timeout_secs": { + "type": "integer", + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete.", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "params": { + "oneOf": [ + { + "$ref": "#/components/schemas/EndCallToolConfig" + }, + { + "$ref": "#/components/schemas/LanguageDetectionToolConfig" + }, + { + "$ref": "#/components/schemas/TransferToAgentToolConfig" + }, + { + "$ref": "#/components/schemas/TransferToNumberToolConfig-Input" + }, + { + "$ref": "#/components/schemas/SkipTurnToolConfig" + }, + { + "$ref": "#/components/schemas/PlayDTMFToolConfig" + }, + { + "$ref": "#/components/schemas/VoicemailDetectionToolConfig" + }, + { + "$ref": "#/components/schemas/KnowledgeBaseRagToolConfig" + }, + { + "$ref": "#/components/schemas/LoadProcedureToolConfig" + } + ], + "title": "Params", + "discriminator": { + "propertyName": "system_tool_type", + "mapping": { + "end_call": "#/components/schemas/EndCallToolConfig", + "knowledge_base_rag": "#/components/schemas/KnowledgeBaseRagToolConfig", + "language_detection": "#/components/schemas/LanguageDetectionToolConfig", + "load_procedure": "#/components/schemas/LoadProcedureToolConfig", + "play_keypad_touch_tone": "#/components/schemas/PlayDTMFToolConfig", + "skip_turn": "#/components/schemas/SkipTurnToolConfig", + "transfer_to_agent": "#/components/schemas/TransferToAgentToolConfig", + "transfer_to_number": "#/components/schemas/TransferToNumberToolConfig-Input", + "voicemail_detection": "#/components/schemas/VoicemailDetectionToolConfig" + } + } + } + }, + "type": "object", + "required": [ + "name", + "params" + ], + "title": "SystemToolConfig", + "description": "A system tool is a tool that is used to call a system method in the server", + "examples": [ + { + "description": "", + "name": "end_call", + "params": { + "system_tool_type": "end_call" + }, + "type": "system" + }, + { + "description": "Custom description for specific use case", + "name": "transfer_to_agent", + "params": { + "system_tool_type": "transfer_to_agent", + "transfers": [] + }, + "type": "system" + } + ] + }, + "SystemToolConfig-Output": { + "properties": { + "type": { + "type": "string", + "const": "system", + "title": "Type", + "description": "The type of tool", + "default": "system" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does. Leave empty to use the default description that's optimized for the specific tool type.", + "default": "" + }, + "response_timeout_secs": { + "type": "integer", + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete.", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "params": { + "oneOf": [ + { + "$ref": "#/components/schemas/EndCallToolConfig" + }, + { + "$ref": "#/components/schemas/LanguageDetectionToolConfig" + }, + { + "$ref": "#/components/schemas/TransferToAgentToolConfig" + }, + { + "$ref": "#/components/schemas/TransferToNumberToolConfig-Output" + }, + { + "$ref": "#/components/schemas/SkipTurnToolConfig" + }, + { + "$ref": "#/components/schemas/PlayDTMFToolConfig" + }, + { + "$ref": "#/components/schemas/VoicemailDetectionToolConfig" + }, + { + "$ref": "#/components/schemas/KnowledgeBaseRagToolConfig" + }, + { + "$ref": "#/components/schemas/LoadProcedureToolConfig" + } + ], + "title": "Params", + "discriminator": { + "propertyName": "system_tool_type", + "mapping": { + "end_call": "#/components/schemas/EndCallToolConfig", + "knowledge_base_rag": "#/components/schemas/KnowledgeBaseRagToolConfig", + "language_detection": "#/components/schemas/LanguageDetectionToolConfig", + "load_procedure": "#/components/schemas/LoadProcedureToolConfig", + "play_keypad_touch_tone": "#/components/schemas/PlayDTMFToolConfig", + "skip_turn": "#/components/schemas/SkipTurnToolConfig", + "transfer_to_agent": "#/components/schemas/TransferToAgentToolConfig", + "transfer_to_number": "#/components/schemas/TransferToNumberToolConfig-Output", + "voicemail_detection": "#/components/schemas/VoicemailDetectionToolConfig" + } + } + } + }, + "type": "object", + "required": [ + "name", + "params" + ], + "title": "SystemToolConfig", + "description": "A system tool is a tool that is used to call a system method in the server", + "examples": [ + { + "description": "", + "name": "end_call", + "params": { + "system_tool_type": "end_call" + }, + "type": "system" + }, + { + "description": "Custom description for specific use case", + "name": "transfer_to_agent", + "params": { + "system_tool_type": "transfer_to_agent", + "transfers": [] + }, + "type": "system" + } + ] + }, + "TTSConversationalConfig-Input": { + "properties": { + "model_id": { + "$ref": "#/components/schemas/TTSConversationalModel", + "description": "The model to use for TTS", + "default": "eleven_flash_v2" + }, + "voice_id": { + "type": "string", + "minLength": 0, + "title": "Voice Id", + "description": "The voice ID to use for TTS", + "default": "cjVigY5qzO86Huf0OWal", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "supported_voices": { + "items": { + "$ref": "#/components/schemas/SupportedVoice" + }, + "type": "array", + "title": "Supported Voices", + "description": "Additional supported voices for the agent" + }, + "expressive_mode": { + "type": "boolean", + "title": "Expressive Mode", + "description": "When enabled, applies expressive audio tags prompt. Automatically disabled for non-v3 models.", + "default": true + }, + "suggested_audio_tags": { + "items": { + "$ref": "#/components/schemas/SuggestedAudioTag" + }, + "type": "array", + "maxItems": 20, + "title": "Suggested Audio Tags", + "description": "Suggested audio tags to boost expressive speech (for eleven_v3 and eleven_v3_conversational models). The agent can still use other tags not listed here." + }, + "agent_output_audio_format": { + "$ref": "#/components/schemas/TTSOutputFormat", + "description": "The audio format to use for TTS", + "default": "pcm_16000" + }, + "optimize_streaming_latency": { + "$ref": "#/components/schemas/TTSOptimizeStreamingLatency", + "description": "The optimization for streaming latency", + "default": 3 + }, + "stability": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Stability", + "description": "The stability of generated speech", + "default": 0.5, + "x-convai-client-override": true + }, + "speed": { + "type": "number", + "maximum": 1.2, + "minimum": 0.7, + "title": "Speed", + "description": "The speed of generated speech", + "default": 1, + "x-convai-client-override": true + }, + "similarity_boost": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Similarity Boost", + "description": "The similarity boost for generated speech", + "default": 0.8, + "x-convai-client-override": true + }, + "text_normalisation_type": { + "$ref": "#/components/schemas/TextNormalisationType", + "description": "Method for converting numbers to words before converting text to speech. If set to SYSTEM_PROMPT, the system prompt will be updated to include normalization instructions. If set to ELEVENLABS, the text will be normalized after generation, incurring slight additional latency.", + "default": "system_prompt" + }, + "pronunciation_dictionary_locators": { + "items": { + "$ref": "#/components/schemas/PydanticPronunciationDictionaryVersionLocator" + }, + "type": "array", + "title": "Pronunciation Dictionary Locators", + "description": "The pronunciation dictionary locators" + } + }, + "type": "object", + "title": "TTSConversationalConfig", + "example": { + "agent_output_audio_format": "pcm_16000", + "model_id": "eleven_turbo_v2", + "optimize_streaming_latency": 3, + "pronunciation_dictionary_locators": [], + "similarity_boost": 0.8, + "speed": 1, + "stability": 0.5, + "voice_id": "cjVigY5qzO86Huf0OWal" + } + }, + "TTSConversationalConfig-Output": { + "properties": { + "model_id": { + "$ref": "#/components/schemas/TTSConversationalModel", + "description": "The model to use for TTS", + "default": "eleven_flash_v2" + }, + "voice_id": { + "type": "string", + "minLength": 0, + "title": "Voice Id", + "description": "The voice ID to use for TTS", + "default": "cjVigY5qzO86Huf0OWal", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "supported_voices": { + "items": { + "$ref": "#/components/schemas/SupportedVoice" + }, + "type": "array", + "title": "Supported Voices", + "description": "Additional supported voices for the agent" + }, + "expressive_mode": { + "type": "boolean", + "title": "Expressive Mode", + "description": "When enabled, applies expressive audio tags prompt. Automatically disabled for non-v3 models.", + "default": true + }, + "suggested_audio_tags": { + "items": { + "$ref": "#/components/schemas/SuggestedAudioTag" + }, + "type": "array", + "maxItems": 20, + "title": "Suggested Audio Tags", + "description": "Suggested audio tags to boost expressive speech (for eleven_v3 and eleven_v3_conversational models). The agent can still use other tags not listed here." + }, + "agent_output_audio_format": { + "$ref": "#/components/schemas/TTSOutputFormat", + "description": "The audio format to use for TTS", + "default": "pcm_16000" + }, + "optimize_streaming_latency": { + "$ref": "#/components/schemas/TTSOptimizeStreamingLatency", + "description": "The optimization for streaming latency", + "default": 3 + }, + "stability": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Stability", + "description": "The stability of generated speech", + "default": 0.5, + "x-convai-client-override": true + }, + "speed": { + "type": "number", + "maximum": 1.2, + "minimum": 0.7, + "title": "Speed", + "description": "The speed of generated speech", + "default": 1, + "x-convai-client-override": true + }, + "similarity_boost": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Similarity Boost", + "description": "The similarity boost for generated speech", + "default": 0.8, + "x-convai-client-override": true + }, + "text_normalisation_type": { + "$ref": "#/components/schemas/TextNormalisationType", + "description": "Method for converting numbers to words before converting text to speech. If set to SYSTEM_PROMPT, the system prompt will be updated to include normalization instructions. If set to ELEVENLABS, the text will be normalized after generation, incurring slight additional latency.", + "default": "system_prompt" + }, + "pronunciation_dictionary_locators": { + "items": { + "$ref": "#/components/schemas/PydanticPronunciationDictionaryVersionLocator" + }, + "type": "array", + "title": "Pronunciation Dictionary Locators", + "description": "The pronunciation dictionary locators" + } + }, + "type": "object", + "title": "TTSConversationalConfig", + "example": { + "agent_output_audio_format": "pcm_16000", + "model_id": "eleven_turbo_v2", + "optimize_streaming_latency": 3, + "pronunciation_dictionary_locators": [], + "similarity_boost": 0.8, + "speed": 1, + "stability": 0.5, + "voice_id": "cjVigY5qzO86Huf0OWal" + } + }, + "TTSConversationalConfigOverride": { + "properties": { + "voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Id", + "description": "The voice ID to use for TTS", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "stability": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Stability", + "description": "The stability of generated speech", + "x-convai-client-override": true + }, + "speed": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Speed", + "description": "The speed of generated speech", + "x-convai-client-override": true + }, + "similarity_boost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Similarity Boost", + "description": "The similarity boost for generated speech", + "x-convai-client-override": true + } + }, + "type": "object", + "title": "TTSConversationalConfigOverride", + "example": { + "similarity_boost": 0.8, + "speed": 1, + "stability": 0.5, + "voice_id": "cjVigY5qzO86Huf0OWal" + } + }, + "TTSConversationalConfigOverrideConfig": { + "properties": { + "voice_id": { + "type": "boolean", + "title": "Voice Id", + "description": "Whether to allow overriding the voice_id field.", + "default": false + }, + "stability": { + "type": "boolean", + "title": "Stability", + "description": "Whether to allow overriding the stability field.", + "default": false + }, + "speed": { + "type": "boolean", + "title": "Speed", + "description": "Whether to allow overriding the speed field.", + "default": false + }, + "similarity_boost": { + "type": "boolean", + "title": "Similarity Boost", + "description": "Whether to allow overriding the similarity_boost field.", + "default": false + } + }, + "type": "object", + "title": "TTSConversationalConfigOverrideConfig" + }, + "TTSConversationalConfigWorkflowOverride-Input": { + "properties": { + "model_id": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSConversationalModel" + }, + { + "type": "null" + } + ], + "description": "The model to use for TTS" + }, + "voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Id", + "description": "The voice ID to use for TTS", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "supported_voices": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SupportedVoice" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Supported Voices", + "description": "Additional supported voices for the agent" + }, + "expressive_mode": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Expressive Mode", + "description": "When enabled, applies expressive audio tags prompt. Automatically disabled for non-v3 models." + }, + "suggested_audio_tags": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SuggestedAudioTag" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Suggested Audio Tags", + "description": "Suggested audio tags to boost expressive speech (for eleven_v3 and eleven_v3_conversational models). The agent can still use other tags not listed here." + }, + "agent_output_audio_format": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSOutputFormat" + }, + { + "type": "null" + } + ], + "description": "The audio format to use for TTS" + }, + "optimize_streaming_latency": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSOptimizeStreamingLatency" + }, + { + "type": "null" + } + ], + "description": "The optimization for streaming latency" + }, + "stability": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Stability", + "description": "The stability of generated speech", + "x-convai-client-override": true + }, + "speed": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Speed", + "description": "The speed of generated speech", + "x-convai-client-override": true + }, + "similarity_boost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Similarity Boost", + "description": "The similarity boost for generated speech", + "x-convai-client-override": true + }, + "text_normalisation_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextNormalisationType" + }, + { + "type": "null" + } + ], + "description": "Method for converting numbers to words before converting text to speech. If set to SYSTEM_PROMPT, the system prompt will be updated to include normalization instructions. If set to ELEVENLABS, the text will be normalized after generation, incurring slight additional latency." + }, + "pronunciation_dictionary_locators": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PydanticPronunciationDictionaryVersionLocator" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Pronunciation Dictionary Locators", + "description": "The pronunciation dictionary locators" + } + }, + "type": "object", + "title": "TTSConversationalConfigWorkflowOverride", + "example": { + "agent_output_audio_format": "pcm_16000", + "model_id": "eleven_turbo_v2", + "optimize_streaming_latency": 3, + "pronunciation_dictionary_locators": [], + "similarity_boost": 0.8, + "speed": 1, + "stability": 0.5, + "voice_id": "cjVigY5qzO86Huf0OWal" + } + }, + "TTSConversationalConfigWorkflowOverride-Output": { + "properties": { + "model_id": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSConversationalModel" + }, + { + "type": "null" + } + ], + "description": "The model to use for TTS" + }, + "voice_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Id", + "description": "The voice ID to use for TTS", + "x-convai-client-override": true, + "x-convai-language-override": true + }, + "supported_voices": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SupportedVoice" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Supported Voices", + "description": "Additional supported voices for the agent" + }, + "expressive_mode": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Expressive Mode", + "description": "When enabled, applies expressive audio tags prompt. Automatically disabled for non-v3 models." + }, + "suggested_audio_tags": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SuggestedAudioTag" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Suggested Audio Tags", + "description": "Suggested audio tags to boost expressive speech (for eleven_v3 and eleven_v3_conversational models). The agent can still use other tags not listed here." + }, + "agent_output_audio_format": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSOutputFormat" + }, + { + "type": "null" + } + ], + "description": "The audio format to use for TTS" + }, + "optimize_streaming_latency": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSOptimizeStreamingLatency" + }, + { + "type": "null" + } + ], + "description": "The optimization for streaming latency" + }, + "stability": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Stability", + "description": "The stability of generated speech", + "x-convai-client-override": true + }, + "speed": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Speed", + "description": "The speed of generated speech", + "x-convai-client-override": true + }, + "similarity_boost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Similarity Boost", + "description": "The similarity boost for generated speech", + "x-convai-client-override": true + }, + "text_normalisation_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextNormalisationType" + }, + { + "type": "null" + } + ], + "description": "Method for converting numbers to words before converting text to speech. If set to SYSTEM_PROMPT, the system prompt will be updated to include normalization instructions. If set to ELEVENLABS, the text will be normalized after generation, incurring slight additional latency." + }, + "pronunciation_dictionary_locators": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PydanticPronunciationDictionaryVersionLocator" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Pronunciation Dictionary Locators", + "description": "The pronunciation dictionary locators" + } + }, + "type": "object", + "title": "TTSConversationalConfigWorkflowOverride", + "example": { + "agent_output_audio_format": "pcm_16000", + "model_id": "eleven_turbo_v2", + "optimize_streaming_latency": 3, + "pronunciation_dictionary_locators": [], + "similarity_boost": 0.8, + "speed": 1, + "stability": 0.5, + "voice_id": "cjVigY5qzO86Huf0OWal" + } + }, + "TTSConversationalModel": { + "type": "string", + "enum": [ + "eleven_turbo_v2", + "eleven_turbo_v2_5", + "eleven_flash_v2", + "eleven_flash_v2_5", + "eleven_multilingual_v2", + "eleven_v3_conversational" + ], + "title": "TTSConversationalModel", + "x-fern-enum": { + "eleven_turbo_v2": { + "description": "Deprecated: Use eleven_flash_v2 instead.", + "deprecated": true + }, + "eleven_turbo_v2_5": { + "description": "Deprecated: Use eleven_flash_v2_5 instead.", + "deprecated": true + } + }, + "default": "eleven_flash_v2" + }, + "TTSModelFamily": { + "type": "string", + "enum": [ + "turbo", + "flash", + "multilingual", + "v3_conversational" + ], + "title": "TTSModelFamily", + "x-fern-enum": { + "turbo": { + "description": "Deprecated: Use flash instead.", + "deprecated": true + } + } + }, + "TTSOptimizeStreamingLatency": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ], + "title": "TTSOptimizeStreamingLatency" + }, + "TTSOutputFormat": { + "type": "string", + "enum": [ + "pcm_8000", + "pcm_16000", + "pcm_22050", + "pcm_24000", + "pcm_44100", + "pcm_48000", + "ulaw_8000" + ], + "title": "TTSOutputFormat", + "default": "pcm_16000" + }, + "TelephonyCallConfig": { + "properties": { + "ringing_timeout_secs": { + "type": "integer", + "maximum": 999, + "minimum": 1, + "title": "Ringing Timeout Secs", + "description": "How long to ring the recipient before giving up, in seconds. Note that this will also be limited by the provider's own constraints.", + "default": 60 + } + }, + "type": "object", + "title": "TelephonyCallConfig" + }, + "TelephonyDirection": { + "type": "string", + "enum": [ + "inbound", + "outbound" + ], + "title": "TelephonyDirection", + "default": "inbound" + }, + "TelephonyProvider": { + "type": "string", + "enum": [ + "twilio", + "sip_trunk" + ], + "title": "TelephonyProvider" + }, + "TestConditionRationaleCommonModel": { + "properties": { + "messages": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Messages", + "description": "List of individual parameter evaluation messages or reasons" + }, + "summary": { + "type": "string", + "title": "Summary", + "description": "High-level summary of the evaluation result", + "default": "" + } + }, + "type": "object", + "title": "TestConditionRationaleCommonModel", + "description": "Structured rationale for test condition results containing individual failure/success reasons." + }, + "TestConditionResultCommonModel": { + "properties": { + "result": { + "$ref": "#/components/schemas/EvaluationSuccessResult" + }, + "rationale": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestConditionRationaleCommonModel" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "result" + ], + "title": "TestConditionResultCommonModel" + }, + "TestFromConversationMetadata-Input": { + "properties": { + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + }, + "workflow_node_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workflow Node Id" + }, + "original_agent_reply": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Input" + }, + "type": "array", + "title": "Original Agent Reply", + "default": [] + } + }, + "type": "object", + "required": [ + "conversation_id", + "agent_id" + ], + "title": "TestFromConversationMetadata" + }, + "TestFromConversationMetadata-Output": { + "properties": { + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + }, + "workflow_node_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workflow Node Id" + }, + "original_agent_reply": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Output" + }, + "type": "array", + "title": "Original Agent Reply", + "default": [] + } + }, + "type": "object", + "required": [ + "conversation_id", + "agent_id" + ], + "title": "TestFromConversationMetadata" + }, + "TestInvocationSummaryResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the test invocation" + }, + "agent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Id", + "description": "The ID of the agent this test invocation belongs to" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id", + "description": "The ID of the branch this test invocation was run on" + }, + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs", + "description": "Creation time of the test invocation in unix seconds" + }, + "test_run_count": { + "type": "integer", + "title": "Test Run Count", + "description": "Number of test runs in this invocation" + }, + "passed_count": { + "type": "integer", + "title": "Passed Count", + "description": "Number of test runs that passed" + }, + "failed_count": { + "type": "integer", + "title": "Failed Count", + "description": "Number of test runs that failed" + }, + "pending_count": { + "type": "integer", + "title": "Pending Count", + "description": "Number of test runs that are pending" + }, + "title": { + "type": "string", + "title": "Title", + "description": "Title of the test invocation - either the single test name or count of tests" + }, + "access_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + { + "type": "null" + } + ], + "description": "The access information of the test invocation" + } + }, + "type": "object", + "required": [ + "id", + "created_at_unix_secs", + "test_run_count", + "passed_count", + "failed_count", + "pending_count", + "title" + ], + "title": "TestInvocationSummaryResponseModel" + }, + "TestRunMetadata": { + "properties": { + "workspace_id": { + "type": "string", + "title": "Workspace Id" + }, + "test_name": { + "type": "string", + "title": "Test Name" + }, + "ran_by_user_email": { + "type": "string", + "title": "Ran By User Email" + }, + "test_type": { + "type": "string", + "enum": [ + "llm", + "tool_call", + "simulation" + ], + "title": "Test Type", + "default": "llm" + } + }, + "type": "object", + "required": [ + "workspace_id", + "test_name", + "ran_by_user_email" + ], + "title": "TestRunMetadata" + }, + "TestRunStatus": { + "type": "string", + "enum": [ + "pending", + "passed", + "failed" + ], + "title": "TestRunStatus" + }, + "TestSharingMode": { + "type": "string", + "enum": [ + "all", + "shared_with_me" + ], + "title": "TestSharingMode" + }, + "TestToolResultModel": { + "properties": { + "result_type": { + "type": "string", + "const": "testing_tool_result", + "title": "Result Type", + "default": "testing_tool_result" + }, + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "reason": { + "type": "string", + "title": "Reason", + "default": "Skipping tool call in test mode" + } + }, + "type": "object", + "title": "TestToolResultModel" + }, + "TestType": { + "type": "string", + "enum": [ + "llm", + "tool", + "simulation", + "folder" + ], + "title": "TestType" + }, + "TestsFeatureUsageCommonModel": { + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "default": false + }, + "tests_ran_after_last_modification": { + "type": "boolean", + "title": "Tests Ran After Last Modification", + "default": false + }, + "tests_ran_in_last_7_days": { + "type": "boolean", + "title": "Tests Ran In Last 7 Days", + "default": false + } + }, + "type": "object", + "title": "TestsFeatureUsageCommonModel" + }, + "TextNormalisationType": { + "type": "string", + "enum": [ + "system_prompt", + "elevenlabs" + ], + "title": "TextNormalisationType", + "description": "Method for converting numbers to words before sending to TTS", + "default": "system_prompt" + }, + "ThresholdGuardrail": { + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Is Enabled", + "default": false + }, + "threshold": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Threshold", + "default": 0.3 + } + }, + "type": "object", + "title": "ThresholdGuardrail" + }, + "TimeRange": { + "properties": { + "start_ms": { + "type": "integer", + "title": "Start Ms" + }, + "end_ms": { + "type": "integer", + "title": "End Ms" + } + }, + "type": "object", + "required": [ + "start_ms", + "end_ms" + ], + "title": "TimeRange" + }, + "ToDialogueSettingsResponseModel": { + "properties": { + "stability": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Stability", + "description": "Determines how stable the voice is and the randomness between each generation. Lower values introduce broader emotional range for the voice. Higher values can result in a monotonous voice with limited emotion.", + "default": 0.5 + }, + "speed": { + "anyOf": [ + { + "type": "number", + "maximum": 2, + "minimum": 0.5 + }, + { + "type": "null" + } + ], + "title": "Speed" + } + }, + "type": "object", + "title": "ToDialogueSettingsResponseModel", + "example": { + "stability": 0.5 + } + }, + "TokenResponseModel": { + "properties": { + "token": { + "type": "string", + "title": "Token" + } + }, + "type": "object", + "required": [ + "token" + ], + "title": "TokenResponseModel" + }, + "Tool": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "inputSchema": { + "additionalProperties": true, + "type": "object", + "title": "Inputschema" + }, + "outputSchema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Outputschema" + }, + "icons": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Icon" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Icons" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "_meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "execution": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolExecution" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "type": "object", + "required": [ + "name", + "inputSchema" + ], + "title": "Tool", + "description": "Definition for a tool the client can call." + }, + "ToolAnnotations": { + "properties": { + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "readOnlyHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Readonlyhint" + }, + "destructiveHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Destructivehint" + }, + "idempotentHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Idempotenthint" + }, + "openWorldHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Openworldhint" + } + }, + "additionalProperties": true, + "type": "object", + "title": "ToolAnnotations", + "description": "Additional properties describing a Tool to clients.\n\nNOTE: all properties in ToolAnnotations are **hints**.\nThey are not guaranteed to provide a faithful description of\ntool behavior (including descriptive properties like `title`).\n\nClients should never make tool use decisions based on ToolAnnotations\nreceived from untrusted servers." + }, + "ToolCallSoundBehavior": { + "type": "string", + "enum": [ + "auto", + "always" + ], + "title": "ToolCallSoundBehavior", + "description": "Determines how the tool call sound should be played.", + "default": "auto" + }, + "ToolCallSoundType": { + "type": "string", + "enum": [ + "typing", + "elevator1", + "elevator2", + "elevator3", + "elevator4" + ], + "title": "ToolCallSoundType", + "description": "Predefined tool call sound types." + }, + "ToolCallUnitTestModel": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Output" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Output" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Output" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "tool", + "title": "Type", + "default": "tool" + }, + "tool_call_parameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/UnitTestToolCallEvaluationModel-Output" + }, + { + "type": "null" + } + ], + "description": "How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated." + }, + "check_any_tool_matches": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Check Any Tool Matches", + "description": "If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent." + } + }, + "type": "object", + "title": "ToolCallUnitTestModel" + }, + "ToolErrorHandlingMode": { + "type": "string", + "enum": [ + "auto", + "summarized", + "passthrough", + "hide" + ], + "title": "ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent.", + "default": "auto" + }, + "ToolExecution": { + "properties": { + "taskSupport": { + "anyOf": [ + { + "type": "string", + "enum": [ + "forbidden", + "optional", + "required" + ] + }, + { + "type": "null" + } + ], + "title": "Tasksupport" + } + }, + "additionalProperties": true, + "type": "object", + "title": "ToolExecution", + "description": "Execution-related properties for a tool." + }, + "ToolExecutionMode": { + "type": "string", + "enum": [ + "immediate", + "post_tool_speech", + "async" + ], + "title": "ToolExecutionMode", + "default": "immediate" + }, + "ToolExecutionResponseModel": { + "properties": { + "tool_id": { + "type": "string", + "title": "Tool Id", + "description": "The ID of the tool that was executed" + }, + "tool_request_id": { + "type": "string", + "title": "Tool Request Id", + "description": "The request/call ID associated with this tool execution" + }, + "conversation_id": { + "type": "string", + "title": "Conversation Id", + "description": "The ID of the conversation where the tool was executed" + }, + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "The ID of the agent that ran the tool" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id", + "description": "The branch ID if the agent has branches" + }, + "timestamp": { + "type": "number", + "title": "Timestamp", + "description": "Unix timestamp when the tool was executed" + }, + "latency_secs": { + "type": "number", + "title": "Latency Secs", + "description": "How long the tool execution took" + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the tool execution failed", + "default": false + }, + "request_payload": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Request Payload", + "description": "LLM-extracted parameters sent to the tool (JSON string)" + }, + "response_payload": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Response Payload", + "description": "Response returned by the tool" + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Message", + "description": "Error message if the tool execution failed" + }, + "error_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Type", + "description": "Error category (internal, customer_config, customer_auth, external_server, external_client, client_timeout, unknown)" + }, + "id": { + "type": "string", + "title": "Id" + }, + "tool_call_details": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallClientDetails" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallMCPDetails" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Output" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "api_integration_webhook": "#/components/schemas/ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Output", + "client": "#/components/schemas/ConversationHistoryTranscriptToolCallClientDetails", + "mcp": "#/components/schemas/ConversationHistoryTranscriptToolCallMCPDetails", + "webhook": "#/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails" + } + } + }, + { + "type": "null" + } + ], + "title": "Tool Call Details" + } + }, + "type": "object", + "required": [ + "tool_id", + "tool_request_id", + "conversation_id", + "agent_id", + "timestamp", + "latency_secs", + "id" + ], + "title": "ToolExecutionResponseModel" + }, + "ToolMockConfig": { + "properties": { + "default_return_value": { + "type": "string", + "title": "Default Return Value", + "default": "Tool Called." + }, + "default_is_error": { + "type": "boolean", + "title": "Default Is Error", + "default": false + } + }, + "type": "object", + "title": "ToolMockConfig" + }, + "ToolRequestModel": { + "properties": { + "tool_config": { + "oneOf": [ + { + "$ref": "#/components/schemas/WebhookToolConfig-Input" + }, + { + "$ref": "#/components/schemas/ClientToolConfig-Input" + }, + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "$ref": "#/components/schemas/MCPToolConfig-Input" + }, + { + "$ref": "#/components/schemas/CodeToolConfig-Input" + } + ], + "title": "Tool Config", + "description": "Configuration for the tool", + "discriminator": { + "propertyName": "type", + "mapping": { + "client": "#/components/schemas/ClientToolConfig-Input", + "code": "#/components/schemas/CodeToolConfig-Input", + "mcp": "#/components/schemas/MCPToolConfig-Input", + "system": "#/components/schemas/SystemToolConfig-Input", + "webhook": "#/components/schemas/WebhookToolConfig-Input" + } + } + }, + "response_mocks": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ToolResponseMockConfig-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Response Mocks", + "description": "Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins." + } + }, + "type": "object", + "required": [ + "tool_config" + ], + "title": "ToolRequestModel" + }, + "ToolResponseMockConfig-Input": { + "properties": { + "parameter_conditions": { + "items": { + "$ref": "#/components/schemas/UnitTestToolCallParameter" + }, + "type": "array", + "title": "Parameter Conditions", + "description": "If the list is empty, the mock will always activate." + }, + "mock_result": { + "type": "string", + "title": "Mock Result", + "description": "The return value the LLM sees when this mock is active." + } + }, + "type": "object", + "required": [ + "mock_result" + ], + "title": "ToolResponseMockConfig" + }, + "ToolResponseMockConfig-Output": { + "properties": { + "parameter_conditions": { + "items": { + "$ref": "#/components/schemas/UnitTestToolCallParameter" + }, + "type": "array", + "title": "Parameter Conditions", + "description": "If the list is empty, the mock will always activate." + }, + "mock_result": { + "type": "string", + "title": "Mock Result", + "description": "The return value the LLM sees when this mock is active." + } + }, + "type": "object", + "required": [ + "mock_result" + ], + "title": "ToolResponseMockConfig" + }, + "ToolResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "tool_config": { + "oneOf": [ + { + "$ref": "#/components/schemas/WebhookToolConfig-Output" + }, + { + "$ref": "#/components/schemas/ClientToolConfig-Output" + }, + { + "$ref": "#/components/schemas/SystemToolConfig-Output" + }, + { + "$ref": "#/components/schemas/MCPToolConfig-Output" + }, + { + "$ref": "#/components/schemas/CodeToolConfig-Output" + } + ], + "title": "Tool Config", + "description": "The type of tool", + "discriminator": { + "propertyName": "type", + "mapping": { + "client": "#/components/schemas/ClientToolConfig-Output", + "code": "#/components/schemas/CodeToolConfig-Output", + "mcp": "#/components/schemas/MCPToolConfig-Output", + "system": "#/components/schemas/SystemToolConfig-Output", + "webhook": "#/components/schemas/WebhookToolConfig-Output" + } + } + }, + "access_info": { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + "usage_stats": { + "$ref": "#/components/schemas/ToolUsageStatsResponseModel" + }, + "response_mocks": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ToolResponseMockConfig-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Response Mocks", + "description": "Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins." + } + }, + "type": "object", + "required": [ + "id", + "tool_config", + "access_info", + "usage_stats" + ], + "title": "ToolResponseModel" + }, + "ToolSortBy": { + "type": "string", + "enum": [ + "name", + "created_at" + ], + "title": "ToolSortBy" + }, + "ToolType": { + "type": "string", + "enum": [ + "system", + "webhook", + "client", + "mcp", + "workflow", + "api_integration_webhook", + "api_integration_mcp", + "smb", + "code" + ], + "title": "ToolType" + }, + "ToolTypeFilter": { + "type": "string", + "enum": [ + "webhook", + "client", + "api_integration_webhook", + "code" + ], + "title": "ToolTypeFilter" + }, + "ToolUsageStatsResponseModel": { + "properties": { + "total_calls": { + "type": "integer", + "title": "Total Calls", + "description": "The total number of calls to the tool", + "default": 0 + }, + "avg_latency_secs": { + "type": "number", + "title": "Avg Latency Secs" + } + }, + "type": "object", + "required": [ + "avg_latency_secs" + ], + "title": "ToolUsageStatsResponseModel" + }, + "ToolsResponseModel": { + "properties": { + "tools": { + "items": { + "$ref": "#/components/schemas/ToolResponseModel" + }, + "type": "array", + "title": "Tools" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "tools", + "has_more" + ], + "title": "ToolsResponseModel" + }, + "TransferBranchInfoDefaultingToMain": { + "properties": { + "branch_reason": { + "type": "string", + "const": "defaulting_to_main", + "title": "Branch Reason" + }, + "branch_id": { + "type": "string", + "title": "Branch Id" + } + }, + "type": "object", + "required": [ + "branch_reason", + "branch_id" + ], + "title": "TransferBranchInfoDefaultingToMain" + }, + "TransferBranchInfoTrafficSplit": { + "properties": { + "branch_reason": { + "type": "string", + "const": "traffic_split", + "title": "Branch Reason" + }, + "branch_id": { + "type": "string", + "title": "Branch Id" + }, + "traffic_percentage": { + "type": "number", + "title": "Traffic Percentage" + } + }, + "type": "object", + "required": [ + "branch_reason", + "branch_id", + "traffic_percentage" + ], + "title": "TransferBranchInfoTrafficSplit" + }, + "TransferToAgentToolConfig": { + "properties": { + "system_tool_type": { + "type": "string", + "const": "transfer_to_agent", + "title": "System Tool Type", + "default": "transfer_to_agent" + }, + "transfers": { + "items": { + "$ref": "#/components/schemas/AgentTransfer" + }, + "type": "array", + "title": "Transfers" + } + }, + "type": "object", + "required": [ + "transfers" + ], + "title": "TransferToAgentToolConfig" + }, + "TransferToAgentToolResultErrorModel": { + "properties": { + "result_type": { + "type": "string", + "const": "transfer_to_agent_error", + "title": "Result Type", + "default": "transfer_to_agent_error" + }, + "status": { + "type": "string", + "const": "error", + "title": "Status", + "default": "error" + }, + "from_agent": { + "type": "string", + "title": "From Agent" + }, + "error": { + "type": "string", + "title": "Error" + } + }, + "type": "object", + "required": [ + "from_agent", + "error" + ], + "title": "TransferToAgentToolResultErrorModel" + }, + "TransferToAgentToolResultSuccessModel": { + "properties": { + "result_type": { + "type": "string", + "const": "transfer_to_agent_success", + "title": "Result Type", + "default": "transfer_to_agent_success" + }, + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "from_agent": { + "type": "string", + "title": "From Agent" + }, + "to_agent": { + "type": "string", + "title": "To Agent" + }, + "condition": { + "type": "string", + "title": "Condition" + }, + "delay_ms": { + "type": "integer", + "title": "Delay Ms", + "default": 0 + }, + "transfer_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Transfer Message" + }, + "enable_transferred_agent_first_message": { + "type": "boolean", + "title": "Enable Transferred Agent First Message", + "default": false + }, + "branch_info": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/TransferBranchInfoTrafficSplit" + }, + { + "$ref": "#/components/schemas/TransferBranchInfoDefaultingToMain" + } + ], + "discriminator": { + "propertyName": "branch_reason", + "mapping": { + "defaulting_to_main": "#/components/schemas/TransferBranchInfoDefaultingToMain", + "traffic_split": "#/components/schemas/TransferBranchInfoTrafficSplit" + } + } + }, + { + "type": "null" + } + ], + "title": "Branch Info" + } + }, + "type": "object", + "required": [ + "from_agent", + "to_agent", + "condition" + ], + "title": "TransferToAgentToolResultSuccessModel" + }, + "TransferToNumberResultErrorModel": { + "properties": { + "result_type": { + "type": "string", + "const": "transfer_to_number_error", + "title": "Result Type", + "default": "transfer_to_number_error" + }, + "status": { + "type": "string", + "const": "error", + "title": "Status", + "default": "error" + }, + "error": { + "type": "string", + "title": "Error" + }, + "details": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Details" + } + }, + "type": "object", + "required": [ + "error" + ], + "title": "TransferToNumberResultErrorModel" + }, + "TransferToNumberResultSipSuccessModel": { + "properties": { + "result_type": { + "type": "string", + "const": "transfer_to_number_sip_success", + "title": "Result Type", + "default": "transfer_to_number_sip_success" + }, + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "transfer_number": { + "type": "string", + "title": "Transfer Number" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + }, + "note": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Note" + } + }, + "type": "object", + "required": [ + "transfer_number" + ], + "title": "TransferToNumberResultSipSuccessModel" + }, + "TransferToNumberResultTwilioSuccessModel": { + "properties": { + "result_type": { + "type": "string", + "const": "transfer_to_number_twilio_success", + "title": "Result Type", + "default": "transfer_to_number_twilio_success" + }, + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "transfer_number": { + "type": "string", + "title": "Transfer Number" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + }, + "client_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Client Message" + }, + "agent_message": { + "type": "string", + "title": "Agent Message" + }, + "conference_name": { + "type": "string", + "title": "Conference Name" + }, + "post_dial_digits": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Post Dial Digits" + }, + "note": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Note" + } + }, + "type": "object", + "required": [ + "transfer_number", + "agent_message", + "conference_name" + ], + "title": "TransferToNumberResultTwilioSuccessModel" + }, + "TransferToNumberToolConfig-Input": { + "properties": { + "system_tool_type": { + "type": "string", + "const": "transfer_to_number", + "title": "System Tool Type", + "default": "transfer_to_number" + }, + "transfers": { + "items": { + "$ref": "#/components/schemas/PhoneNumberTransfer" + }, + "type": "array", + "title": "Transfers" + }, + "enable_client_message": { + "type": "boolean", + "title": "Enable Client Message", + "description": "Whether to play a message to the client while they wait for transfer. Defaults to true for backward compatibility.", + "default": true + } + }, + "type": "object", + "required": [ + "transfers" + ], + "title": "TransferToNumberToolConfig" + }, + "TransferToNumberToolConfig-Output": { + "properties": { + "system_tool_type": { + "type": "string", + "const": "transfer_to_number", + "title": "System Tool Type", + "default": "transfer_to_number" + }, + "transfers": { + "items": { + "$ref": "#/components/schemas/PhoneNumberTransfer" + }, + "type": "array", + "title": "Transfers" + }, + "enable_client_message": { + "type": "boolean", + "title": "Enable Client Message", + "description": "Whether to play a message to the client while they wait for transfer. Defaults to true for backward compatibility.", + "default": true + } + }, + "type": "object", + "required": [ + "transfers" + ], + "title": "TransferToNumberToolConfig" + }, + "TransferTypeEnum": { + "type": "string", + "enum": [ + "blind", + "conference", + "sip_refer" + ], + "title": "TransferTypeEnum", + "default": "conference" + }, + "TurnConfig": { + "properties": { + "turn_timeout": { + "type": "number", + "title": "Turn Timeout", + "description": "Maximum wait time for the user's reply before re-engaging the user", + "default": 7 + }, + "initial_wait_time": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Initial Wait Time", + "description": "How long the agent will wait for the user to start the conversation if the first message is empty. If not set, uses the regular turn_timeout." + }, + "silence_end_call_timeout": { + "type": "number", + "title": "Silence End Call Timeout", + "description": "Maximum wait time since the user last spoke before terminating the call", + "default": -1 + }, + "mode": { + "$ref": "#/components/schemas/TurnMode", + "description": "The mode of turn detection", + "default": "turn", + "x-fern-ignore": true + }, + "turn_eagerness": { + "$ref": "#/components/schemas/TurnEagerness", + "description": "Controls how eager the agent is to respond. Low = less eager (waits longer), Standard = default eagerness, High = more eager (responds sooner)", + "default": "normal" + }, + "spelling_patience": { + "$ref": "#/components/schemas/SpellingPatience", + "description": "Controls if the agent should be more patient when user is spelling numbers and named entities. Auto = model based, Off = never wait extra", + "default": "auto" + }, + "speculative_turn": { + "type": "boolean", + "title": "Speculative Turn", + "description": "When enabled, starts generating LLM responses during silence before full turn confidence is reached, reducing perceived latency. May increase LLM costs.", + "default": false + }, + "retranscribe_on_turn_timeout": { + "type": "boolean", + "title": "Retranscribe On Turn Timeout", + "description": "When enabled, if VAD detects no speech, attempts to re-transcribe accumulated audio at turn timeout. Disables silence discount billing for affected turns.", + "default": false + }, + "soft_timeout_config": { + "$ref": "#/components/schemas/SoftTimeoutConfig", + "description": "Configuration for soft timeout functionality. Provides immediate feedback during longer LLM responses." + } + }, + "type": "object", + "title": "TurnConfig", + "example": { + "interruption_ignore_terms": [], + "mode": "turn", + "retranscribe_on_turn_timeout": false, + "silence_end_call_timeout": -1, + "soft_timeout_config": { + "message": "Hhmmmm...yeah.", + "timeout_seconds": -1 + }, + "speculative_turn": false, + "spelling_patience": "auto", + "turn_eagerness": "normal", + "turn_timeout": 7 + } + }, + "TurnConfigOverride": { + "properties": { + "soft_timeout_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/SoftTimeoutConfigOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for soft timeout functionality. Provides immediate feedback during longer LLM responses." + } + }, + "type": "object", + "title": "TurnConfigOverride", + "example": { + "soft_timeout_config": { + "message": "Hhmmmm...yeah." + } + } + }, + "TurnConfigOverrideConfig": { + "properties": { + "soft_timeout_config": { + "$ref": "#/components/schemas/SoftTimeoutConfigOverrideConfig", + "description": "Configures overrides for nested fields." + } + }, + "type": "object", + "title": "TurnConfigOverrideConfig" + }, + "TurnConfigWorkflowOverride": { + "properties": { + "turn_timeout": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Turn Timeout", + "description": "Maximum wait time for the user's reply before re-engaging the user" + }, + "initial_wait_time": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Initial Wait Time", + "description": "How long the agent will wait for the user to start the conversation if the first message is empty. If not set, uses the regular turn_timeout." + }, + "silence_end_call_timeout": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Silence End Call Timeout", + "description": "Maximum wait time since the user last spoke before terminating the call" + }, + "mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/TurnMode" + }, + { + "type": "null" + } + ], + "description": "The mode of turn detection", + "x-fern-ignore": true + }, + "turn_eagerness": { + "anyOf": [ + { + "$ref": "#/components/schemas/TurnEagerness" + }, + { + "type": "null" + } + ], + "description": "Controls how eager the agent is to respond. Low = less eager (waits longer), Standard = default eagerness, High = more eager (responds sooner)" + }, + "spelling_patience": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpellingPatience" + }, + { + "type": "null" + } + ], + "description": "Controls if the agent should be more patient when user is spelling numbers and named entities. Auto = model based, Off = never wait extra" + }, + "speculative_turn": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Speculative Turn", + "description": "When enabled, starts generating LLM responses during silence before full turn confidence is reached, reducing perceived latency. May increase LLM costs." + }, + "retranscribe_on_turn_timeout": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Retranscribe On Turn Timeout", + "description": "When enabled, if VAD detects no speech, attempts to re-transcribe accumulated audio at turn timeout. Disables silence discount billing for affected turns." + }, + "soft_timeout_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/SoftTimeoutConfigWorkflowOverride" + }, + { + "type": "null" + } + ], + "description": "Configuration for soft timeout functionality. Provides immediate feedback during longer LLM responses." + } + }, + "type": "object", + "title": "TurnConfigWorkflowOverride", + "example": { + "interruption_ignore_terms": [], + "mode": "turn", + "retranscribe_on_turn_timeout": false, + "silence_end_call_timeout": -1, + "soft_timeout_config": { + "message": "Hhmmmm...yeah.", + "timeout_seconds": -1, + "use_llm_generated_message": false + }, + "speculative_turn": false, + "spelling_patience": "auto", + "turn_eagerness": "normal", + "turn_timeout": 7 + } + }, + "TurnEagerness": { + "type": "string", + "enum": [ + "patient", + "normal", + "eager" + ], + "title": "TurnEagerness", + "description": "Agent's eagerness to respond. Higher values make agent wait for higher turn probability.", + "default": "normal" + }, + "TurnMode": { + "type": "string", + "enum": [ + "silence", + "turn" + ], + "title": "TurnMode", + "default": "turn" + }, + "TurnModel": { + "type": "string", + "enum": [ + "turn_v2", + "turn_v3" + ], + "title": "TurnModel", + "description": "Version of the turn detection model to use." + }, + "TwilioEdgeLocation": { + "type": "string", + "enum": [ + "ashburn", + "dublin", + "frankfurt", + "sao-paulo", + "singapore", + "sydney", + "tokyo", + "umatilla", + "roaming" + ], + "title": "TwilioEdgeLocation", + "description": "Valid Twilio edge locations." + }, + "TwilioOutboundCallResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success" + }, + "message": { + "type": "string", + "title": "Message" + }, + "conversation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Conversation Id" + }, + "callSid": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Callsid" + } + }, + "type": "object", + "required": [ + "success", + "message", + "conversation_id", + "callSid" + ], + "title": "TwilioOutboundCallResponse" + }, + "TwilioRegionId": { + "type": "string", + "enum": [ + "us1", + "ie1", + "au1" + ], + "title": "TwilioRegionId", + "description": "Valid Twilio region IDs." + }, + "TxtExportOptions": { + "properties": { + "max_characters_per_line": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Characters Per Line", + "default": 100 + }, + "include_speakers": { + "type": "boolean", + "title": "Include Speakers", + "default": true + }, + "include_timestamps": { + "type": "boolean", + "title": "Include Timestamps", + "default": true + }, + "format": { + "type": "string", + "const": "txt", + "title": "Format" + }, + "segment_on_silence_longer_than_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Segment On Silence Longer Than S" + }, + "max_segment_duration_s": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Segment Duration S" + }, + "max_segment_chars": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Segment Chars" + } + }, + "type": "object", + "required": [ + "format" + ], + "title": "TxtExportOptions" + }, + "URLAvatar": { + "properties": { + "type": { + "type": "string", + "const": "url", + "title": "Type", + "description": "The type of the avatar", + "default": "url" + }, + "custom_url": { + "type": "string", + "title": "Custom Url", + "description": "The custom URL of the avatar", + "default": "" + } + }, + "type": "object", + "title": "URLAvatar" + }, + "UnitTestRunResponseModel": { + "properties": { + "test_run_id": { + "type": "string", + "title": "Test Run Id" + }, + "test_info": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/ResponseUnitTestModel" + }, + { + "$ref": "#/components/schemas/ToolCallUnitTestModel" + }, + { + "$ref": "#/components/schemas/SimulationTestModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "llm": "#/components/schemas/ResponseUnitTestModel", + "simulation": "#/components/schemas/SimulationTestModel", + "tool": "#/components/schemas/ToolCallUnitTestModel" + } + } + }, + { + "type": "null" + } + ], + "title": "Test Info" + }, + "test_invocation_id": { + "type": "string", + "title": "Test Invocation Id" + }, + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + }, + "workflow_node_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workflow Node Id" + }, + "status": { + "$ref": "#/components/schemas/TestRunStatus" + }, + "agent_responses": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Agent Responses" + }, + "test_id": { + "type": "string", + "title": "Test Id" + }, + "test_name": { + "type": "string", + "title": "Test Name", + "default": "Unknown Test" + }, + "condition_result": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestConditionResultCommonModel" + }, + { + "type": "null" + } + ] + }, + "last_updated_at_unix": { + "type": "integer", + "title": "Last Updated At Unix" + }, + "metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestRunMetadata" + }, + { + "type": "null" + } + ] + }, + "root_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Root Folder Id" + }, + "root_folder_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Root Folder Name" + }, + "environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment" + } + }, + "type": "object", + "required": [ + "test_run_id", + "test_invocation_id", + "agent_id", + "status", + "test_id" + ], + "title": "UnitTestRunResponseModel" + }, + "UnitTestSummaryResponseModel": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the test" + }, + "name": { + "type": "string", + "title": "Name", + "description": "Name of the test" + }, + "access_info": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResourceAccessInfo" + }, + { + "type": "null" + } + ], + "description": "The access information of the test" + }, + "created_at_unix_secs": { + "type": "integer", + "title": "Created At Unix Secs", + "description": "Creation time of the test in unix seconds" + }, + "last_updated_at_unix_secs": { + "type": "integer", + "title": "Last Updated At Unix Secs", + "description": "Last update time of the test in unix seconds" + }, + "type": { + "$ref": "#/components/schemas/TestType", + "description": "Type of the test or entity" + }, + "entity_type": { + "$ref": "#/components/schemas/AgentTestEntityType", + "description": "The type of entity (test or folder)", + "default": "test" + }, + "folder_parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Folder Parent Id", + "description": "The ID of the parent folder" + }, + "folder_path": { + "items": { + "$ref": "#/components/schemas/AgentTestFolderPathSegmentResponseModel" + }, + "type": "array", + "title": "Folder Path", + "description": "The folder path segments from root to this entity" + }, + "children_count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Children Count", + "description": "Number of direct children (tests and subfolders) for folders only" + } + }, + "type": "object", + "required": [ + "id", + "name", + "created_at_unix_secs", + "last_updated_at_unix_secs", + "type" + ], + "title": "UnitTestSummaryResponseModel" + }, + "UnitTestToolCallEvaluationModel-Input": { + "properties": { + "parameters": { + "items": { + "$ref": "#/components/schemas/UnitTestToolCallParameter" + }, + "type": "array", + "title": "Parameters", + "description": "Parameters to evaluate for the agent's tool call. If empty, the tool call parameters are not evaluated." + }, + "referenced_tool": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferencedToolCommonModel" + }, + { + "type": "null" + } + ], + "description": "The tool to evaluate a call against." + }, + "verify_absence": { + "type": "boolean", + "title": "Verify Absence", + "description": "Whether to verify that the tool was NOT called.", + "default": false + }, + "workflow_node_transition": { + "anyOf": [ + { + "$ref": "#/components/schemas/UnitTestWorkflowNodeTransitionEvaluationNodeId" + }, + { + "type": "null" + } + ], + "description": "Configuration for testing workflow node transitions. When set, the test will verify the agent transitions to the specified workflow node." + } + }, + "type": "object", + "title": "UnitTestToolCallEvaluationModel" + }, + "UnitTestToolCallEvaluationModel-Output": { + "properties": { + "parameters": { + "items": { + "$ref": "#/components/schemas/UnitTestToolCallParameter" + }, + "type": "array", + "title": "Parameters", + "description": "Parameters to evaluate for the agent's tool call. If empty, the tool call parameters are not evaluated." + }, + "referenced_tool": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferencedToolCommonModel" + }, + { + "type": "null" + } + ], + "description": "The tool to evaluate a call against." + }, + "verify_absence": { + "type": "boolean", + "title": "Verify Absence", + "description": "Whether to verify that the tool was NOT called.", + "default": false + }, + "workflow_node_transition": { + "anyOf": [ + { + "$ref": "#/components/schemas/UnitTestWorkflowNodeTransitionEvaluationNodeId" + }, + { + "type": "null" + } + ], + "description": "Configuration for testing workflow node transitions. When set, the test will verify the agent transitions to the specified workflow node." + } + }, + "type": "object", + "title": "UnitTestToolCallEvaluationModel" + }, + "UnitTestToolCallParameter": { + "properties": { + "eval": { + "oneOf": [ + { + "$ref": "#/components/schemas/LLMParameterEvaluationStrategy" + }, + { + "$ref": "#/components/schemas/RegexParameterEvaluationStrategy" + }, + { + "$ref": "#/components/schemas/ExactParameterEvaluationStrategy" + }, + { + "$ref": "#/components/schemas/MatchAnythingParameterEvaluationStrategy" + } + ], + "title": "Eval", + "discriminator": { + "propertyName": "type", + "mapping": { + "anything": "#/components/schemas/MatchAnythingParameterEvaluationStrategy", + "exact": "#/components/schemas/ExactParameterEvaluationStrategy", + "llm": "#/components/schemas/LLMParameterEvaluationStrategy", + "regex": "#/components/schemas/RegexParameterEvaluationStrategy" + } + } + }, + "path": { + "type": "string", + "title": "Path" + } + }, + "type": "object", + "required": [ + "eval", + "path" + ], + "title": "UnitTestToolCallParameter" + }, + "UnitTestWorkflowNodeTransitionEvaluationNodeId": { + "properties": { + "type": { + "type": "string", + "const": "node_id", + "title": "Type", + "default": "node_id" + }, + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "The ID of the agent whose workflow contains the target node." + }, + "target_node_id": { + "type": "string", + "title": "Target Node Id", + "description": "The ID of the workflow node that the agent should transition to." + } + }, + "type": "object", + "required": [ + "agent_id", + "target_node_id" + ], + "title": "UnitTestWorkflowNodeTransitionEvaluationNodeId" + }, + "UpdateAgentRuleParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_agent_rule", + "title": "Smb Tool Type", + "default": "update_agent_rule" + } + }, + "type": "object", + "title": "UpdateAgentRuleParams" + }, + "UpdateAssetParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_asset", + "title": "Smb Tool Type", + "default": "update_asset" + } + }, + "type": "object", + "title": "UpdateAssetParams" + }, + "UpdateBasicAuthRequest": { + "properties": { + "auth_type": { + "type": "string", + "const": "basic_auth", + "title": "Auth Type", + "default": "basic_auth" + }, + "provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Provider" + }, + "username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Username" + }, + "password": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Password" + } + }, + "type": "object", + "title": "UpdateBasicAuthRequest" + }, + "UpdateBookingPageSettingsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_booking_page_settings", + "title": "Smb Tool Type", + "default": "update_booking_page_settings" + } + }, + "type": "object", + "title": "UpdateBookingPageSettingsParams" + }, + "UpdateBusinessInfoParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_business_info", + "title": "Smb Tool Type", + "default": "update_business_info" + } + }, + "type": "object", + "title": "UpdateBusinessInfoParams" + }, + "UpdateCalendarEventParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_calendar_event", + "title": "Smb Tool Type", + "default": "update_calendar_event" + } + }, + "type": "object", + "title": "UpdateCalendarEventParams" + }, + "UpdateClientParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_client", + "title": "Smb Tool Type", + "default": "update_client" + } + }, + "type": "object", + "title": "UpdateClientParams", + "description": "Update an existing client's information." + }, + "UpdateCustomerFacingConfigParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_customer_facing_config", + "title": "Smb Tool Type", + "default": "update_customer_facing_config" + } + }, + "type": "object", + "title": "UpdateCustomerFacingConfigParams" + }, + "UpdateEnvironmentVariableRequest": { + "properties": { + "values": { + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/components/schemas/EnvironmentVariableSecretValueRequest" + }, + { + "$ref": "#/components/schemas/EnvironmentVariableAuthConnectionValueRequest" + }, + { + "type": "null" + } + ] + }, + "type": "object", + "title": "Values", + "description": "Values to replace. Set to null to remove an environment (except 'production')." + } + }, + "type": "object", + "required": [ + "values" + ], + "title": "UpdateEnvironmentVariableRequest" + }, + "UpdateGroupSessionSeatsParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_group_session_seats", + "title": "Smb Tool Type", + "default": "update_group_session_seats" + } + }, + "type": "object", + "title": "UpdateGroupSessionSeatsParams", + "description": "Change the seat count of an existing group session registration." + }, + "UpdateHolidayParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_holiday", + "title": "Smb Tool Type", + "default": "update_holiday" + } + }, + "type": "object", + "title": "UpdateHolidayParams" + }, + "UpdateLocationParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_location", + "title": "Smb Tool Type", + "default": "update_location" + } + }, + "type": "object", + "title": "UpdateLocationParams" + }, + "UpdateOAuth2ClientCredsRequest": { + "properties": { + "auth_type": { + "type": "string", + "const": "oauth2_client_credentials", + "title": "Auth Type", + "default": "oauth2_client_credentials" + }, + "provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Provider" + }, + "client_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Client Id" + }, + "scopes": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Scopes" + }, + "extra_params": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Extra Params" + }, + "basic_auth_in_header": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Basic Auth In Header" + }, + "client_secret": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Client Secret" + }, + "custom_headers": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Custom Headers" + } + }, + "type": "object", + "title": "UpdateOAuth2ClientCredsRequest" + }, + "UpdateOAuth2JWTRequest": { + "properties": { + "auth_type": { + "type": "string", + "const": "oauth2_jwt", + "title": "Auth Type", + "default": "oauth2_jwt" + }, + "provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Provider" + }, + "algorithm": { + "anyOf": [ + { + "type": "string", + "enum": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512" + ] + }, + { + "type": "null" + } + ], + "title": "Algorithm" + }, + "key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Key Id" + }, + "issuer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Issuer" + }, + "audience": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Audience" + }, + "subject": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Subject" + }, + "expiration_seconds": { + "anyOf": [ + { + "type": "integer", + "maximum": 86400, + "minimum": 60 + }, + { + "type": "null" + } + ], + "title": "Expiration Seconds" + }, + "extra_params": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Extra Params" + }, + "scopes": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Scopes" + }, + "token_response_field": { + "anyOf": [ + { + "type": "string", + "enum": [ + "access_token", + "id_token" + ] + }, + { + "type": "null" + } + ], + "title": "Token Response Field" + }, + "secret_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Secret Key" + } + }, + "type": "object", + "title": "UpdateOAuth2JWTRequest" + }, + "UpdateOrderRequest": { + "properties": { + "name": { + "type": "string", + "maxLength": 120, + "minLength": 1, + "title": "Name", + "description": "The new name for the order." + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "UpdateOrderRequest", + "example": { + "name": "Spanish Dubs" + } + }, + "UpdateOrderResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The updated order name." + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "UpdateOrderResponse", + "example": { + "name": "Spanish Dubs" + } + }, + "UpdatePhoneNumberRequest": { + "properties": { + "agent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Id" + }, + "label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label" + }, + "inbound_trunk_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/InboundSIPTrunkConfigRequestModel" + }, + { + "type": "null" + } + ] + }, + "outbound_trunk_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OutboundSIPTrunkConfigRequestModel" + }, + { + "type": "null" + } + ] + }, + "livekit_stack": { + "anyOf": [ + { + "$ref": "#/components/schemas/LivekitStackType" + }, + { + "type": "null" + } + ] + }, + "store_sip_messages": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Store Sip Messages" + }, + "environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment", + "description": "Environment to use for resolving environment variables on calls to this number." + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id", + "description": "Agent branch to use for calls to this number." + } + }, + "type": "object", + "title": "UpdatePhoneNumberRequest" + }, + "UpdateProductParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_product", + "title": "Smb Tool Type", + "default": "update_product" + } + }, + "type": "object", + "title": "UpdateProductParams" + }, + "UpdateResponseUnitTestRequest": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Input" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Input" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Input" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "llm", + "title": "Type", + "default": "llm" + }, + "success_condition": { + "type": "string", + "title": "Success Condition", + "description": "A prompt that evaluates whether the agent's response is successful. Should return True or False.", + "default": "" + }, + "success_examples": { + "items": { + "$ref": "#/components/schemas/AgentSuccessfulResponseExample" + }, + "type": "array", + "maxItems": 5, + "title": "Success Examples", + "description": "Non-empty list of example responses that should be considered successful" + }, + "failure_examples": { + "items": { + "$ref": "#/components/schemas/AgentFailureResponseExample" + }, + "type": "array", + "maxItems": 5, + "title": "Failure Examples", + "description": "Non-empty list of example responses that should be considered failures" + }, + "name": { + "type": "string", + "title": "Name" + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "The ID of the parent folder. If not provided, the test will be moved to the root level." + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "UpdateResponseUnitTestRequest" + }, + "UpdateServiceParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_service", + "title": "Smb Tool Type", + "default": "update_service" + } + }, + "type": "object", + "title": "UpdateServiceParams", + "description": "Update an existing service's information." + }, + "UpdateSimulationTestRequest": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Input" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Input" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Input" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "simulation", + "title": "Type", + "default": "simulation" + }, + "success_condition": { + "type": "string", + "title": "Success Condition", + "description": "A prompt that evaluates whether the agent's response is successful. Should return True or False.", + "default": "" + }, + "simulation_scenario": { + "type": "string", + "title": "Simulation Scenario", + "description": "Description of the simulation scenario and user persona for simulation tests.", + "default": "" + }, + "simulation_max_turns": { + "type": "integer", + "maximum": 50, + "minimum": 1, + "title": "Simulation Max Turns", + "description": "Maximum number of conversation turns for simulation tests.", + "default": 5 + }, + "simulation_environment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Simulation Environment", + "description": "The environment to use when running this simulation test. If not provided, defaults to 'production'." + }, + "tool_mock_config": { + "$ref": "#/components/schemas/SimulationToolMockBehaviorConfig", + "description": "Configuration for which tools to mock and fallback behavior." + }, + "evaluation_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "LLM model to use for evaluating simulation results. Defaults to Claude Sonnet 4.6." + }, + "simulated_user_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM" + }, + { + "type": "null" + } + ], + "description": "LLM model for the simulated user. Defaults to Claude Sonnet 4.6." + }, + "name": { + "type": "string", + "title": "Name" + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "The ID of the parent folder. If not provided, the test will be moved to the root level." + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "UpdateSimulationTestRequest" + }, + "UpdateSpeechEngineRequest": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "speech_engine": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpeechEngineConfig" + }, + { + "type": "null" + } + ] + }, + "asr": { + "anyOf": [ + { + "$ref": "#/components/schemas/ASRConversationalConfig" + }, + { + "type": "null" + } + ] + }, + "tts": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSConversationalConfig-Input" + }, + { + "type": "null" + } + ] + }, + "turn": { + "anyOf": [ + { + "$ref": "#/components/schemas/BaseTurnConfig" + }, + { + "type": "null" + } + ] + }, + "conversation": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationConfig-Input" + }, + { + "type": "null" + } + ] + }, + "privacy": { + "anyOf": [ + { + "$ref": "#/components/schemas/PrivacyConfig-Input" + }, + { + "type": "null" + } + ] + }, + "call_limits": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentCallLimits" + }, + { + "type": "null" + } + ] + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language" + }, + "tags": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tags" + }, + "overrides": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpeechEngineConversationInitiationClientDataConfig" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "UpdateSpeechEngineRequest" + }, + "UpdateStaffParams": { + "properties": { + "smb_tool_type": { + "type": "string", + "const": "update_staff", + "title": "Smb Tool Type", + "default": "update_staff" + } + }, + "type": "object", + "title": "UpdateStaffParams", + "description": "Update an existing staff member's information." + }, + "UpdateToolCallUnitTestRequest": { + "properties": { + "from_conversation_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/TestFromConversationMetadata-Input" + }, + { + "type": "null" + } + ], + "description": "Metadata of a conversation this test was created from (if applicable)." + }, + "dynamic_variables": { + "additionalProperties": { + "$ref": "#/components/schemas/DynamicVariableValueType-Input" + }, + "type": "object", + "title": "Dynamic Variables", + "description": "Dynamic variables to replace in the agent config during testing" + }, + "chat_history": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptCommonModel-Input" + }, + "type": "array", + "maxItems": 200, + "title": "Chat History" + }, + "type": { + "type": "string", + "const": "tool", + "title": "Type", + "default": "tool" + }, + "tool_call_parameters": { + "anyOf": [ + { + "$ref": "#/components/schemas/UnitTestToolCallEvaluationModel-Input" + }, + { + "type": "null" + } + ], + "description": "How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated." + }, + "check_any_tool_matches": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Check Any Tool Matches", + "description": "If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent." + }, + "name": { + "type": "string", + "title": "Name" + }, + "parent_folder_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Folder Id", + "description": "The ID of the parent folder. If not provided, the test will be moved to the root level." + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "UpdateToolCallUnitTestRequest" + }, + "UpdateWhatsAppAccountRequest": { + "properties": { + "assigned_agent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Assigned Agent Id" + }, + "enable_messaging": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enable Messaging" + }, + "enable_audio_message_response": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enable Audio Message Response" + } + }, + "type": "object", + "title": "UpdateWhatsAppAccountRequest" + }, + "UpdateWorkspaceMemberResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the workspace member update request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "UpdateWorkspaceMemberResponseModel", + "example": { + "status": "ok" + } + }, + "UpsertOrderItemRequest": { + "properties": { + "item": { + "$ref": "#/components/schemas/OrderItemRequest-Input", + "description": "The order item to add or update." + }, + "item_id": { + "anyOf": [ + { + "$ref": "#/components/schemas/ItemId" + }, + { + "type": "null" + } + ], + "description": "The ID of an existing item to update. Omit to create a new item." + } + }, + "type": "object", + "required": [ + "item" + ], + "title": "UpsertOrderItemRequest", + "examples": [ + { + "item": { + "captions_sdh": false, + "destination_languages": [ + "hi", + "fr-FR", + "de" + ], + "include_captions": true, + "include_source_captions": false, + "instructions": "Voices don't need to match the originals, prioritize native-sounding voices", + "kind": "dub", + "media_id": "prodmedia_01jgatk6h0fwxrtbjade61yqhx", + "source_language": "en" + } + }, + { + "item": { + "cue_options": { + "max_chars_per_line": 42, + "max_lines_per_cue": 2 + }, + "destination_languages": [ + "hi", + "fr-FR", + "de" + ], + "instructions": "Avoid splitting noun phrases across lines.", + "kind": "subtitles", + "media_ids": [ + "prodmedia_01jgatk6h0fwxrtbjade61yqhx", + "prodmedia_01jgb2zd68f8f9tfvbb968wb8z" + ], + "sdh": false, + "source_language": "en" + } + } + ] + }, + "UpsertOrderItemResponse": { + "properties": { + "item_id": { + "$ref": "#/components/schemas/ItemId", + "description": "The ID of the upserted order item." + }, + "quote": { + "anyOf": [ + { + "$ref": "#/components/schemas/QuoteInfo" + }, + { + "type": "null" + } + ], + "description": "The quoted price for this item." + } + }, + "type": "object", + "required": [ + "item_id" + ], + "title": "UpsertOrderItemResponse", + "example": { + "item_id": "proditem_01jgd3qhejfs7rm6swknz2ytjb", + "quote": { + "amount_usd": 11 + } + } + }, + "UrlModel": { + "properties": { + "url_string": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url String", + "description": "Full URL string" + }, + "scheme": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Scheme", + "description": "URL scheme (e.g., https)" + }, + "hostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Hostname", + "description": "URL hostname" + }, + "port": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Port", + "description": "URL port" + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "URL path" + }, + "query_string": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Query String", + "description": "URL query string" + } + }, + "additionalProperties": false, + "type": "object", + "title": "UrlModel", + "description": "OCSF URL object.\n\nSpec: https://schema.ocsf.io/1.6.0/objects/url" + }, + "UsageAggregationInterval": { + "type": "string", + "enum": [ + "hour", + "day", + "week", + "month", + "cumulative" + ], + "title": "UsageAggregationInterval", + "description": "The time interval over which to aggregate the usage data." + }, + "UsageCharactersResponseModel": { + "properties": { + "time": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Time", + "description": "The time axis with unix timestamps for each day." + }, + "usage": { + "additionalProperties": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "object", + "title": "Usage", + "description": "The usage of each breakdown type along the time axis." + } + }, + "type": "object", + "required": [ + "time", + "usage" + ], + "title": "UsageCharactersResponseModel", + "example": { + "time": [ + 1738252091000, + 1739404800000 + ], + "usage": { + "All": [ + 49, + 1053 + ] + } + } + }, + "UserAccessManagementActivityId": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 99 + ], + "title": "UserAccessManagementActivityId", + "description": "OCSF Activity IDs for User Access Management [3005] events.\n\nSpec: https://schema.ocsf.io/1.6.0/classes/user_access_management" + }, + "UserFeedback": { + "properties": { + "score": { + "$ref": "#/components/schemas/UserFeedbackScore" + }, + "time_in_call_secs": { + "type": "integer", + "title": "Time In Call Secs" + } + }, + "type": "object", + "required": [ + "score", + "time_in_call_secs" + ], + "title": "UserFeedback" + }, + "UserFeedbackScore": { + "type": "string", + "enum": [ + "like", + "dislike" + ], + "title": "UserFeedbackScore" + }, + "UserModel": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name", + "description": "Username" + }, + "uid": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Uid", + "description": "Unique user identifier" + }, + "type_id": { + "$ref": "#/components/schemas/UserTypeId", + "description": "Account type identifier", + "default": 1 + }, + "type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Type", + "description": "Account type description" + }, + "email_addr": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email Addr", + "description": "User email address" + }, + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Full Name", + "description": "Full name of the user" + }, + "domain": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Domain", + "description": "User's domain" + } + }, + "additionalProperties": false, + "type": "object", + "title": "UserModel", + "description": "OCSF User object.\n\nSpec: https://schema.ocsf.io/1.6.0/objects/user" + }, + "UserResponseModel": { + "properties": { + "user_id": { + "type": "string", + "title": "User Id", + "description": "The unique identifier of the user." + }, + "subscription": { + "$ref": "#/components/schemas/SubscriptionResponseModel", + "description": "Details of the user's subscription." + }, + "is_new_user": { + "type": "boolean", + "title": "Is New User", + "description": "Whether the user is new. This field is deprecated and will be removed in the future. Use 'created_at' instead.", + "deprecated": true + }, + "xi_api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Xi Api Key", + "description": "The API key of the user." + }, + "can_use_delayed_payment_methods": { + "type": "boolean", + "title": "Can Use Delayed Payment Methods", + "description": "This field is deprecated and will be removed in a future major version. Instead use subscription.trust_on_invoice_creation.", + "deprecated": true + }, + "is_onboarding_completed": { + "type": "boolean", + "title": "Is Onboarding Completed", + "description": "Whether the user's onboarding is completed." + }, + "is_onboarding_checklist_completed": { + "type": "boolean", + "title": "Is Onboarding Checklist Completed", + "description": "Whether the user's onboarding checklist is completed." + }, + "show_compliance_terms": { + "type": "boolean", + "title": "Show Compliance Terms", + "description": "Whether to show compliance terms (ToS, Privacy Policy, biometric consent) during onboarding. Set for users signing up from the marketing site.", + "default": false + }, + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Name", + "description": "First name of the user." + }, + "is_api_key_hashed": { + "type": "boolean", + "title": "Is Api Key Hashed", + "description": "Whether the user's API key is hashed.", + "default": false + }, + "xi_api_key_preview": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Xi Api Key Preview", + "description": "The preview of the user's API key." + }, + "referral_link_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Referral Link Code", + "description": "The referral link code of the user." + }, + "partnerstack_partner_default_link": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Partnerstack Partner Default Link", + "description": "The Partnerstack partner default link of the user." + }, + "created_at": { + "type": "integer", + "title": "Created At", + "description": "The unix timestamp of the user's creation. 0 if the user was created before the unix timestamp was added." + }, + "seat_type": { + "$ref": "#/components/schemas/SeatType", + "description": "The seat type of the user." + } + }, + "type": "object", + "required": [ + "user_id", + "subscription", + "is_new_user", + "can_use_delayed_payment_methods", + "is_onboarding_completed", + "is_onboarding_checklist_completed", + "created_at", + "seat_type" + ], + "title": "UserResponseModel", + "example": { + "can_use_delayed_payment_methods": false, + "created_at": 1753999199, + "first_name": "John", + "is_api_key_hashed": false, + "is_new_user": false, + "is_onboarding_checklist_completed": true, + "is_onboarding_completed": true, + "seat_type": "workspace_member", + "show_compliance_terms": false, + "subscription": { + "allowed_to_extend_character_limit": false, + "billing_period": "monthly_period", + "can_extend_character_limit": false, + "can_extend_voice_limit": false, + "can_use_instant_voice_cloning": true, + "can_use_professional_voice_cloning": true, + "character_count": 17231, + "character_limit": 100000, + "character_refresh_period": "monthly_period", + "currency": "usd", + "current_overage": { + "amount": "0", + "currency": "usd" + }, + "max_character_limit_extension": 10000, + "max_credit_limit_extension": 10000, + "max_voice_add_edits": 230, + "next_character_count_reset_unix": 1738356858, + "professional_voice_limit": 1, + "professional_voice_slots_used": 0, + "status": "free", + "tier": "trial", + "voice_add_edit_counter": 212, + "voice_limit": 120, + "voice_slots_used": 1 + }, + "user_id": "1234567890", + "xi_api_key": "8so27l7327189x0h939ekx293380l920" + } + }, + "UserTypeId": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 99 + ], + "title": "UserTypeId", + "description": "OCSF User type IDs.\n\nSpec: https://schema.ocsf.io/1.6.0/objects/user" + }, + "UsersSortBy": { + "type": "string", + "enum": [ + "last_contact_unix_secs", + "conversation_count" + ], + "title": "UsersSortBy" + }, + "UtteranceResponseModel": { + "properties": { + "start": { + "type": "number", + "title": "Start", + "description": "The start time of the utterance in seconds." + }, + "end": { + "type": "number", + "title": "End", + "description": "The end time of the utterance in seconds." + } + }, + "type": "object", + "required": [ + "start", + "end" + ], + "title": "UtteranceResponseModel", + "example": { + "end": 1, + "start": 0 + } + }, + "VADConfig": { + "properties": { + "background_voice_detection": { + "type": "boolean", + "title": "Background Voice Detection", + "description": "Whether to use background voice filtering", + "default": false, + "x-fern-ignore": true + } + }, + "type": "object", + "title": "VADConfig", + "example": { + "background_voice_detection": false + } + }, + "VADConfigWorkflowOverride": { + "properties": { + "background_voice_detection": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Background Voice Detection", + "description": "Whether to use background voice filtering", + "x-fern-ignore": true + } + }, + "type": "object", + "title": "VADConfigWorkflowOverride", + "example": { + "background_voice_detection": false + } + }, + "VOICE_CATEGORY": { + "type": "string", + "enum": [ + "premade", + "cloned", + "generated", + "professional", + "famous" + ] + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + }, + "Verbosity": { + "type": "string", + "enum": [ + "auto", + "concise", + "thorough" + ], + "title": "Verbosity" + }, + "VerificationAttemptResponseModel": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The text of the verification attempt." + }, + "date_unix": { + "type": "integer", + "title": "Date Unix", + "description": "The date of the verification attempt in Unix time." + }, + "accepted": { + "type": "boolean", + "title": "Accepted", + "description": "Whether the verification attempt was accepted." + }, + "similarity": { + "type": "number", + "title": "Similarity", + "description": "The similarity of the verification attempt." + }, + "levenshtein_distance": { + "type": "number", + "title": "Levenshtein Distance", + "description": "The Levenshtein distance of the verification attempt." + }, + "recording": { + "anyOf": [ + { + "$ref": "#/components/schemas/RecordingResponseModel" + }, + { + "type": "null" + } + ], + "description": "The recording of the verification attempt." + } + }, + "type": "object", + "required": [ + "text", + "date_unix", + "accepted", + "similarity", + "levenshtein_distance" + ], + "title": "VerificationAttemptResponseModel", + "example": { + "accepted": true, + "date_unix": 1714204800, + "levenshtein_distance": 2, + "recording": { + "mime_type": "audio/mpeg", + "recording_id": "CwhRBWXzGAHq8TQ4Fs17", + "size_bytes": 1000000, + "transcription": "Hello, how are you?", + "upload_date_unix": 1714204800 + }, + "similarity": 0.95, + "text": "Hello, how are you?" + } + }, + "VerifiedVoiceLanguageResponseModel": { + "properties": { + "language": { + "type": "string", + "title": "Language", + "description": "The language of the voice." + }, + "model_id": { + "type": "string", + "title": "Model Id", + "description": "The voice's model ID." + }, + "accent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent", + "description": "The voice's accent, if applicable." + }, + "locale": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Locale", + "description": "The voice's locale, if applicable." + }, + "preview_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Preview Url", + "description": "The voice's preview URL, if applicable." + } + }, + "type": "object", + "required": [ + "language", + "model_id" + ], + "title": "VerifiedVoiceLanguageResponseModel", + "example": { + "accent": "American", + "language": "en", + "model_id": "eleven_turbo_v2_5" + } + }, + "VerifyPVCVoiceCaptchaResponseModel": { + "properties": { + "status": { + "type": "string", + "title": "Status", + "description": "The status of the verify PVC captcha request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned." + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "VerifyPVCVoiceCaptchaResponseModel", + "example": { + "status": "ok" + } + }, + "VideoAnalysis": { + "properties": { + "status": { + "type": "string", + "enum": [ + "processing", + "completed", + "failed" + ], + "title": "Status" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/VideoAnalysisResult" + }, + { + "type": "null" + } + ] + }, + "updated_at_ms": { + "type": "integer", + "title": "Updated At Ms" + } + }, + "type": "object", + "required": [ + "status", + "data" + ], + "title": "VideoAnalysis" + }, + "VideoAnalysisResult": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "description": { + "type": "string", + "title": "Description" + }, + "content_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type" + }, + "overall_pacing": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Overall Pacing" + }, + "subjects": { + "items": { + "$ref": "#/components/schemas/VideoSubject" + }, + "type": "array", + "title": "Subjects" + }, + "segments": { + "items": { + "$ref": "#/components/schemas/VideoSegment" + }, + "type": "array", + "title": "Segments" + }, + "key_moments": { + "items": { + "$ref": "#/components/schemas/VideoKeyMoment" + }, + "type": "array", + "title": "Key Moments" + } + }, + "type": "object", + "required": [ + "title", + "description" + ], + "title": "VideoAnalysisResult" + }, + "VideoKeyMoment": { + "properties": { + "timestamp_ms": { + "type": "integer", + "title": "Timestamp Ms" + }, + "type": { + "type": "string", + "title": "Type" + }, + "description": { + "type": "string", + "title": "Description" + } + }, + "type": "object", + "required": [ + "timestamp_ms", + "type", + "description" + ], + "title": "VideoKeyMoment" + }, + "VideoSegment": { + "properties": { + "start_ms": { + "type": "integer", + "title": "Start Ms" + }, + "end_ms": { + "type": "integer", + "title": "End Ms" + }, + "description": { + "type": "string", + "title": "Description" + }, + "subjects": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Subjects" + }, + "shot_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Shot Type" + }, + "camera_movement": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Camera Movement" + }, + "transition_in": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Transition In" + }, + "has_speech": { + "type": "boolean", + "title": "Has Speech", + "default": false + }, + "has_music": { + "type": "boolean", + "title": "Has Music", + "default": false + }, + "pacing": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Pacing" + } + }, + "type": "object", + "required": [ + "start_ms", + "end_ms", + "description" + ], + "title": "VideoSegment" + }, + "VideoSubject": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + } + }, + "type": "object", + "required": [ + "name", + "description" + ], + "title": "VideoSubject" + }, + "VisitedAgentRef": { + "properties": { + "agent_id": { + "type": "string", + "title": "Agent Id" + }, + "branch_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Branch Id" + } + }, + "type": "object", + "required": [ + "agent_id" + ], + "title": "VisitedAgentRef", + "description": "An agent (and optional branch) that participated in the call, in first-seen transcript order." + }, + "VoiceDesignRequestModel": { + "properties": { + "voice_description": { + "type": "string", + "maxLength": 1000, + "minLength": 20, + "title": "Voice Description", + "description": "Description to use for the created voice.", + "examples": [ + "A sassy squeaky mouse" + ] + }, + "model_id": { + "type": "string", + "enum": [ + "eleven_multilingual_ttv_v2", + "eleven_ttv_v3" + ], + "title": "Model Id", + "description": "Model to use for the voice generation. Possible values: eleven_multilingual_ttv_v2, eleven_ttv_v3.", + "default": "eleven_multilingual_ttv_v2", + "examples": [ + "eleven_multilingual_ttv_v2" + ] + }, + "text": { + "anyOf": [ + { + "type": "string", + "maxLength": 1000, + "minLength": 100 + }, + { + "type": "null" + } + ], + "title": "Text", + "description": "Text to generate, text length has to be between 100 and 1000.", + "examples": [ + "Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted." + ] + }, + "auto_generate_text": { + "type": "boolean", + "title": "Auto Generate Text", + "description": "Whether to automatically generate a text suitable for the voice description.", + "default": false + }, + "loudness": { + "type": "number", + "maximum": 1, + "minimum": -1, + "title": "Loudness", + "description": "Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS.", + "default": 0.5, + "examples": [ + 0.5 + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "Random number that controls the voice generation. Same seed with same inputs produces same voice.", + "examples": [ + 11 + ] + }, + "guidance_scale": { + "type": "number", + "maximum": 100, + "minimum": 0, + "title": "Guidance Scale", + "description": "Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale.", + "default": 5, + "examples": [ + 5 + ] + }, + "stream_previews": { + "type": "boolean", + "title": "Stream Previews", + "description": "Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint.", + "default": false, + "examples": [ + true + ] + }, + "should_enhance": { + "type": "boolean", + "title": "Should Enhance", + "description": "Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False", + "default": false, + "examples": [ + true + ] + }, + "remixing_session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Remixing Session Id", + "description": "The remixing session id.", + "examples": [ + "123" + ] + }, + "remixing_session_iteration_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Remixing Session Iteration Id", + "description": "The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created.", + "examples": [ + "123" + ] + }, + "quality": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": -1 + }, + { + "type": "null" + } + ], + "title": "Quality", + "description": "Higher quality results in better voice output but less variety.", + "examples": [ + 0.9 + ] + }, + "reference_audio_base64": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reference Audio Base64", + "description": "Reference audio to use for the voice generation. The audio should be base64 encoded. Only supported when using the eleven_ttv_v3 model." + }, + "prompt_strength": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Prompt Strength", + "description": "Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model.", + "examples": [ + 0.25 + ] + } + }, + "type": "object", + "required": [ + "voice_description" + ], + "title": "VoiceDesignRequestModel" + }, + "VoiceMailDetectionResultSuccessModel": { + "properties": { + "result_type": { + "type": "string", + "const": "voicemail_detection_success", + "title": "Result Type", + "default": "voicemail_detection_success" + }, + "status": { + "type": "string", + "const": "success", + "title": "Status", + "default": "success" + }, + "voicemail_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voicemail Message" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + } + }, + "type": "object", + "title": "VoiceMailDetectionResultSuccessModel" + }, + "VoicePreviewResponseModel": { + "properties": { + "audio_base_64": { + "type": "string", + "title": "Audio Base 64", + "description": "The base64 encoded audio of the preview." + }, + "generated_voice_id": { + "type": "string", + "title": "Generated Voice Id", + "description": "The ID of the generated voice. Use it to create a voice from the preview." + }, + "media_type": { + "type": "string", + "title": "Media Type", + "description": "The media type of the preview." + }, + "duration_secs": { + "type": "number", + "title": "Duration Secs", + "description": "The duration of the preview in seconds." + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "The language of the preview." + } + }, + "type": "object", + "required": [ + "audio_base_64", + "generated_voice_id", + "media_type", + "duration_secs", + "language" + ], + "title": "VoicePreviewResponseModel" + }, + "VoicePreviewsRequestModel": { + "properties": { + "voice_description": { + "type": "string", + "maxLength": 1000, + "minLength": 20, + "title": "Voice Description", + "description": "Description to use for the created voice.", + "examples": [ + "A sassy squeaky mouse" + ] + }, + "text": { + "anyOf": [ + { + "type": "string", + "maxLength": 1000, + "minLength": 100 + }, + { + "type": "null" + } + ], + "title": "Text", + "description": "Text to generate, text length has to be between 100 and 1000.", + "examples": [ + "Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted." + ] + }, + "auto_generate_text": { + "type": "boolean", + "title": "Auto Generate Text", + "description": "Whether to automatically generate a text suitable for the voice description.", + "default": false + }, + "loudness": { + "type": "number", + "maximum": 1, + "minimum": -1, + "title": "Loudness", + "description": "Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS.", + "default": 0.5, + "examples": [ + 0.5 + ] + }, + "quality": { + "type": "number", + "maximum": 1, + "minimum": -1, + "title": "Quality", + "description": "Higher quality results in better voice output but less variety.", + "default": 0.9, + "examples": [ + 0.9 + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "Random number that controls the voice generation. Same seed with same inputs produces same voice.", + "examples": [ + 11 + ] + }, + "guidance_scale": { + "type": "number", + "maximum": 100, + "minimum": 0, + "title": "Guidance Scale", + "description": "Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale.", + "default": 5, + "examples": [ + 5 + ] + }, + "should_enhance": { + "type": "boolean", + "title": "Should Enhance", + "description": "Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False", + "default": false, + "examples": [ + true + ] + } + }, + "type": "object", + "required": [ + "voice_description" + ], + "title": "VoicePreviewsRequestModel" + }, + "VoicePreviewsResponseModel": { + "properties": { + "previews": { + "items": { + "$ref": "#/components/schemas/VoicePreviewResponseModel" + }, + "type": "array", + "title": "Previews", + "description": "The previews of the generated voices." + }, + "text": { + "type": "string", + "title": "Text", + "description": "The text used to preview the voices." + } + }, + "type": "object", + "required": [ + "previews", + "text" + ], + "title": "VoicePreviewsResponseModel" + }, + "VoiceRemixRequestModel": { + "properties": { + "voice_description": { + "type": "string", + "maxLength": 1000, + "minLength": 5, + "title": "Voice Description", + "description": "Description of the changes to make to the voice.", + "examples": [ + "Make the voice have a higher pitch." + ] + }, + "text": { + "anyOf": [ + { + "type": "string", + "maxLength": 1000, + "minLength": 100 + }, + { + "type": "null" + } + ], + "title": "Text", + "description": "Text to generate, text length has to be between 100 and 1000.", + "examples": [ + "Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted." + ] + }, + "auto_generate_text": { + "type": "boolean", + "title": "Auto Generate Text", + "description": "Whether to automatically generate a text suitable for the voice description.", + "default": false + }, + "loudness": { + "type": "number", + "maximum": 1, + "minimum": -1, + "title": "Loudness", + "description": "Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS.", + "default": 0.5, + "examples": [ + 0.5 + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "Random number that controls the voice generation. Same seed with same inputs produces same voice.", + "examples": [ + 11 + ] + }, + "guidance_scale": { + "type": "number", + "maximum": 100, + "minimum": 0, + "title": "Guidance Scale", + "description": "Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale.", + "default": 2, + "examples": [ + 5 + ] + }, + "stream_previews": { + "type": "boolean", + "title": "Stream Previews", + "description": "Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint.", + "default": false, + "examples": [ + true + ] + }, + "remixing_session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Remixing Session Id", + "description": "The remixing session id.", + "examples": [ + "123" + ] + }, + "remixing_session_iteration_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Remixing Session Iteration Id", + "description": "The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created.", + "examples": [ + "123" + ] + }, + "prompt_strength": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Prompt Strength", + "description": "Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model.", + "examples": [ + 0.25 + ] + } + }, + "type": "object", + "required": [ + "voice_description" + ], + "title": "VoiceRemixRequestModel" + }, + "VoiceResponseModel": { + "properties": { + "voice_id": { + "type": "string", + "title": "Voice Id", + "description": "The ID of the voice." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the voice." + }, + "samples": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SampleResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Samples", + "description": "List of samples associated with the voice." + }, + "category": { + "type": "string", + "enum": [ + "generated", + "cloned", + "premade", + "professional", + "famous", + "high_quality" + ], + "title": "Category", + "description": "The category of the voice." + }, + "fine_tuning": { + "anyOf": [ + { + "$ref": "#/components/schemas/FineTuningResponseModel" + }, + { + "type": "null" + } + ], + "description": "Fine-tuning information for the voice." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Labels", + "description": "Labels associated with the voice." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of the voice." + }, + "preview_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Preview Url", + "description": "The preview URL of the voice." + }, + "available_for_tiers": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Available For Tiers", + "description": "The tiers the voice is available for." + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/VoiceSettingsResponseModel" + }, + { + "type": "null" + } + ], + "description": "The settings of the voice." + }, + "sharing": { + "anyOf": [ + { + "$ref": "#/components/schemas/VoiceSharingResponseModel" + }, + { + "type": "null" + } + ], + "description": "The sharing information of the voice." + }, + "high_quality_base_model_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "High Quality Base Model Ids", + "description": "The base model IDs for high-quality voices." + }, + "verified_languages": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/VerifiedVoiceLanguageResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Verified Languages", + "description": "The verified languages of the voice." + }, + "collection_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Collection Ids", + "description": "The IDs of collections this voice belongs to." + }, + "safety_control": { + "anyOf": [ + { + "type": "string", + "enum": [ + "NONE", + "BAN", + "CAPTCHA", + "ENTERPRISE_BAN", + "ENTERPRISE_CAPTCHA" + ] + }, + { + "type": "null" + } + ], + "title": "Safety Control", + "description": "The safety controls of the voice." + }, + "voice_verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/VoiceVerificationResponseModel" + }, + { + "type": "null" + } + ], + "description": "The voice verification of the voice." + }, + "permission_on_resource": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Permission On Resource", + "description": "The permission on the resource of the voice." + }, + "is_owner": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Owner", + "description": "Whether the voice is owned by the user." + }, + "is_legacy": { + "type": "boolean", + "title": "Is Legacy", + "description": "Whether the voice is legacy.", + "default": false + }, + "is_mixed": { + "type": "boolean", + "title": "Is Mixed", + "description": "Whether the voice is mixed.", + "default": false + }, + "favorited_at_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Favorited At Unix", + "description": "Timestamp when the voice was marked as favorite in Unix time." + }, + "created_at_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Created At Unix", + "description": "The creation time of the voice in Unix time." + }, + "is_bookmarked": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Bookmarked", + "description": "Whether the voice is bookmarked by the current user. Only relevant for community (library-copied) voices." + }, + "recording_quality": { + "anyOf": [ + { + "type": "string", + "enum": [ + "studio", + "good", + "ok", + "poor", + "bad" + ] + }, + { + "type": "null" + } + ], + "title": "Recording Quality", + "description": "The recording quality of the voice as determined by the review pipeline." + }, + "labelling_status": { + "anyOf": [ + { + "type": "string", + "enum": [ + "in_review", + "review_complete" + ] + }, + { + "type": "null" + } + ], + "title": "Labelling Status", + "description": "The review pipeline status of the voice." + }, + "recording_quality_reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Recording Quality Reason", + "description": "The reason for the recording quality assessment, as determined by the review pipeline." + } + }, + "type": "object", + "required": [ + "voice_id", + "name", + "category", + "labels", + "available_for_tiers", + "high_quality_base_model_ids" + ], + "title": "VoiceResponseModel", + "example": { + "available_for_tiers": [ + "creator", + "enterprise" + ], + "category": "professional", + "description": "A warm, expressive voice with a touch of humor.", + "fine_tuning": { + "is_allowed_to_fine_tune": true, + "manual_verification_requested": false, + "state": { + "eleven_multilingual_v2": "fine_tuned" + }, + "verification_attempts_count": 2, + "verification_failures": [] + }, + "high_quality_base_model_ids": [ + "eleven_v2_flash", + "eleven_flash_v2", + "eleven_turbo_v2_5", + "eleven_multilingual_v2", + "eleven_v2_5_flash", + "eleven_flash_v2_5", + "eleven_turbo_v2" + ], + "is_legacy": false, + "is_mixed": false, + "is_owner": false, + "labels": { + "accent": "American", + "age": "middle-aged", + "description": "expressive", + "gender": "female", + "use_case": "social media" + }, + "name": "Rachel", + "preview_url": "https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/405766b8-1f4e-4d3c-aba1-6f25333823ec.mp3", + "settings": { + "similarity_boost": 1, + "speed": 1, + "stability": 1, + "style": 0, + "use_speaker_boost": true + }, + "sharing": { + "category": "professional", + "cloned_by_count": 50, + "date_unix": 1714204800, + "description": "A female voice with a soft and friendly tone.", + "disable_at_unix": 1714204800, + "enabled_in_library": true, + "featured": true, + "financial_rewards_enabled": true, + "free_users_allowed": true, + "history_item_sample_id": "DCwhRBWXzGAHq8TQ4Fs18", + "labels": { + "accent": "American", + "gender": "female" + }, + "liked_by_count": 100, + "live_moderation_enabled": true, + "moderation_check": { + "captcha_checks": [ + 0.95, + 0.98 + ], + "captcha_ids": [ + "captcha1", + "captcha2" + ], + "date_checked_unix": 1714204800, + "description_check": true, + "description_value": "A female voice with a soft and friendly tone.", + "name_check": true, + "name_value": "Rachel", + "sample_checks": [ + 0.95, + 0.98 + ], + "sample_ids": [ + "sample1", + "sample2" + ] + }, + "name": "Rachel", + "notice_period": 30, + "original_voice_id": "DCwhRBWXzGAHq8TQ4Fs18", + "public_owner_id": "DCwhRBWXzGAHq8TQ4Fs18", + "rate": 0.05, + "reader_app_enabled": true, + "reader_restricted_on": [ + { + "resource_id": "FCwhRBWXzGAHq8TQ4Fs18", + "resource_type": "read" + } + ], + "review_status": "allowed", + "status": "enabled", + "voice_mixing_allowed": false, + "whitelisted_emails": [ + "example@example.com" + ] + }, + "verified_languages": [ + { + "accent": "american", + "language": "en", + "locale": "en-US", + "model_id": "eleven_multilingual_v2", + "preview_url": "https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/405766b8-1f4e-4d3c-aba1-6f25333823ec.mp3" + } + ], + "voice_id": "21m00Tcm4TlvDq8ikWAM", + "voice_verification": { + "is_verified": true, + "language": "en", + "requires_verification": false, + "verification_attempts": [ + { + "accepted": true, + "date_unix": 1714204800, + "levenshtein_distance": 2, + "recording": { + "mime_type": "audio/mpeg", + "recording_id": "CwhRBWXzGAHq8TQ4Fs17", + "size_bytes": 1000000, + "transcription": "Hello, how are you?", + "upload_date_unix": 1714204800 + }, + "similarity": 0.95, + "text": "Hello, how are you?" + } + ], + "verification_attempts_count": 0, + "verification_failures": [] + } + } + }, + "VoiceSamplePreviewResponseModel": { + "properties": { + "audio_base_64": { + "type": "string", + "title": "Audio Base 64", + "description": "The base64 encoded audio." + }, + "voice_id": { + "type": "string", + "title": "Voice Id", + "description": "The ID of the voice." + }, + "sample_id": { + "type": "string", + "title": "Sample Id", + "description": "The ID of the sample." + }, + "media_type": { + "type": "string", + "title": "Media Type", + "description": "The media type of the audio." + }, + "duration_secs": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Duration Secs", + "description": "The duration of the audio in seconds." + } + }, + "type": "object", + "required": [ + "audio_base_64", + "voice_id", + "sample_id", + "media_type" + ], + "title": "VoiceSamplePreviewResponseModel", + "example": { + "audio_base_64": "audio_base_64", + "duration_secs": 5, + "media_type": "audio/mpeg", + "sample_id": "DCwhRBWXzGAHq8TQ4Fs18", + "voice_id": "DCwhRBWXzGAHq8TQ4Fs18" + } + }, + "VoiceSampleVisualWaveformResponseModel": { + "properties": { + "sample_id": { + "type": "string", + "title": "Sample Id", + "description": "The ID of the sample." + }, + "visual_waveform": { + "items": { + "type": "number" + }, + "type": "array", + "title": "Visual Waveform", + "description": "The visual waveform of the sample, represented as a list of floats." + } + }, + "type": "object", + "required": [ + "sample_id", + "visual_waveform" + ], + "title": "VoiceSampleVisualWaveformResponseModel", + "example": { + "sample_id": "DCwhRBWXzGAHq8TQ4Fs18", + "visual_waveform": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5 + ] + } + }, + "VoiceSegment": { + "properties": { + "voice_id": { + "type": "string", + "title": "Voice Id", + "description": "The voice ID used for this segment" + }, + "start_time_seconds": { + "type": "number", + "title": "Start Time Seconds", + "description": "Start time of this voice segment" + }, + "end_time_seconds": { + "type": "number", + "title": "End Time Seconds", + "description": "End time of this voice segment" + }, + "character_start_index": { + "type": "integer", + "title": "Character Start Index", + "description": "Start index in the characters array" + }, + "character_end_index": { + "type": "integer", + "title": "Character End Index", + "description": "End index in the characters array (exclusive)" + }, + "dialogue_input_index": { + "type": "integer", + "title": "Dialogue Input Index", + "description": "Line of the dialogue (script) that this segment is a part of." + } + }, + "type": "object", + "required": [ + "voice_id", + "start_time_seconds", + "end_time_seconds", + "character_start_index", + "character_end_index", + "dialogue_input_index" + ], + "title": "VoiceSegment" + }, + "VoiceSettingsResponseModel": { + "properties": { + "stability": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Stability", + "description": "Determines how stable the voice is and the randomness between each generation. Lower values introduce broader emotional range for the voice. Higher values can result in a monotonous voice with limited emotion.", + "default": 0.5 + }, + "use_speaker_boost": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Use Speaker Boost", + "description": "This setting boosts the similarity to the original speaker. Using this setting requires a slightly higher computational load, which in turn increases latency.", + "default": true + }, + "similarity_boost": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Similarity Boost", + "description": "Determines how closely the AI should adhere to the original voice when attempting to replicate it.", + "default": 0.75 + }, + "style": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Style", + "description": "Determines the style exaggeration of the voice. This setting attempts to amplify the style of the original speaker. It does consume additional computational resources and might increase latency if set to anything other than 0.", + "default": 0 + }, + "speed": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Speed", + "description": "Adjusts the speed of the voice. A value of 1.0 is the default speed, while values less than 1.0 slow down the speech, and values greater than 1.0 speed it up.", + "default": 1 + } + }, + "type": "object", + "title": "VoiceSettingsResponseModel", + "example": { + "similarity_boost": 1, + "speed": 1, + "stability": 1, + "style": 0, + "use_speaker_boost": true + } + }, + "VoiceSharingModerationCheckResponseModel": { + "properties": { + "date_checked_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Date Checked Unix", + "description": "The date the moderation check was made in Unix time." + }, + "name_value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name Value", + "description": "The name value of the voice." + }, + "name_check": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Name Check", + "description": "Whether the name check was successful." + }, + "description_value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description Value", + "description": "The description value of the voice." + }, + "description_check": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Description Check", + "description": "Whether the description check was successful." + }, + "sample_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sample Ids", + "description": "A list of sample IDs." + }, + "sample_checks": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sample Checks", + "description": "A list of sample checks." + }, + "captcha_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Captcha Ids", + "description": "A list of captcha IDs." + }, + "captcha_checks": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Captcha Checks", + "description": "A list of CAPTCHA check values." + } + }, + "type": "object", + "title": "VoiceSharingModerationCheckResponseModel", + "example": { + "captcha_checks": [ + 0.95, + 0.98 + ], + "captcha_ids": [ + "captcha1", + "captcha2" + ], + "date_checked_unix": 1714204800, + "description_check": true, + "description_value": "A female voice with a soft and friendly tone.", + "name_check": true, + "name_value": "Rachel", + "sample_checks": [ + 0.95, + 0.98 + ], + "sample_ids": [ + "sample1", + "sample2" + ] + } + }, + "VoiceSharingResponseModel": { + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled", + "copied", + "copied_disabled" + ], + "title": "Status", + "description": "The status of the voice sharing." + }, + "history_item_sample_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "History Item Sample Id", + "description": "The sample ID of the history item." + }, + "date_unix": { + "type": "integer", + "title": "Date Unix", + "description": "The date of the voice sharing in Unix time." + }, + "whitelisted_emails": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Whitelisted Emails", + "description": "A list of whitelisted emails." + }, + "public_owner_id": { + "type": "string", + "title": "Public Owner Id", + "description": "The ID of the public owner." + }, + "original_voice_id": { + "type": "string", + "title": "Original Voice Id", + "description": "The ID of the original voice." + }, + "financial_rewards_enabled": { + "type": "boolean", + "title": "Financial Rewards Enabled", + "description": "Whether financial rewards are enabled." + }, + "free_users_allowed": { + "type": "boolean", + "title": "Free Users Allowed", + "description": "Whether free users are allowed." + }, + "live_moderation_enabled": { + "type": "boolean", + "title": "Live Moderation Enabled", + "description": "Whether live moderation is enabled." + }, + "rate": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Rate", + "description": "The rate of the voice sharing." + }, + "fiat_rate": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Fiat Rate", + "description": "The rate of the voice sharing in USD per 1000 credits." + }, + "notice_period": { + "type": "integer", + "title": "Notice Period", + "description": "The notice period of the voice sharing." + }, + "disable_at_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Disable At Unix", + "description": "The date of the voice sharing in Unix time." + }, + "voice_mixing_allowed": { + "type": "boolean", + "title": "Voice Mixing Allowed", + "description": "Whether voice mixing is allowed." + }, + "featured": { + "type": "boolean", + "title": "Featured", + "description": "Whether the voice is featured." + }, + "category": { + "type": "string", + "enum": [ + "generated", + "cloned", + "premade", + "professional", + "famous", + "high_quality" + ], + "title": "Category", + "description": "The category of the voice." + }, + "reader_app_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Reader App Enabled", + "description": "Whether the reader app is enabled." + }, + "image_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Image Url", + "description": "The image URL of the voice." + }, + "ban_reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ban Reason", + "description": "The ban reason of the voice." + }, + "liked_by_count": { + "type": "integer", + "title": "Liked By Count", + "description": "The number of likes on the voice." + }, + "cloned_by_count": { + "type": "integer", + "title": "Cloned By Count", + "description": "The number of clones on the voice." + }, + "name": { + "type": "string", + "title": "Name", + "description": "The name of the voice." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "The description of the voice." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Labels", + "description": "The labels of the voice." + }, + "review_status": { + "type": "string", + "enum": [ + "not_requested", + "pending", + "declined", + "allowed", + "allowed_with_changes" + ], + "title": "Review Status", + "description": "The review status of the voice." + }, + "review_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Review Message", + "description": "The review message of the voice." + }, + "enabled_in_library": { + "type": "boolean", + "title": "Enabled In Library", + "description": "Whether the voice is enabled in the library." + }, + "instagram_username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Instagram Username", + "description": "The Instagram username of the voice." + }, + "twitter_username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Twitter Username", + "description": "The Twitter/X username of the voice." + }, + "youtube_username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Youtube Username", + "description": "The YouTube username of the voice." + }, + "tiktok_username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tiktok Username", + "description": "The TikTok username of the voice." + }, + "moderation_check": { + "anyOf": [ + { + "$ref": "#/components/schemas/VoiceSharingModerationCheckResponseModel" + }, + { + "type": "null" + } + ], + "description": "The moderation check of the voice." + }, + "reader_restricted_on": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ReaderResourceResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Reader Restricted On", + "description": "The reader restricted on of the voice." + } + }, + "type": "object", + "required": [ + "status", + "date_unix", + "whitelisted_emails", + "public_owner_id", + "original_voice_id", + "financial_rewards_enabled", + "free_users_allowed", + "live_moderation_enabled", + "notice_period", + "voice_mixing_allowed", + "featured", + "category", + "liked_by_count", + "cloned_by_count", + "name", + "labels", + "review_status", + "enabled_in_library" + ], + "title": "VoiceSharingResponseModel", + "example": { + "category": "professional", + "cloned_by_count": 50, + "date_unix": 1714204800, + "description": "A female voice with a soft and friendly tone.", + "disable_at_unix": 1714204800, + "enabled_in_library": true, + "featured": true, + "financial_rewards_enabled": true, + "free_users_allowed": true, + "history_item_sample_id": "DCwhRBWXzGAHq8TQ4Fs18", + "labels": { + "accent": "American", + "gender": "female" + }, + "liked_by_count": 100, + "live_moderation_enabled": true, + "moderation_check": { + "captcha_checks": [ + 0.95, + 0.98 + ], + "captcha_ids": [ + "captcha1", + "captcha2" + ], + "date_checked_unix": 1714204800, + "description_check": true, + "description_value": "A female voice with a soft and friendly tone.", + "name_check": true, + "name_value": "Rachel", + "sample_checks": [ + 0.95, + 0.98 + ], + "sample_ids": [ + "sample1", + "sample2" + ] + }, + "name": "Rachel", + "notice_period": 30, + "original_voice_id": "DCwhRBWXzGAHq8TQ4Fs18", + "public_owner_id": "DCwhRBWXzGAHq8TQ4Fs18", + "rate": 0.05, + "reader_app_enabled": true, + "reader_restricted_on": [ + { + "resource_id": "FCwhRBWXzGAHq8TQ4Fs18", + "resource_type": "read" + } + ], + "review_status": "allowed", + "status": "enabled", + "voice_mixing_allowed": false, + "whitelisted_emails": [ + "example@example.com" + ] + } + }, + "VoiceStatisticsResponseModel": { + "properties": { + "voice_id": { + "type": "string", + "title": "Voice Id", + "description": "The voice ID." + }, + "characters_unconverted": { + "type": "integer", + "title": "Characters Unconverted", + "description": "The number of unconverted characters for this voice." + }, + "characters_converted": { + "type": "integer", + "title": "Characters Converted", + "description": "The number of converted characters for this voice." + }, + "credits_needed_to_convert": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Credits Needed To Convert", + "description": "The number of credits needed to convert the remaining audio for this voice." + } + }, + "type": "object", + "required": [ + "voice_id", + "characters_unconverted", + "characters_converted" + ], + "title": "VoiceStatisticsResponseModel" + }, + "VoiceVerificationResponseModel": { + "properties": { + "requires_verification": { + "type": "boolean", + "title": "Requires Verification", + "description": "Whether the voice requires verification." + }, + "is_verified": { + "type": "boolean", + "title": "Is Verified", + "description": "Whether the voice has been verified." + }, + "verification_failures": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Verification Failures", + "description": "List of verification failures." + }, + "verification_attempts_count": { + "type": "integer", + "title": "Verification Attempts Count", + "description": "The number of verification attempts." + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "The language of the voice." + }, + "verification_attempts": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/VerificationAttemptResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Verification Attempts", + "description": "Number of times a verification was attempted." + } + }, + "type": "object", + "required": [ + "requires_verification", + "is_verified", + "verification_failures", + "verification_attempts_count" + ], + "title": "VoiceVerificationResponseModel", + "example": { + "is_verified": true, + "language": "en", + "requires_verification": false, + "verification_attempts": [ + { + "accepted": true, + "date_unix": 1714204800, + "levenshtein_distance": 2, + "recording": { + "mime_type": "audio/mpeg", + "recording_id": "CwhRBWXzGAHq8TQ4Fs17", + "size_bytes": 1000000, + "transcription": "Hello, how are you?", + "upload_date_unix": 1714204800 + }, + "similarity": 0.95, + "text": "Hello, how are you?" + } + ], + "verification_attempts_count": 0, + "verification_failures": [] + } + }, + "VoicemailDetectionToolConfig": { + "properties": { + "system_tool_type": { + "type": "string", + "const": "voicemail_detection", + "title": "System Tool Type", + "default": "voicemail_detection" + }, + "voicemail_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voicemail Message", + "description": "Optional message to leave on voicemail when detected. If not provided, the call will end immediately when voicemail is detected. Supports dynamic variables (e.g., {{system__time}}, {{system__call_duration_secs}}, {{custom_variable}})." + } + }, + "type": "object", + "title": "VoicemailDetectionToolConfig", + "description": "Allows the agent to detect when a voicemail system is encountered.\n\nThis tool should be invoked by the LLM when it detects that the call has been\nanswered by a voicemail system rather than a human. If a voicemail message\nis configured, it will be played; otherwise the call will end immediately." + }, + "WebhookAuthMethodType": { + "type": "string", + "enum": [ + "hmac", + "oauth2", + "mtls" + ], + "title": "WebhookAuthMethodType" + }, + "WebhookEventType": { + "type": "string", + "enum": [ + "transcript", + "audio", + "call_initiation_failure" + ], + "title": "WebhookEventType" + }, + "WebhookHMACSettings": { + "properties": { + "auth_type": { + "type": "string", + "const": "hmac", + "title": "Auth Type", + "description": "The authentication type for this webhook" + }, + "name": { + "type": "string", + "title": "Name", + "description": "The display name for this webhook" + }, + "webhook_url": { + "type": "string", + "title": "Webhook Url", + "description": "The HTTPS callback URL that will be called when this webhook is triggered" + }, + "request_headers": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Request Headers", + "description": "Optional custom request headers to include with each webhook delivery" + } + }, + "type": "object", + "required": [ + "auth_type", + "name", + "webhook_url" + ], + "title": "WebhookHMACSettings", + "description": "Settings for creating an HMAC-authenticated webhook" + }, + "WebhookToolApiSchemaConfig-Input": { + "properties": { + "request_headers": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "$ref": "#/components/schemas/ConvAIDynamicVariable" + }, + { + "$ref": "#/components/schemas/ConvAIEnvVarLocator" + } + ] + }, + "type": "object", + "title": "Request Headers", + "description": "Headers that should be included in the request" + }, + "url": { + "type": "string", + "title": "Url", + "description": "The URL that the webhook will be sent to. May include path parameters, e.g. https://example.com/agents/{agent_id}" + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "title": "Method", + "description": "The HTTP method to use for the webhook", + "default": "GET" + }, + "path_params_schema": { + "additionalProperties": { + "$ref": "#/components/schemas/LiteralJsonSchemaProperty" + }, + "type": "object", + "title": "Path Params Schema", + "description": "Schema for path parameters, if any. The keys should match the placeholders in the URL." + }, + "query_params_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/QueryParamsJsonSchema" + }, + { + "type": "null" + } + ], + "description": "Schema for any query params, if any. These will be added to end of the URL as query params. Note: properties in a query param must all be literal types" + }, + "request_body_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Input" + }, + { + "type": "null" + } + ], + "description": "Schema for the body parameters, if any. Used for POST/PATCH/PUT requests. The schema should be an object which will be sent as the json body" + }, + "response_body_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Input" + }, + { + "type": "null" + } + ], + "description": "Schema describing the expected response body structure. For documentation only; not surfaced to the LLM." + }, + "content_type": { + "type": "string", + "enum": [ + "application/json", + "application/x-www-form-urlencoded" + ], + "title": "Content Type", + "description": "Content type for the request body. Only applies to POST/PUT/PATCH requests.", + "default": "application/json" + }, + "auth_connection": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionLocator" + }, + { + "$ref": "#/components/schemas/EnvironmentAuthConnectionLocator" + }, + { + "type": "null" + } + ], + "title": "Auth Connection", + "description": "Optional auth connection to use for authentication with this webhook" + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "WebhookToolApiSchemaConfig", + "example": { + "method": "GET", + "path_params_schema": { + "agent_id": { + "type": "string" + } + }, + "query_params_schema": { + "param1": { + "type": "string" + } + }, + "request_body_schema": { + "param1": { + "type": "string" + } + }, + "request_headers": { + "Authorization": "Bearer {api_key}" + }, + "url": "https://example.com/agents/{agent_id}" + } + }, + "WebhookToolApiSchemaConfig-Output": { + "properties": { + "request_headers": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ConvAISecretLocator" + }, + { + "$ref": "#/components/schemas/ConvAIDynamicVariable" + }, + { + "$ref": "#/components/schemas/ConvAIEnvVarLocator" + } + ] + }, + "type": "object", + "title": "Request Headers", + "description": "Headers that should be included in the request" + }, + "url": { + "type": "string", + "title": "Url", + "description": "The URL that the webhook will be sent to. May include path parameters, e.g. https://example.com/agents/{agent_id}" + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "title": "Method", + "description": "The HTTP method to use for the webhook", + "default": "GET" + }, + "path_params_schema": { + "additionalProperties": { + "$ref": "#/components/schemas/LiteralJsonSchemaProperty" + }, + "type": "object", + "title": "Path Params Schema", + "description": "Schema for path parameters, if any. The keys should match the placeholders in the URL." + }, + "query_params_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/QueryParamsJsonSchema" + }, + { + "type": "null" + } + ], + "description": "Schema for any query params, if any. These will be added to end of the URL as query params. Note: properties in a query param must all be literal types" + }, + "request_body_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Output" + }, + { + "type": "null" + } + ], + "description": "Schema for the body parameters, if any. Used for POST/PATCH/PUT requests. The schema should be an object which will be sent as the json body" + }, + "response_body_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Output" + }, + { + "type": "null" + } + ], + "description": "Schema describing the expected response body structure. For documentation only; not surfaced to the LLM." + }, + "content_type": { + "type": "string", + "enum": [ + "application/json", + "application/x-www-form-urlencoded" + ], + "title": "Content Type", + "description": "Content type for the request body. Only applies to POST/PUT/PATCH requests.", + "default": "application/json" + }, + "auth_connection": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionLocator" + }, + { + "$ref": "#/components/schemas/EnvironmentAuthConnectionLocator" + }, + { + "type": "null" + } + ], + "title": "Auth Connection", + "description": "Optional auth connection to use for authentication with this webhook" + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "WebhookToolApiSchemaConfig", + "example": { + "method": "GET", + "path_params_schema": { + "agent_id": { + "type": "string" + } + }, + "query_params_schema": { + "param1": { + "type": "string" + } + }, + "request_body_schema": { + "param1": { + "type": "string" + } + }, + "request_headers": { + "Authorization": "Bearer {api_key}" + }, + "url": "https://example.com/agents/{agent_id}" + } + }, + "WebhookToolConfig-Input": { + "properties": { + "type": { + "type": "string", + "const": "webhook", + "title": "Type", + "description": "The type of tool", + "default": "webhook" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does." + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 120, + "minimum": 5, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive).", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "dynamic_variables": { + "$ref": "#/components/schemas/DynamicVariablesConfig-Input", + "description": "Configuration for dynamic variables" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + }, + "api_schema": { + "$ref": "#/components/schemas/WebhookToolApiSchemaConfig-Input", + "description": "The schema for the outgoing webhoook, including parameters and URL specification" + } + }, + "type": "object", + "required": [ + "name", + "description", + "api_schema" + ], + "title": "WebhookToolConfig", + "description": "A webhook tool is a tool that calls an external webhook from our server", + "example": { + "response_timeout_secs": 20, + "type": "webhook" + } + }, + "WebhookToolConfig-Output": { + "properties": { + "type": { + "type": "string", + "const": "webhook", + "title": "Type", + "description": "The type of tool", + "default": "webhook" + }, + "name": { + "type": "string", + "minLength": 0, + "pattern": "^[a-zA-Z0-9_-]{1,64}$", + "title": "Name" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description", + "description": "Description of when the tool should be used and what it does." + }, + "response_timeout_secs": { + "type": "integer", + "maximum": 120, + "minimum": 5, + "title": "Response Timeout Secs", + "description": "The maximum time in seconds to wait for the tool call to complete. Must be between 5 and 120 seconds (inclusive).", + "default": 20 + }, + "disable_interruptions": { + "type": "boolean", + "title": "Disable Interruptions", + "description": "If true, the user will not be able to interrupt the agent while this tool is running.", + "default": false + }, + "force_pre_tool_speech": { + "type": "boolean", + "title": "Force Pre Tool Speech", + "description": "DEPRECATED: use `pre_tool_speech` instead. If true, the agent will speak before the tool call.", + "default": false, + "deprecated": true + }, + "pre_tool_speech": { + "$ref": "#/components/schemas/PreToolSpeechMode", + "description": "Controls whether the agent speaks before this tool is called. 'auto' (default) decides based on recent tool latency, 'force' always asks the agent to speak, 'off' fully opts out regardless of latency.", + "default": "auto" + }, + "assignments": { + "items": { + "$ref": "#/components/schemas/DynamicVariableAssignment" + }, + "type": "array", + "title": "Assignments", + "description": "Configuration for extracting values from tool responses and assigning them to dynamic variables" + }, + "tool_call_sound": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolCallSoundType" + }, + { + "type": "null" + } + ], + "description": "Predefined tool call sound type to play during tool execution. If not specified, no tool call sound will be played.", + "x-convai-client-override": true + }, + "tool_call_sound_behavior": { + "$ref": "#/components/schemas/ToolCallSoundBehavior", + "description": "Determines when the tool call sound should play. 'auto' only plays when there's pre-tool speech, 'always' plays for every tool call.", + "default": "auto" + }, + "tool_error_handling_mode": { + "$ref": "#/components/schemas/ToolErrorHandlingMode", + "description": "Controls how tool errors are processed before being shared with the agent. 'auto' determines handling based on tool type (summarized for native integrations, hide for others), 'summarized' sends an LLM-generated summary, 'passthrough' sends the raw error, 'hide' does not share the error with the agent.", + "default": "auto" + }, + "dynamic_variables": { + "$ref": "#/components/schemas/DynamicVariablesConfig-Output", + "description": "Configuration for dynamic variables" + }, + "execution_mode": { + "$ref": "#/components/schemas/ToolExecutionMode", + "description": "Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations.", + "default": "immediate" + }, + "api_schema": { + "$ref": "#/components/schemas/WebhookToolApiSchemaConfig-Output", + "description": "The schema for the outgoing webhoook, including parameters and URL specification" + } + }, + "type": "object", + "required": [ + "name", + "description", + "api_schema" + ], + "title": "WebhookToolConfig", + "description": "A webhook tool is a tool that calls an external webhook from our server", + "example": { + "response_timeout_secs": 20, + "type": "webhook" + } + }, + "WebhookTranscriptFormat": { + "type": "string", + "enum": [ + "json", + "opentelemetry" + ], + "title": "WebhookTranscriptFormat", + "default": "json" + }, + "WebhookUsageType": { + "type": "string", + "enum": [ + "ConvAI Agent Settings", + "ConvAI Settings", + "Voice Library Removal Notices", + "Speech to Text" + ], + "title": "WebhookUsageType" + }, + "WhatsAppAuthResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "auth_type": { + "type": "string", + "const": "whatsapp_auth", + "title": "Auth Type", + "default": "whatsapp_auth" + }, + "provider": { + "type": "string", + "const": "whatsapp", + "title": "Provider", + "default": "whatsapp" + }, + "phone_number_id": { + "type": "string", + "title": "Phone Number Id" + }, + "id": { + "type": "string", + "title": "Id" + }, + "used_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthConnectionDependencies" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "name", + "phone_number_id", + "id" + ], + "title": "WhatsAppAuthResponse" + }, + "WhatsAppConversationInfo": { + "properties": { + "direction": { + "type": "string", + "enum": [ + "inbound", + "outbound", + "unknown" + ], + "title": "Direction", + "default": "unknown" + }, + "whatsapp_phone_number_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Whatsapp Phone Number Id" + }, + "whatsapp_user_id": { + "type": "string", + "title": "Whatsapp User Id" + }, + "awaiting_first_user_message": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Awaiting First User Message" + } + }, + "type": "object", + "required": [ + "whatsapp_user_id" + ], + "title": "WhatsAppConversationInfo" + }, + "WhatsAppOutboundCallResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success" + }, + "message": { + "type": "string", + "title": "Message" + }, + "conversation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Conversation Id" + } + }, + "type": "object", + "required": [ + "success", + "message", + "conversation_id" + ], + "title": "WhatsAppOutboundCallResponse" + }, + "WhatsAppOutboundMessageResponse": { + "properties": { + "conversation_id": { + "type": "string", + "title": "Conversation Id" + } + }, + "type": "object", + "required": [ + "conversation_id" + ], + "title": "WhatsAppOutboundMessageResponse" + }, + "WhatsAppTemplateBodyComponentParams": { + "properties": { + "type": { + "type": "string", + "const": "body", + "title": "Type", + "default": "body" + }, + "parameters": { + "items": { + "$ref": "#/components/schemas/WhatsAppTemplateTextParam" + }, + "type": "array", + "title": "Parameters" + } + }, + "type": "object", + "required": [ + "parameters" + ], + "title": "WhatsAppTemplateBodyComponentParams" + }, + "WhatsAppTemplateButtonComponentParams": { + "properties": { + "type": { + "type": "string", + "const": "button", + "title": "Type", + "default": "button" + }, + "parameters": { + "items": { + "$ref": "#/components/schemas/WhatsAppTemplateTextParam" + }, + "type": "array", + "title": "Parameters" + }, + "index": { + "type": "integer", + "title": "Index" + }, + "sub_type": { + "type": "string", + "title": "Sub Type" + } + }, + "type": "object", + "required": [ + "parameters", + "index", + "sub_type" + ], + "title": "WhatsAppTemplateButtonComponentParams" + }, + "WhatsAppTemplateDocumentParam": { + "properties": { + "type": { + "type": "string", + "const": "document", + "title": "Type", + "default": "document" + }, + "document": { + "$ref": "#/components/schemas/WhatsAppTemplateDocumentParamDetails" + } + }, + "type": "object", + "required": [ + "document" + ], + "title": "WhatsAppTemplateDocumentParam" + }, + "WhatsAppTemplateDocumentParamDetails": { + "properties": { + "link": { + "type": "string", + "title": "Link" + }, + "filename": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Filename" + } + }, + "type": "object", + "required": [ + "link" + ], + "title": "WhatsAppTemplateDocumentParamDetails" + }, + "WhatsAppTemplateHeaderComponentParams": { + "properties": { + "type": { + "type": "string", + "const": "header", + "title": "Type", + "default": "header" + }, + "parameters": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/WhatsAppTemplateTextParam" + }, + { + "$ref": "#/components/schemas/WhatsAppTemplateImageParam" + }, + { + "$ref": "#/components/schemas/WhatsAppTemplateDocumentParam" + }, + { + "$ref": "#/components/schemas/WhatsAppTemplateLocationParam" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "document": "#/components/schemas/WhatsAppTemplateDocumentParam", + "image": "#/components/schemas/WhatsAppTemplateImageParam", + "location": "#/components/schemas/WhatsAppTemplateLocationParam", + "text": "#/components/schemas/WhatsAppTemplateTextParam" + } + } + }, + "type": "array", + "title": "Parameters" + } + }, + "type": "object", + "required": [ + "parameters" + ], + "title": "WhatsAppTemplateHeaderComponentParams" + }, + "WhatsAppTemplateImageParam": { + "properties": { + "type": { + "type": "string", + "const": "image", + "title": "Type", + "default": "image" + }, + "image": { + "$ref": "#/components/schemas/WhatsAppTemplateImageParamDetails" + } + }, + "type": "object", + "required": [ + "image" + ], + "title": "WhatsAppTemplateImageParam" + }, + "WhatsAppTemplateImageParamDetails": { + "properties": { + "link": { + "type": "string", + "title": "Link" + } + }, + "type": "object", + "required": [ + "link" + ], + "title": "WhatsAppTemplateImageParamDetails" + }, + "WhatsAppTemplateLocationParam": { + "properties": { + "type": { + "type": "string", + "const": "location", + "title": "Type", + "default": "location" + }, + "location": { + "$ref": "#/components/schemas/WhatsAppTemplateLocationParamDetails" + } + }, + "type": "object", + "required": [ + "location" + ], + "title": "WhatsAppTemplateLocationParam" + }, + "WhatsAppTemplateLocationParamDetails": { + "properties": { + "latitude": { + "type": "string", + "title": "Latitude" + }, + "longitude": { + "type": "string", + "title": "Longitude" + }, + "name": { + "type": "string", + "title": "Name" + }, + "address": { + "type": "string", + "title": "Address" + } + }, + "type": "object", + "required": [ + "latitude", + "longitude", + "name", + "address" + ], + "title": "WhatsAppTemplateLocationParamDetails" + }, + "WhatsAppTemplateTextParam": { + "properties": { + "parameter_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parameter Name" + }, + "type": { + "type": "string", + "const": "text", + "title": "Type", + "default": "text" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "WhatsAppTemplateTextParam" + }, + "WidgetConfig-Input": { + "properties": { + "variant": { + "$ref": "#/components/schemas/EmbedVariant", + "description": "The variant of the widget", + "default": "full" + }, + "placement": { + "$ref": "#/components/schemas/WidgetPlacement", + "description": "The placement of the widget on the screen", + "default": "bottom-right" + }, + "expandable": { + "$ref": "#/components/schemas/WidgetExpandable", + "description": "Whether the widget is expandable", + "default": "never" + }, + "avatar": { + "anyOf": [ + { + "$ref": "#/components/schemas/OrbAvatar" + }, + { + "$ref": "#/components/schemas/URLAvatar" + }, + { + "$ref": "#/components/schemas/ImageAvatar" + } + ], + "title": "Avatar", + "description": "The avatar of the widget" + }, + "feedback_mode": { + "$ref": "#/components/schemas/WidgetFeedbackMode", + "description": "The feedback mode of the widget", + "default": "none" + }, + "end_feedback": { + "anyOf": [ + { + "$ref": "#/components/schemas/WidgetEndFeedbackConfig" + }, + { + "type": "null" + } + ], + "description": "Configuration for feedback collected at the end of the conversation" + }, + "bg_color": { + "type": "string", + "title": "Bg Color", + "description": "The background color of the widget", + "default": "#ffffff" + }, + "text_color": { + "type": "string", + "title": "Text Color", + "description": "The text color of the widget", + "default": "#000000" + }, + "btn_color": { + "type": "string", + "title": "Btn Color", + "description": "The button color of the widget", + "default": "#000000" + }, + "btn_text_color": { + "type": "string", + "title": "Btn Text Color", + "description": "The button text color of the widget", + "default": "#ffffff" + }, + "border_color": { + "type": "string", + "title": "Border Color", + "description": "The border color of the widget", + "default": "#e1e1e1" + }, + "focus_color": { + "type": "string", + "title": "Focus Color", + "description": "The focus color of the widget", + "default": "#000000" + }, + "border_radius": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Border Radius", + "description": "The border radius of the widget" + }, + "btn_radius": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Btn Radius", + "description": "The button radius of the widget" + }, + "action_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Action Text", + "description": "The action text of the widget" + }, + "start_call_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Start Call Text", + "description": "The start call text of the widget" + }, + "end_call_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "End Call Text", + "description": "The end call text of the widget" + }, + "expand_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Expand Text", + "description": "The expand text of the widget" + }, + "listening_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Listening Text", + "description": "The text to display when the agent is listening" + }, + "speaking_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Speaking Text", + "description": "The text to display when the agent is speaking" + }, + "shareable_page_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Shareable Page Text", + "description": "The text to display when sharing" + }, + "shareable_page_show_terms": { + "type": "boolean", + "title": "Shareable Page Show Terms", + "description": "Whether to show terms and conditions on the shareable page", + "default": true + }, + "terms_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Text", + "description": "The text to display for terms and conditions" + }, + "terms_html": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Html", + "description": "The HTML to display for terms and conditions" + }, + "terms_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Key", + "description": "The key to display for terms and conditions" + }, + "show_avatar_when_collapsed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Show Avatar When Collapsed", + "description": "Whether to show the avatar when the widget is collapsed", + "default": false + }, + "disable_banner": { + "type": "boolean", + "title": "Disable Banner", + "description": "Whether to disable the banner", + "default": false + }, + "override_link": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Override Link", + "description": "The override link for the widget" + }, + "markdown_link_allowed_hosts": { + "items": { + "$ref": "#/components/schemas/AllowlistItem" + }, + "type": "array", + "title": "Markdown Link Allowed Hosts", + "description": "List of allowed hostnames for clickable markdown links. Use { hostname: '*' } to allow any domain. Empty means no links are allowed." + }, + "markdown_link_include_www": { + "type": "boolean", + "title": "Markdown Link Include Www", + "description": "Whether to automatically include www. variants of allowed hosts", + "default": true + }, + "markdown_link_allow_http": { + "type": "boolean", + "title": "Markdown Link Allow Http", + "description": "Whether to allow http:// in addition to https:// for allowed hosts", + "default": true + }, + "mic_muting_enabled": { + "type": "boolean", + "title": "Mic Muting Enabled", + "description": "Whether to enable mic muting", + "default": false + }, + "transcript_enabled": { + "type": "boolean", + "title": "Transcript Enabled", + "description": "Whether the widget should show the conversation transcript as it goes on", + "default": false + }, + "text_input_enabled": { + "type": "boolean", + "title": "Text Input Enabled", + "description": "Whether the user should be able to send text messages", + "default": true + }, + "conversation_mode_toggle_enabled": { + "type": "boolean", + "title": "Conversation Mode Toggle Enabled", + "description": "Whether to enable the conversation mode toggle in the widget", + "default": false + }, + "default_expanded": { + "type": "boolean", + "title": "Default Expanded", + "description": "Whether the widget should be expanded by default", + "default": false + }, + "always_expanded": { + "type": "boolean", + "title": "Always Expanded", + "description": "Whether the widget should always be expanded", + "default": false + }, + "dismissible": { + "type": "boolean", + "title": "Dismissible", + "description": "Whether the widget can be dismissed by the user", + "default": false + }, + "show_agent_status": { + "type": "boolean", + "title": "Show Agent Status", + "description": "Whether to show agent working/done/error status during tool use", + "default": false + }, + "show_conversation_id": { + "type": "boolean", + "title": "Show Conversation Id", + "description": "Whether to show the conversation ID after disconnection.", + "default": true + }, + "strip_audio_tags": { + "type": "boolean", + "title": "Strip Audio Tags", + "description": "Whether to strip audio markup from messages.", + "default": true + }, + "syntax_highlight_theme": { + "anyOf": [ + { + "type": "string", + "enum": [ + "light", + "dark" + ] + }, + { + "type": "null" + } + ], + "title": "Syntax Highlight Theme", + "description": "Theme for code block syntax highlighting. Defaults to auto-detection by the widget when not set." + }, + "text_contents": { + "$ref": "#/components/schemas/WidgetTextContents", + "description": "Text contents of the widget" + }, + "styles": { + "$ref": "#/components/schemas/WidgetStyles", + "description": "Styles for the widget" + }, + "language_selector": { + "type": "boolean", + "title": "Language Selector", + "description": "Whether to show the language selector", + "default": false + }, + "supports_text_only": { + "type": "boolean", + "title": "Supports Text Only", + "description": "Whether the widget can switch to text only mode", + "default": true + }, + "custom_avatar_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Avatar Path", + "description": "The custom avatar path" + }, + "language_presets": { + "additionalProperties": { + "$ref": "#/components/schemas/WidgetLanguagePreset" + }, + "type": "object", + "title": "Language Presets", + "description": "Language presets for the widget" + } + }, + "type": "object", + "title": "WidgetConfig", + "example": { + "custom_avatar_path": "https://example.com/avatar.png", + "language_selector": false + } + }, + "WidgetConfig-Output": { + "properties": { + "variant": { + "$ref": "#/components/schemas/EmbedVariant", + "description": "The variant of the widget", + "default": "full" + }, + "placement": { + "$ref": "#/components/schemas/WidgetPlacement", + "description": "The placement of the widget on the screen", + "default": "bottom-right" + }, + "expandable": { + "$ref": "#/components/schemas/WidgetExpandable", + "description": "Whether the widget is expandable", + "default": "never" + }, + "avatar": { + "anyOf": [ + { + "$ref": "#/components/schemas/OrbAvatar" + }, + { + "$ref": "#/components/schemas/URLAvatar" + }, + { + "$ref": "#/components/schemas/ImageAvatar" + } + ], + "title": "Avatar", + "description": "The avatar of the widget" + }, + "feedback_mode": { + "$ref": "#/components/schemas/WidgetFeedbackMode", + "description": "The feedback mode of the widget", + "default": "none" + }, + "end_feedback": { + "anyOf": [ + { + "$ref": "#/components/schemas/WidgetEndFeedbackConfig" + }, + { + "type": "null" + } + ], + "description": "Configuration for feedback collected at the end of the conversation" + }, + "bg_color": { + "type": "string", + "title": "Bg Color", + "description": "The background color of the widget", + "default": "#ffffff" + }, + "text_color": { + "type": "string", + "title": "Text Color", + "description": "The text color of the widget", + "default": "#000000" + }, + "btn_color": { + "type": "string", + "title": "Btn Color", + "description": "The button color of the widget", + "default": "#000000" + }, + "btn_text_color": { + "type": "string", + "title": "Btn Text Color", + "description": "The button text color of the widget", + "default": "#ffffff" + }, + "border_color": { + "type": "string", + "title": "Border Color", + "description": "The border color of the widget", + "default": "#e1e1e1" + }, + "focus_color": { + "type": "string", + "title": "Focus Color", + "description": "The focus color of the widget", + "default": "#000000" + }, + "border_radius": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Border Radius", + "description": "The border radius of the widget" + }, + "btn_radius": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Btn Radius", + "description": "The button radius of the widget" + }, + "action_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Action Text", + "description": "The action text of the widget" + }, + "start_call_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Start Call Text", + "description": "The start call text of the widget" + }, + "end_call_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "End Call Text", + "description": "The end call text of the widget" + }, + "expand_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Expand Text", + "description": "The expand text of the widget" + }, + "listening_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Listening Text", + "description": "The text to display when the agent is listening" + }, + "speaking_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Speaking Text", + "description": "The text to display when the agent is speaking" + }, + "shareable_page_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Shareable Page Text", + "description": "The text to display when sharing" + }, + "shareable_page_show_terms": { + "type": "boolean", + "title": "Shareable Page Show Terms", + "description": "Whether to show terms and conditions on the shareable page", + "default": true + }, + "terms_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Text", + "description": "The text to display for terms and conditions" + }, + "terms_html": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Html", + "description": "The HTML to display for terms and conditions" + }, + "terms_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Key", + "description": "The key to display for terms and conditions" + }, + "show_avatar_when_collapsed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Show Avatar When Collapsed", + "description": "Whether to show the avatar when the widget is collapsed", + "default": false + }, + "disable_banner": { + "type": "boolean", + "title": "Disable Banner", + "description": "Whether to disable the banner", + "default": false + }, + "override_link": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Override Link", + "description": "The override link for the widget" + }, + "markdown_link_allowed_hosts": { + "items": { + "$ref": "#/components/schemas/AllowlistItem" + }, + "type": "array", + "title": "Markdown Link Allowed Hosts", + "description": "List of allowed hostnames for clickable markdown links. Use { hostname: '*' } to allow any domain. Empty means no links are allowed." + }, + "markdown_link_include_www": { + "type": "boolean", + "title": "Markdown Link Include Www", + "description": "Whether to automatically include www. variants of allowed hosts", + "default": true + }, + "markdown_link_allow_http": { + "type": "boolean", + "title": "Markdown Link Allow Http", + "description": "Whether to allow http:// in addition to https:// for allowed hosts", + "default": true + }, + "mic_muting_enabled": { + "type": "boolean", + "title": "Mic Muting Enabled", + "description": "Whether to enable mic muting", + "default": false + }, + "transcript_enabled": { + "type": "boolean", + "title": "Transcript Enabled", + "description": "Whether the widget should show the conversation transcript as it goes on", + "default": false + }, + "text_input_enabled": { + "type": "boolean", + "title": "Text Input Enabled", + "description": "Whether the user should be able to send text messages", + "default": true + }, + "conversation_mode_toggle_enabled": { + "type": "boolean", + "title": "Conversation Mode Toggle Enabled", + "description": "Whether to enable the conversation mode toggle in the widget", + "default": false + }, + "default_expanded": { + "type": "boolean", + "title": "Default Expanded", + "description": "Whether the widget should be expanded by default", + "default": false + }, + "always_expanded": { + "type": "boolean", + "title": "Always Expanded", + "description": "Whether the widget should always be expanded", + "default": false + }, + "dismissible": { + "type": "boolean", + "title": "Dismissible", + "description": "Whether the widget can be dismissed by the user", + "default": false + }, + "show_agent_status": { + "type": "boolean", + "title": "Show Agent Status", + "description": "Whether to show agent working/done/error status during tool use", + "default": false + }, + "show_conversation_id": { + "type": "boolean", + "title": "Show Conversation Id", + "description": "Whether to show the conversation ID after disconnection.", + "default": true + }, + "strip_audio_tags": { + "type": "boolean", + "title": "Strip Audio Tags", + "description": "Whether to strip audio markup from messages.", + "default": true + }, + "syntax_highlight_theme": { + "anyOf": [ + { + "type": "string", + "enum": [ + "light", + "dark" + ] + }, + { + "type": "null" + } + ], + "title": "Syntax Highlight Theme", + "description": "Theme for code block syntax highlighting. Defaults to auto-detection by the widget when not set." + }, + "text_contents": { + "$ref": "#/components/schemas/WidgetTextContents", + "description": "Text contents of the widget" + }, + "styles": { + "$ref": "#/components/schemas/WidgetStyles", + "description": "Styles for the widget" + }, + "language_selector": { + "type": "boolean", + "title": "Language Selector", + "description": "Whether to show the language selector", + "default": false + }, + "supports_text_only": { + "type": "boolean", + "title": "Supports Text Only", + "description": "Whether the widget can switch to text only mode", + "default": true + }, + "custom_avatar_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Avatar Path", + "description": "The custom avatar path" + }, + "language_presets": { + "additionalProperties": { + "$ref": "#/components/schemas/WidgetLanguagePreset" + }, + "type": "object", + "title": "Language Presets", + "description": "Language presets for the widget" + } + }, + "type": "object", + "title": "WidgetConfig", + "example": { + "custom_avatar_path": "https://example.com/avatar.png", + "language_selector": false + } + }, + "WidgetConfigResponseModel": { + "properties": { + "variant": { + "$ref": "#/components/schemas/EmbedVariant", + "description": "The variant of the widget", + "default": "full" + }, + "placement": { + "$ref": "#/components/schemas/WidgetPlacement", + "description": "The placement of the widget on the screen", + "default": "bottom-right" + }, + "expandable": { + "$ref": "#/components/schemas/WidgetExpandable", + "description": "Whether the widget is expandable", + "default": "never" + }, + "avatar": { + "anyOf": [ + { + "$ref": "#/components/schemas/OrbAvatar" + }, + { + "$ref": "#/components/schemas/URLAvatar" + }, + { + "$ref": "#/components/schemas/ImageAvatar" + } + ], + "title": "Avatar", + "description": "The avatar of the widget" + }, + "feedback_mode": { + "$ref": "#/components/schemas/WidgetFeedbackMode", + "description": "The feedback mode of the widget", + "default": "none" + }, + "end_feedback": { + "anyOf": [ + { + "$ref": "#/components/schemas/WidgetEndFeedbackConfig" + }, + { + "type": "null" + } + ], + "description": "Configuration for feedback collected at the end of the conversation" + }, + "bg_color": { + "type": "string", + "title": "Bg Color", + "description": "The background color of the widget", + "default": "#ffffff" + }, + "text_color": { + "type": "string", + "title": "Text Color", + "description": "The text color of the widget", + "default": "#000000" + }, + "btn_color": { + "type": "string", + "title": "Btn Color", + "description": "The button color of the widget", + "default": "#000000" + }, + "btn_text_color": { + "type": "string", + "title": "Btn Text Color", + "description": "The button text color of the widget", + "default": "#ffffff" + }, + "border_color": { + "type": "string", + "title": "Border Color", + "description": "The border color of the widget", + "default": "#e1e1e1" + }, + "focus_color": { + "type": "string", + "title": "Focus Color", + "description": "The focus color of the widget", + "default": "#000000" + }, + "border_radius": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Border Radius", + "description": "The border radius of the widget" + }, + "btn_radius": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Btn Radius", + "description": "The button radius of the widget" + }, + "action_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Action Text", + "description": "The action text of the widget" + }, + "start_call_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Start Call Text", + "description": "The start call text of the widget" + }, + "end_call_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "End Call Text", + "description": "The end call text of the widget" + }, + "expand_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Expand Text", + "description": "The expand text of the widget" + }, + "listening_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Listening Text", + "description": "The text to display when the agent is listening" + }, + "speaking_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Speaking Text", + "description": "The text to display when the agent is speaking" + }, + "shareable_page_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Shareable Page Text", + "description": "The text to display when sharing" + }, + "shareable_page_show_terms": { + "type": "boolean", + "title": "Shareable Page Show Terms", + "description": "Whether to show terms and conditions on the shareable page", + "default": true + }, + "terms_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Text", + "description": "The text to display for terms and conditions" + }, + "terms_html": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Html", + "description": "The HTML to display for terms and conditions" + }, + "terms_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Key", + "description": "The key to display for terms and conditions" + }, + "show_avatar_when_collapsed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Show Avatar When Collapsed", + "description": "Whether to show the avatar when the widget is collapsed", + "default": false + }, + "disable_banner": { + "type": "boolean", + "title": "Disable Banner", + "description": "Whether to disable the banner", + "default": false + }, + "override_link": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Override Link", + "description": "The override link for the widget" + }, + "markdown_link_allowed_hosts": { + "items": { + "$ref": "#/components/schemas/AllowlistItem" + }, + "type": "array", + "title": "Markdown Link Allowed Hosts", + "description": "List of allowed hostnames for clickable markdown links. Use { hostname: '*' } to allow any domain. Empty means no links are allowed." + }, + "markdown_link_include_www": { + "type": "boolean", + "title": "Markdown Link Include Www", + "description": "Whether to automatically include www. variants of allowed hosts", + "default": true + }, + "markdown_link_allow_http": { + "type": "boolean", + "title": "Markdown Link Allow Http", + "description": "Whether to allow http:// in addition to https:// for allowed hosts", + "default": true + }, + "mic_muting_enabled": { + "type": "boolean", + "title": "Mic Muting Enabled", + "description": "Whether to enable mic muting", + "default": false + }, + "transcript_enabled": { + "type": "boolean", + "title": "Transcript Enabled", + "description": "Whether the widget should show the conversation transcript as it goes on", + "default": false + }, + "text_input_enabled": { + "type": "boolean", + "title": "Text Input Enabled", + "description": "Whether the user should be able to send text messages", + "default": true + }, + "conversation_mode_toggle_enabled": { + "type": "boolean", + "title": "Conversation Mode Toggle Enabled", + "description": "Whether to enable the conversation mode toggle in the widget", + "default": false + }, + "default_expanded": { + "type": "boolean", + "title": "Default Expanded", + "description": "Whether the widget should be expanded by default", + "default": false + }, + "always_expanded": { + "type": "boolean", + "title": "Always Expanded", + "description": "Whether the widget should always be expanded", + "default": false + }, + "dismissible": { + "type": "boolean", + "title": "Dismissible", + "description": "Whether the widget can be dismissed by the user", + "default": false + }, + "show_agent_status": { + "type": "boolean", + "title": "Show Agent Status", + "description": "Whether to show agent working/done/error status during tool use", + "default": false + }, + "show_conversation_id": { + "type": "boolean", + "title": "Show Conversation Id", + "description": "Whether to show the conversation ID after disconnection.", + "default": true + }, + "strip_audio_tags": { + "type": "boolean", + "title": "Strip Audio Tags", + "description": "Whether to strip audio markup from messages.", + "default": true + }, + "syntax_highlight_theme": { + "anyOf": [ + { + "type": "string", + "enum": [ + "light", + "dark" + ] + }, + { + "type": "null" + } + ], + "title": "Syntax Highlight Theme", + "description": "Theme for code block syntax highlighting. Defaults to auto-detection by the widget when not set." + }, + "text_contents": { + "$ref": "#/components/schemas/WidgetTextContents", + "description": "Text contents of the widget" + }, + "styles": { + "$ref": "#/components/schemas/WidgetStyles", + "description": "Styles for the widget" + }, + "language": { + "type": "string", + "title": "Language" + }, + "supported_language_overrides": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Supported Language Overrides" + }, + "language_presets": { + "additionalProperties": { + "$ref": "#/components/schemas/WidgetLanguagePresetResponse" + }, + "type": "object", + "title": "Language Presets", + "description": "Language presets for the widget" + }, + "text_only": { + "type": "boolean", + "title": "Text Only", + "description": "Whether the agent uses text-only mode", + "default": false + }, + "supports_text_only": { + "type": "boolean", + "title": "Supports Text Only", + "description": "Whether the agent can be switched to text-only mode", + "default": false + }, + "first_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Message" + }, + "use_rtc": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Use Rtc", + "description": "Whether to use WebRTC for conversation connections" + }, + "file_input_config": { + "$ref": "#/components/schemas/FileInputConfig", + "description": "Configuration for file upload in the widget" + } + }, + "type": "object", + "required": [ + "language" + ], + "title": "WidgetConfigResponseModel", + "example": { + "file_input_config": { + "enabled": false, + "max_files_per_conversation": 10 + }, + "first_message": "Hello! How can I help you today?", + "language": "en", + "language_presets": {}, + "supported_language_overrides": [ + "es", + "fr" + ], + "supports_text_only": true, + "text_only": false, + "use_rtc": false + } + }, + "WidgetEndFeedbackConfig": { + "properties": { + "type": { + "$ref": "#/components/schemas/WidgetEndFeedbackType", + "description": "The type of feedback to collect at the end of the conversation", + "default": "rating" + } + }, + "type": "object", + "title": "WidgetEndFeedbackConfig" + }, + "WidgetEndFeedbackType": { + "type": "string", + "enum": [ + "rating" + ], + "title": "WidgetEndFeedbackType", + "default": "rating" + }, + "WidgetExpandable": { + "type": "string", + "enum": [ + "never", + "mobile", + "desktop", + "always" + ], + "title": "WidgetExpandable", + "default": "never" + }, + "WidgetFeedbackMode": { + "type": "string", + "enum": [ + "none", + "during", + "end" + ], + "title": "WidgetFeedbackMode", + "default": "none" + }, + "WidgetLanguagePreset": { + "properties": { + "text_contents": { + "anyOf": [ + { + "$ref": "#/components/schemas/WidgetTextContents" + }, + { + "type": "null" + } + ], + "description": "The text contents for the selected language" + }, + "terms_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Text", + "description": "The text to display for terms and conditions in this language" + }, + "terms_html": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Html", + "description": "The HTML to display for terms and conditions in this language" + }, + "terms_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Key", + "description": "The key to display for terms and conditions in this language" + }, + "terms_translation": { + "anyOf": [ + { + "$ref": "#/components/schemas/WidgetTermsTranslation" + }, + { + "type": "null" + } + ], + "description": "The translation cache for the terms" + } + }, + "type": "object", + "title": "WidgetLanguagePreset" + }, + "WidgetLanguagePresetResponse": { + "properties": { + "first_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "First Message" + }, + "text_contents": { + "anyOf": [ + { + "$ref": "#/components/schemas/WidgetTextContents" + }, + { + "type": "null" + } + ], + "description": "The text contents for the selected language" + }, + "terms_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Text", + "description": "The text to display for terms and conditions in this language" + }, + "terms_html": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Html", + "description": "The HTML to display for terms and conditions in this language" + }, + "terms_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terms Key", + "description": "The key to display for terms and conditions in this language" + } + }, + "type": "object", + "title": "WidgetLanguagePresetResponse" + }, + "WidgetPlacement": { + "type": "string", + "enum": [ + "top-left", + "top", + "top-right", + "bottom-left", + "bottom", + "bottom-right" + ], + "title": "WidgetPlacement", + "default": "bottom-right" + }, + "WidgetStyles": { + "properties": { + "base": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base", + "description": "The base background color." + }, + "base_hover": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Hover", + "description": "The color of the base background when hovered." + }, + "base_active": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Active", + "description": "The color of the base background when active (clicked)." + }, + "base_border": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Border", + "description": "The color of the border against the base background." + }, + "base_subtle": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Subtle", + "description": "The color of subtle text against the base background." + }, + "base_primary": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Primary", + "description": "The color of primary text against the base background." + }, + "base_error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Error", + "description": "The color of error text against the base background." + }, + "accent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent", + "description": "The accent background color." + }, + "accent_hover": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent Hover", + "description": "The color of the accent background when hovered." + }, + "accent_active": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent Active", + "description": "The color of the accent background when active (clicked)." + }, + "accent_border": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent Border", + "description": "The color of the border against the accent background." + }, + "accent_subtle": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent Subtle", + "description": "The color of subtle text against the accent background." + }, + "accent_primary": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent Primary", + "description": "The color of primary text against the accent background." + }, + "overlay_padding": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Overlay Padding", + "description": "The padding around the edges of the viewport." + }, + "button_radius": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Button Radius", + "description": "The radius of the buttons." + }, + "input_radius": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Input Radius", + "description": "The radius of the input fields." + }, + "bubble_radius": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Bubble Radius", + "description": "The radius of the chat bubbles." + }, + "sheet_radius": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Sheet Radius", + "description": "The default radius of sheets." + }, + "compact_sheet_radius": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Compact Sheet Radius", + "description": "The radius of the sheet in compact mode." + }, + "dropdown_sheet_radius": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Dropdown Sheet Radius", + "description": "The radius of the dropdown sheet." + } + }, + "type": "object", + "title": "WidgetStyles" + }, + "WidgetTermsTranslation": { + "properties": { + "source_hash": { + "type": "string", + "title": "Source Hash" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "type": "object", + "required": [ + "source_hash", + "text" + ], + "title": "WidgetTermsTranslation" + }, + "WidgetTextContents": { + "properties": { + "main_label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Main Label", + "description": "Call to action displayed inside the compact and full variants." + }, + "start_call": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Start Call", + "description": "Text and ARIA label for the start call button." + }, + "start_chat": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Start Chat", + "description": "Text and ARIA label for the start chat button (text only)" + }, + "new_call": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Call", + "description": "Text and ARIA label for the new call button. Displayed when the caller already finished at least one call in order ot start the next one." + }, + "end_call": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "End Call", + "description": "Text and ARIA label for the end call button." + }, + "mute_microphone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Mute Microphone", + "description": "ARIA label for the mute microphone button." + }, + "change_language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Change Language", + "description": "ARIA label for the change language dropdown." + }, + "collapse": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Collapse", + "description": "ARIA label for the collapse button." + }, + "expand": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Expand", + "description": "ARIA label for the expand button." + }, + "copied": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Copied", + "description": "Text displayed when the user copies a value using the copy button." + }, + "accept_terms": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accept Terms", + "description": "Text and ARIA label for the accept terms button." + }, + "dismiss_terms": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Dismiss Terms", + "description": "Text and ARIA label for the cancel terms button." + }, + "listening_status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Listening Status", + "description": "Status displayed when the agent is listening." + }, + "speaking_status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Speaking Status", + "description": "Status displayed when the agent is speaking." + }, + "connecting_status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Connecting Status", + "description": "Status displayed when the agent is connecting." + }, + "chatting_status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Chatting Status", + "description": "Status displayed when the agent is chatting (text only)" + }, + "input_label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Input Label", + "description": "ARIA label for the text message input." + }, + "input_placeholder": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Input Placeholder", + "description": "Placeholder text for the text message input." + }, + "input_placeholder_text_only": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Input Placeholder Text Only", + "description": "Placeholder text for the text message input (text only)" + }, + "input_placeholder_new_conversation": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Input Placeholder New Conversation", + "description": "Placeholder text for the text message input when starting a new conversation (text only)" + }, + "user_ended_conversation": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Ended Conversation", + "description": "Information message displayed when the user ends the conversation." + }, + "agent_ended_conversation": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Ended Conversation", + "description": "Information message displayed when the agent ends the conversation." + }, + "conversation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Conversation Id", + "description": "Text label used next to the conversation ID." + }, + "error_occurred": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Occurred", + "description": "Text label used when an error occurs." + }, + "copy_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Copy Id", + "description": "Text and ARIA label used for the copy ID button." + }, + "initiate_feedback": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Initiate Feedback", + "description": "Text displayed to prompt the user for feedback." + }, + "request_follow_up_feedback": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Request Follow Up Feedback", + "description": "Text displayed to request additional feedback details." + }, + "thanks_for_feedback": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Thanks For Feedback", + "description": "Text displayed to thank the user for providing feedback." + }, + "thanks_for_feedback_details": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Thanks For Feedback Details", + "description": "Additional text displayed explaining the value of user feedback." + }, + "follow_up_feedback_placeholder": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Follow Up Feedback Placeholder", + "description": "Placeholder text for the follow-up feedback input field." + }, + "submit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Submit", + "description": "Text and ARIA label for the submit button." + }, + "go_back": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Go Back", + "description": "Text and ARIA label for the go back button." + }, + "send_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Send Message", + "description": "Text and ARIA label for the send message button." + }, + "text_mode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Text Mode", + "description": "Text and ARIA label for the switch to text mode button." + }, + "voice_mode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Voice Mode", + "description": "Text and ARIA label for the switch to voice mode button." + }, + "switched_to_text_mode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Switched To Text Mode", + "description": "Toast notification displayed when switching to text mode." + }, + "switched_to_voice_mode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Switched To Voice Mode", + "description": "Toast notification displayed when switching to voice mode." + }, + "copy": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Copy", + "description": "Text and ARIA label for the copy button." + }, + "download": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Download", + "description": "Text and ARIA label for the download button." + }, + "wrap": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wrap", + "description": "Text and ARIA label for the wrap toggle button." + }, + "agent_working": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Working", + "description": "Status text displayed when the agent is processing a tool call." + }, + "agent_done": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Done", + "description": "Status text displayed when the agent finishes processing a tool call." + }, + "agent_error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Error", + "description": "Status text displayed when the agent encounters an error during a tool call." + } + }, + "type": "object", + "title": "WidgetTextContents" + }, + "WordTimestamp": { + "properties": { + "word": { + "type": "string", + "title": "Word" + }, + "start_ms": { + "type": "integer", + "title": "Start Ms" + }, + "end_ms": { + "type": "integer", + "title": "End Ms" + } + }, + "type": "object", + "required": [ + "word", + "start_ms", + "end_ms" + ], + "title": "WordTimestamp" + }, + "WorkflowEdgeModel-Input": { + "properties": { + "source": { + "type": "string", + "title": "Source", + "description": "ID of the source node." + }, + "target": { + "type": "string", + "title": "Target", + "description": "ID of the target node." + }, + "forward_condition": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowUnconditionalModel-Input", + "description": "Condition that is always true." + }, + { + "$ref": "#/components/schemas/WorkflowLLMConditionModel-Input", + "description": "Condition described using human language and evaluated by an LLM." + }, + { + "$ref": "#/components/schemas/WorkflowResultConditionModel-Input", + "description": "Condition based on the result of the last executed tool dispatch node." + }, + { + "$ref": "#/components/schemas/WorkflowExpressionConditionModel-Input", + "description": "Condition described using a deterministic expression." + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "expression": "#/components/schemas/WorkflowExpressionConditionModel-Input", + "llm": "#/components/schemas/WorkflowLLMConditionModel-Input", + "result": "#/components/schemas/WorkflowResultConditionModel-Input", + "unconditional": "#/components/schemas/WorkflowUnconditionalModel-Input" + } + } + }, + { + "type": "null" + } + ], + "title": "Forward Condition", + "description": "Condition that must be met for the edge to be traversed in the forward direction (source to target)." + }, + "backward_condition": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowUnconditionalModel-Input", + "description": "Condition that is always true." + }, + { + "$ref": "#/components/schemas/WorkflowLLMConditionModel-Input", + "description": "Condition described using human language and evaluated by an LLM." + }, + { + "$ref": "#/components/schemas/WorkflowResultConditionModel-Input", + "description": "Condition based on the result of the last executed tool dispatch node." + }, + { + "$ref": "#/components/schemas/WorkflowExpressionConditionModel-Input", + "description": "Condition described using a deterministic expression." + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "expression": "#/components/schemas/WorkflowExpressionConditionModel-Input", + "llm": "#/components/schemas/WorkflowLLMConditionModel-Input", + "result": "#/components/schemas/WorkflowResultConditionModel-Input", + "unconditional": "#/components/schemas/WorkflowUnconditionalModel-Input" + } + } + }, + { + "type": "null" + } + ], + "title": "Backward Condition", + "description": "Condition that must be met for the edge to be traversed in the backward direction (target to source)." + } + }, + "type": "object", + "required": [ + "source", + "target" + ], + "title": "WorkflowEdgeModel" + }, + "WorkflowEdgeModel-Output": { + "properties": { + "source": { + "type": "string", + "title": "Source", + "description": "ID of the source node." + }, + "target": { + "type": "string", + "title": "Target", + "description": "ID of the target node." + }, + "forward_condition": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowUnconditionalModel-Output", + "description": "Condition that is always true." + }, + { + "$ref": "#/components/schemas/WorkflowLLMConditionModel-Output", + "description": "Condition described using human language and evaluated by an LLM." + }, + { + "$ref": "#/components/schemas/WorkflowResultConditionModel-Output", + "description": "Condition based on the result of the last executed tool dispatch node." + }, + { + "$ref": "#/components/schemas/WorkflowExpressionConditionModel-Output", + "description": "Condition described using a deterministic expression." + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "expression": "#/components/schemas/WorkflowExpressionConditionModel-Output", + "llm": "#/components/schemas/WorkflowLLMConditionModel-Output", + "result": "#/components/schemas/WorkflowResultConditionModel-Output", + "unconditional": "#/components/schemas/WorkflowUnconditionalModel-Output" + } + } + }, + { + "type": "null" + } + ], + "title": "Forward Condition", + "description": "Condition that must be met for the edge to be traversed in the forward direction (source to target)." + }, + "backward_condition": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowUnconditionalModel-Output", + "description": "Condition that is always true." + }, + { + "$ref": "#/components/schemas/WorkflowLLMConditionModel-Output", + "description": "Condition described using human language and evaluated by an LLM." + }, + { + "$ref": "#/components/schemas/WorkflowResultConditionModel-Output", + "description": "Condition based on the result of the last executed tool dispatch node." + }, + { + "$ref": "#/components/schemas/WorkflowExpressionConditionModel-Output", + "description": "Condition described using a deterministic expression." + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "expression": "#/components/schemas/WorkflowExpressionConditionModel-Output", + "llm": "#/components/schemas/WorkflowLLMConditionModel-Output", + "result": "#/components/schemas/WorkflowResultConditionModel-Output", + "unconditional": "#/components/schemas/WorkflowUnconditionalModel-Output" + } + } + }, + { + "type": "null" + } + ], + "title": "Backward Condition", + "description": "Condition that must be met for the edge to be traversed in the backward direction (target to source)." + } + }, + "type": "object", + "required": [ + "source", + "target", + "forward_condition", + "backward_condition" + ], + "title": "WorkflowEdgeModel" + }, + "WorkflowEndNodeModel-Input": { + "properties": { + "type": { + "type": "string", + "const": "end", + "title": "Type", + "default": "end" + }, + "position": { + "$ref": "#/components/schemas/Position-Input", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + } + }, + "type": "object", + "title": "WorkflowEndNodeModel" + }, + "WorkflowEndNodeModel-Output": { + "properties": { + "type": { + "type": "string", + "const": "end", + "title": "Type", + "default": "end" + }, + "position": { + "$ref": "#/components/schemas/Position-Output", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + } + }, + "type": "object", + "required": [ + "type", + "position", + "edge_order" + ], + "title": "WorkflowEndNodeModel" + }, + "WorkflowExpressionConditionModel-Input": { + "properties": { + "label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label", + "description": "Optional human-readable label for the condition used throughout the UI." + }, + "type": { + "type": "string", + "const": "expression", + "title": "Type", + "default": "expression" + }, + "expression": { + "$ref": "#/components/schemas/ASTNode-Input", + "description": "Expression to evaluate." + } + }, + "type": "object", + "required": [ + "expression" + ], + "title": "WorkflowExpressionConditionModel" + }, + "WorkflowExpressionConditionModel-Output": { + "properties": { + "label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label", + "description": "Optional human-readable label for the condition used throughout the UI." + }, + "type": { + "type": "string", + "const": "expression", + "title": "Type", + "default": "expression" + }, + "expression": { + "$ref": "#/components/schemas/ASTNode-Output", + "description": "Expression to evaluate." + } + }, + "type": "object", + "required": [ + "label", + "type", + "expression" + ], + "title": "WorkflowExpressionConditionModel" + }, + "WorkflowFeaturesUsageCommonModel": { + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "default": false + }, + "tool_node": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "standalone_agent_node": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "phone_number_node": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + }, + "end_node": { + "$ref": "#/components/schemas/FeatureStatusCommonModel" + } + }, + "type": "object", + "title": "WorkflowFeaturesUsageCommonModel" + }, + "WorkflowLLMConditionModel-Input": { + "properties": { + "label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label", + "description": "Optional human-readable label for the condition used throughout the UI." + }, + "type": { + "type": "string", + "const": "llm", + "title": "Type", + "default": "llm" + }, + "condition": { + "type": "string", + "title": "Condition", + "description": "Condition to evaluate", + "examples": [ + "User's last message contains a question about our pricing.", + "User provided their email address." + ] + } + }, + "type": "object", + "required": [ + "condition" + ], + "title": "WorkflowLLMConditionModel" + }, + "WorkflowLLMConditionModel-Output": { + "properties": { + "label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label", + "description": "Optional human-readable label for the condition used throughout the UI." + }, + "type": { + "type": "string", + "const": "llm", + "title": "Type", + "default": "llm" + }, + "condition": { + "type": "string", + "title": "Condition", + "description": "Condition to evaluate", + "examples": [ + "User's last message contains a question about our pricing.", + "User provided their email address." + ] + } + }, + "type": "object", + "required": [ + "label", + "type", + "condition" + ], + "title": "WorkflowLLMConditionModel" + }, + "WorkflowOverrideAgentNodeModel-Input": { + "properties": { + "conversation_config": { + "$ref": "#/components/schemas/ConversationalConfigAPIModelWorkflowOverride-Input", + "description": "Configuration overrides applied while the subagent is conducting the conversation." + }, + "additional_prompt": { + "type": "string", + "title": "Additional Prompt", + "description": "Specific goal for this subagent. It will be added to the system prompt and can be used to further refine the agent's behavior in this specific context." + }, + "additional_knowledge_base": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseLocator" + }, + "type": "array", + "title": "Additional Knowledge Base", + "description": "Additional knowledge base documents that the subagent has access to. These will be used in addition to the main agent's documents." + }, + "additional_tool_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Additional Tool Ids", + "description": "IDs of additional tools that the subagent has access to. These will be used in addition to the main agent's tools." + }, + "type": { + "type": "string", + "const": "override_agent", + "title": "Type", + "default": "override_agent" + }, + "position": { + "$ref": "#/components/schemas/Position-Input", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + }, + "label": { + "type": "string", + "title": "Label", + "description": "Human-readable label for the node used throughout the UI." + } + }, + "type": "object", + "required": [ + "label" + ], + "title": "WorkflowOverrideAgentNodeModel" + }, + "WorkflowOverrideAgentNodeModel-Output": { + "properties": { + "conversation_config": { + "$ref": "#/components/schemas/ConversationalConfigAPIModelWorkflowOverride-Output", + "description": "Configuration overrides applied while the subagent is conducting the conversation." + }, + "additional_prompt": { + "type": "string", + "title": "Additional Prompt", + "description": "Specific goal for this subagent. It will be added to the system prompt and can be used to further refine the agent's behavior in this specific context." + }, + "additional_knowledge_base": { + "items": { + "$ref": "#/components/schemas/KnowledgeBaseLocator" + }, + "type": "array", + "title": "Additional Knowledge Base", + "description": "Additional knowledge base documents that the subagent has access to. These will be used in addition to the main agent's documents." + }, + "additional_tool_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Additional Tool Ids", + "description": "IDs of additional tools that the subagent has access to. These will be used in addition to the main agent's tools." + }, + "type": { + "type": "string", + "const": "override_agent", + "title": "Type", + "default": "override_agent" + }, + "position": { + "$ref": "#/components/schemas/Position-Output", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + }, + "label": { + "type": "string", + "title": "Label", + "description": "Human-readable label for the node used throughout the UI." + } + }, + "type": "object", + "required": [ + "conversation_config", + "additional_prompt", + "additional_knowledge_base", + "additional_tool_ids", + "type", + "position", + "edge_order", + "label" + ], + "title": "WorkflowOverrideAgentNodeModel" + }, + "WorkflowPhoneNumberNodeModel-Input": { + "properties": { + "custom_sip_headers": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CustomSIPHeader" + }, + { + "$ref": "#/components/schemas/CustomSIPHeaderWithDynamicVariable" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "dynamic": "#/components/schemas/CustomSIPHeaderWithDynamicVariable", + "static": "#/components/schemas/CustomSIPHeader" + } + } + }, + "type": "array", + "maxItems": 20, + "title": "Custom Sip Headers", + "description": "Custom SIP headers to include when transferring the call. Each header can be either a static value or a dynamic variable reference." + }, + "transfer_destination": { + "oneOf": [ + { + "$ref": "#/components/schemas/PhoneNumberTransferDestination" + }, + { + "$ref": "#/components/schemas/SIPUriTransferDestination" + }, + { + "$ref": "#/components/schemas/PhoneNumberDynamicVariableTransferDestination" + }, + { + "$ref": "#/components/schemas/SIPUriDynamicVariableTransferDestination" + } + ], + "title": "Transfer Destination", + "discriminator": { + "propertyName": "type", + "mapping": { + "phone": "#/components/schemas/PhoneNumberTransferDestination", + "phone_dynamic_variable": "#/components/schemas/PhoneNumberDynamicVariableTransferDestination", + "sip_uri": "#/components/schemas/SIPUriTransferDestination", + "sip_uri_dynamic_variable": "#/components/schemas/SIPUriDynamicVariableTransferDestination" + } + } + }, + "transfer_type": { + "$ref": "#/components/schemas/TransferTypeEnum", + "default": "conference" + }, + "post_dial_digits": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/PostDialDigitsStatic" + }, + { + "$ref": "#/components/schemas/PostDialDigitsDynamicVariable" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "dynamic": "#/components/schemas/PostDialDigitsDynamicVariable", + "static": "#/components/schemas/PostDialDigitsStatic" + } + } + }, + { + "type": "null" + } + ], + "title": "Post Dial Digits", + "description": "DTMF digits to send after call connects (e.g., 'ww1234' for extension). Can be either a static value or a dynamic variable reference. Use 'w' for 0.5s pause. Only supported for Twilio transfers." + }, + "type": { + "type": "string", + "const": "phone_number", + "title": "Type", + "default": "phone_number" + }, + "position": { + "$ref": "#/components/schemas/Position-Input", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + } + }, + "type": "object", + "required": [ + "transfer_destination" + ], + "title": "WorkflowPhoneNumberNodeModel" + }, + "WorkflowPhoneNumberNodeModel-Output": { + "properties": { + "custom_sip_headers": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CustomSIPHeader" + }, + { + "$ref": "#/components/schemas/CustomSIPHeaderWithDynamicVariable" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "dynamic": "#/components/schemas/CustomSIPHeaderWithDynamicVariable", + "static": "#/components/schemas/CustomSIPHeader" + } + } + }, + "type": "array", + "maxItems": 20, + "title": "Custom Sip Headers", + "description": "Custom SIP headers to include when transferring the call. Each header can be either a static value or a dynamic variable reference." + }, + "transfer_destination": { + "oneOf": [ + { + "$ref": "#/components/schemas/PhoneNumberTransferDestination" + }, + { + "$ref": "#/components/schemas/SIPUriTransferDestination" + }, + { + "$ref": "#/components/schemas/PhoneNumberDynamicVariableTransferDestination" + }, + { + "$ref": "#/components/schemas/SIPUriDynamicVariableTransferDestination" + } + ], + "title": "Transfer Destination", + "discriminator": { + "propertyName": "type", + "mapping": { + "phone": "#/components/schemas/PhoneNumberTransferDestination", + "phone_dynamic_variable": "#/components/schemas/PhoneNumberDynamicVariableTransferDestination", + "sip_uri": "#/components/schemas/SIPUriTransferDestination", + "sip_uri_dynamic_variable": "#/components/schemas/SIPUriDynamicVariableTransferDestination" + } + } + }, + "transfer_type": { + "$ref": "#/components/schemas/TransferTypeEnum", + "default": "conference" + }, + "post_dial_digits": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/PostDialDigitsStatic" + }, + { + "$ref": "#/components/schemas/PostDialDigitsDynamicVariable" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "dynamic": "#/components/schemas/PostDialDigitsDynamicVariable", + "static": "#/components/schemas/PostDialDigitsStatic" + } + } + }, + { + "type": "null" + } + ], + "title": "Post Dial Digits", + "description": "DTMF digits to send after call connects (e.g., 'ww1234' for extension). Can be either a static value or a dynamic variable reference. Use 'w' for 0.5s pause. Only supported for Twilio transfers." + }, + "type": { + "type": "string", + "const": "phone_number", + "title": "Type", + "default": "phone_number" + }, + "position": { + "$ref": "#/components/schemas/Position-Output", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + } + }, + "type": "object", + "required": [ + "custom_sip_headers", + "transfer_destination", + "transfer_type", + "post_dial_digits", + "type", + "position", + "edge_order" + ], + "title": "WorkflowPhoneNumberNodeModel" + }, + "WorkflowResultConditionModel-Input": { + "properties": { + "label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label", + "description": "Optional human-readable label for the condition used throughout the UI." + }, + "type": { + "type": "string", + "const": "result", + "title": "Type", + "default": "result" + }, + "successful": { + "type": "boolean", + "title": "Successful", + "description": "Whether all tools in the previously executed tool node were executed successfully." + } + }, + "type": "object", + "required": [ + "successful" + ], + "title": "WorkflowResultConditionModel" + }, + "WorkflowResultConditionModel-Output": { + "properties": { + "label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label", + "description": "Optional human-readable label for the condition used throughout the UI." + }, + "type": { + "type": "string", + "const": "result", + "title": "Type", + "default": "result" + }, + "successful": { + "type": "boolean", + "title": "Successful", + "description": "Whether all tools in the previously executed tool node were executed successfully." + } + }, + "type": "object", + "required": [ + "label", + "type", + "successful" + ], + "title": "WorkflowResultConditionModel" + }, + "WorkflowStandaloneAgentNodeModel-Input": { + "properties": { + "type": { + "type": "string", + "const": "standalone_agent", + "title": "Type", + "default": "standalone_agent" + }, + "position": { + "$ref": "#/components/schemas/Position-Input", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + }, + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "The ID of the agent to transfer the conversation to." + }, + "delay_ms": { + "type": "integer", + "title": "Delay Ms", + "description": "Artificial delay in milliseconds applied before transferring the conversation.", + "default": 0 + }, + "transfer_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Transfer Message", + "description": "Optional message sent to the user before the transfer is initiated." + }, + "enable_transferred_agent_first_message": { + "type": "boolean", + "title": "Enable Transferred Agent First Message", + "description": "Whether to enable the transferred agent to send its configured first message after the transfer.", + "default": false + } + }, + "type": "object", + "required": [ + "agent_id" + ], + "title": "WorkflowStandaloneAgentNodeModel" + }, + "WorkflowStandaloneAgentNodeModel-Output": { + "properties": { + "type": { + "type": "string", + "const": "standalone_agent", + "title": "Type", + "default": "standalone_agent" + }, + "position": { + "$ref": "#/components/schemas/Position-Output", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + }, + "agent_id": { + "type": "string", + "title": "Agent Id", + "description": "The ID of the agent to transfer the conversation to." + }, + "delay_ms": { + "type": "integer", + "title": "Delay Ms", + "description": "Artificial delay in milliseconds applied before transferring the conversation.", + "default": 0 + }, + "transfer_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Transfer Message", + "description": "Optional message sent to the user before the transfer is initiated." + }, + "enable_transferred_agent_first_message": { + "type": "boolean", + "title": "Enable Transferred Agent First Message", + "description": "Whether to enable the transferred agent to send its configured first message after the transfer.", + "default": false + } + }, + "type": "object", + "required": [ + "type", + "position", + "edge_order", + "agent_id", + "delay_ms", + "transfer_message", + "enable_transferred_agent_first_message" + ], + "title": "WorkflowStandaloneAgentNodeModel" + }, + "WorkflowStartNodeModel-Input": { + "properties": { + "type": { + "type": "string", + "const": "start", + "title": "Type", + "default": "start" + }, + "position": { + "$ref": "#/components/schemas/Position-Input", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + } + }, + "type": "object", + "title": "WorkflowStartNodeModel" + }, + "WorkflowStartNodeModel-Output": { + "properties": { + "type": { + "type": "string", + "const": "start", + "title": "Type", + "default": "start" + }, + "position": { + "$ref": "#/components/schemas/Position-Output", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + } + }, + "type": "object", + "required": [ + "type", + "position", + "edge_order" + ], + "title": "WorkflowStartNodeModel" + }, + "WorkflowToolEdgeStepModel": { + "properties": { + "step_latency_secs": { + "type": "number", + "title": "Step Latency Secs" + }, + "type": { + "type": "string", + "const": "edge", + "title": "Type", + "default": "edge" + }, + "edge_id": { + "type": "string", + "title": "Edge Id" + }, + "target_node_id": { + "type": "string", + "title": "Target Node Id" + } + }, + "type": "object", + "required": [ + "step_latency_secs", + "edge_id", + "target_node_id" + ], + "title": "WorkflowToolEdgeStepModel" + }, + "WorkflowToolLocator": { + "properties": { + "tool_id": { + "type": "string", + "title": "Tool Id" + } + }, + "type": "object", + "required": [ + "tool_id" + ], + "title": "WorkflowToolLocator" + }, + "WorkflowToolMaxIterationsExceededStepModel": { + "properties": { + "step_latency_secs": { + "type": "number", + "title": "Step Latency Secs" + }, + "type": { + "type": "string", + "const": "max_iterations_exceeded", + "title": "Type", + "default": "max_iterations_exceeded" + }, + "max_iterations": { + "type": "integer", + "title": "Max Iterations" + } + }, + "type": "object", + "required": [ + "step_latency_secs", + "max_iterations" + ], + "title": "WorkflowToolMaxIterationsExceededStepModel" + }, + "WorkflowToolNestedToolsStepModel-Input": { + "properties": { + "step_latency_secs": { + "type": "number", + "title": "Step Latency Secs" + }, + "type": { + "type": "string", + "const": "nested_tools", + "title": "Type", + "default": "nested_tools" + }, + "node_id": { + "type": "string", + "title": "Node Id" + }, + "requests": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallCommonModel-Input" + }, + "type": "array", + "title": "Requests" + }, + "results": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptOtherToolsResultCommonModel" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptSystemToolResultCommonModel-Input" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Input" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Input" + } + ] + }, + "type": "array", + "title": "Results" + }, + "is_successful": { + "type": "boolean", + "title": "Is Successful" + } + }, + "type": "object", + "required": [ + "step_latency_secs", + "node_id", + "requests", + "results", + "is_successful" + ], + "title": "WorkflowToolNestedToolsStepModel" + }, + "WorkflowToolNestedToolsStepModel-Output": { + "properties": { + "step_latency_secs": { + "type": "number", + "title": "Step Latency Secs" + }, + "type": { + "type": "string", + "const": "nested_tools", + "title": "Type", + "default": "nested_tools" + }, + "node_id": { + "type": "string", + "title": "Node Id" + }, + "requests": { + "items": { + "$ref": "#/components/schemas/ConversationHistoryTranscriptToolCallCommonModel-Output" + }, + "type": "array", + "title": "Requests" + }, + "results": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptOtherToolsResultCommonModel" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptSystemToolResultCommonModel-Output" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Output" + }, + { + "$ref": "#/components/schemas/ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Output" + } + ] + }, + "type": "array", + "title": "Results" + }, + "is_successful": { + "type": "boolean", + "title": "Is Successful" + } + }, + "type": "object", + "required": [ + "step_latency_secs", + "node_id", + "requests", + "results", + "is_successful" + ], + "title": "WorkflowToolNestedToolsStepModel" + }, + "WorkflowToolNodeModel-Input": { + "properties": { + "type": { + "type": "string", + "const": "tool", + "title": "Type", + "default": "tool" + }, + "position": { + "$ref": "#/components/schemas/Position-Input", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + }, + "tools": { + "items": { + "$ref": "#/components/schemas/WorkflowToolLocator" + }, + "type": "array", + "title": "Tools", + "description": "List of tools to execute in parallel. The entire node is considered successful if all tools are executed successfully." + } + }, + "type": "object", + "title": "WorkflowToolNodeModel" + }, + "WorkflowToolNodeModel-Output": { + "properties": { + "type": { + "type": "string", + "const": "tool", + "title": "Type", + "default": "tool" + }, + "position": { + "$ref": "#/components/schemas/Position-Output", + "description": "Position of the node in the workflow." + }, + "edge_order": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Edge Order", + "description": "The ids of outgoing edges in the order they should be evaluated." + }, + "tools": { + "items": { + "$ref": "#/components/schemas/WorkflowToolLocator" + }, + "type": "array", + "title": "Tools", + "description": "List of tools to execute in parallel. The entire node is considered successful if all tools are executed successfully." + } + }, + "type": "object", + "required": [ + "type", + "position", + "edge_order", + "tools" + ], + "title": "WorkflowToolNodeModel" + }, + "WorkflowToolResponseModel-Input": { + "properties": { + "steps": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowToolEdgeStepModel" + }, + { + "$ref": "#/components/schemas/WorkflowToolNestedToolsStepModel-Input" + }, + { + "$ref": "#/components/schemas/WorkflowToolMaxIterationsExceededStepModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "edge": "#/components/schemas/WorkflowToolEdgeStepModel", + "max_iterations_exceeded": "#/components/schemas/WorkflowToolMaxIterationsExceededStepModel", + "nested_tools": "#/components/schemas/WorkflowToolNestedToolsStepModel-Input" + } + } + }, + "type": "array", + "title": "Steps" + } + }, + "type": "object", + "title": "WorkflowToolResponseModel", + "description": "A common model for workflow tool responses." + }, + "WorkflowToolResponseModel-Output": { + "properties": { + "steps": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowToolEdgeStepModel" + }, + { + "$ref": "#/components/schemas/WorkflowToolNestedToolsStepModel-Output" + }, + { + "$ref": "#/components/schemas/WorkflowToolMaxIterationsExceededStepModel" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "edge": "#/components/schemas/WorkflowToolEdgeStepModel", + "max_iterations_exceeded": "#/components/schemas/WorkflowToolMaxIterationsExceededStepModel", + "nested_tools": "#/components/schemas/WorkflowToolNestedToolsStepModel-Output" + } + } + }, + "type": "array", + "title": "Steps" + } + }, + "type": "object", + "title": "WorkflowToolResponseModel", + "description": "A common model for workflow tool responses." + }, + "WorkflowUnconditionalModel-Input": { + "properties": { + "label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label", + "description": "Optional human-readable label for the condition used throughout the UI." + }, + "type": { + "type": "string", + "const": "unconditional", + "title": "Type", + "default": "unconditional" + } + }, + "type": "object", + "title": "WorkflowUnconditionalModel" + }, + "WorkflowUnconditionalModel-Output": { + "properties": { + "label": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label", + "description": "Optional human-readable label for the condition used throughout the UI." + }, + "type": { + "type": "string", + "const": "unconditional", + "title": "Type", + "default": "unconditional" + } + }, + "type": "object", + "required": [ + "label", + "type" + ], + "title": "WorkflowUnconditionalModel" + }, + "WorkspaceAnalyticsQueryResponseModel": { + "properties": { + "columns": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Columns" + }, + "column_types": { + "items": { + "type": "string", + "enum": [ + "String", + "Float", + "DateTime", + "Int", + "Bool", + "JSON", + "Map" + ] + }, + "type": "array", + "title": "Column Types" + }, + "rows": { + "items": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + "type": "array", + "title": "Rows" + }, + "column_units": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ColumnUnit" + }, + { + "type": "null" + } + ] + }, + "type": "array", + "title": "Column Units" + } + }, + "type": "object", + "required": [ + "columns", + "column_types", + "rows", + "column_units" + ], + "title": "WorkspaceAnalyticsQueryResponseModel" + }, + "WorkspaceApiKeyListResponseModel": { + "properties": { + "api-keys": { + "items": { + "$ref": "#/components/schemas/WorkspaceApiKeyResponseModel" + }, + "type": "array", + "title": "Api-Keys" + } + }, + "type": "object", + "required": [ + "api-keys" + ], + "title": "WorkspaceApiKeyListResponseModel" + }, + "WorkspaceApiKeyResponseModel": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "hint": { + "type": "string", + "title": "Hint" + }, + "key_id": { + "type": "string", + "title": "Key Id" + }, + "service_account_user_id": { + "type": "string", + "title": "Service Account User Id" + }, + "created_at_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Created At Unix" + }, + "is_disabled": { + "type": "boolean", + "title": "Is Disabled", + "default": false + }, + "permissions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PermissionType" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Permissions" + }, + "character_limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Character Limit" + }, + "character_count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Character Count" + }, + "hashed_xi_api_key": { + "type": "string", + "title": "Hashed Xi Api Key" + }, + "allowed_ips": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 100, + "minItems": 1 + }, + { + "type": "null" + } + ], + "title": "Allowed Ips" + } + }, + "type": "object", + "required": [ + "name", + "hint", + "key_id", + "service_account_user_id", + "hashed_xi_api_key" + ], + "title": "WorkspaceApiKeyResponseModel" + }, + "WorkspaceAuditLogEntryResponse": { + "properties": { + "metadata": { + "additionalProperties": true, + "type": "object", + "title": "Metadata", + "description": "Event metadata" + }, + "time": { + "type": "integer", + "title": "Time", + "description": "Event time in milliseconds since epoch" + }, + "activity_id": { + "anyOf": [ + { + "$ref": "#/components/schemas/AccountChangeActivityId" + }, + { + "$ref": "#/components/schemas/AuthenticationActivityId" + }, + { + "$ref": "#/components/schemas/EntityManagementActivityId" + }, + { + "$ref": "#/components/schemas/UserAccessManagementActivityId" + }, + { + "$ref": "#/components/schemas/GroupManagementActivityId" + } + ], + "title": "Activity Id", + "description": "Activity ID" + }, + "activity_name": { + "type": "string", + "title": "Activity Name", + "description": "Activity name" + }, + "category_name": { + "type": "string", + "title": "Category Name", + "description": "Event category", + "default": "Identity & Access Management" + }, + "category_uid": { + "type": "integer", + "title": "Category Uid", + "description": "Category UID for IAM", + "default": 3 + }, + "class_name": { + "type": "string", + "title": "Class Name", + "description": "Event class name", + "default": "" + }, + "class_uid": { + "type": "integer", + "title": "Class Uid", + "description": "Event class UID", + "default": 0 + }, + "severity_id": { + "$ref": "#/components/schemas/SeverityId", + "description": "Severity level", + "default": 1 + }, + "status_id": { + "$ref": "#/components/schemas/StatusId", + "description": "Status of the action" + }, + "actor": { + "$ref": "#/components/schemas/ActorModel", + "description": "Actor performing the action" + }, + "device": { + "anyOf": [ + { + "$ref": "#/components/schemas/DeviceModel" + }, + { + "type": "null" + } + ], + "description": "Device information" + }, + "http_request": { + "anyOf": [ + { + "$ref": "#/components/schemas/HttpRequestModel" + }, + { + "type": "null" + } + ], + "description": "HTTP request details" + }, + "message": { + "type": "string", + "title": "Message", + "description": "Human-readable event description" + }, + "unmapped": { + "additionalProperties": true, + "type": "object", + "title": "Unmapped", + "description": "Attributes not mapped to OCSF" + }, + "id": { + "type": "string", + "title": "Id", + "description": "Firestore document ID" + }, + "time_dt": { + "type": "string", + "title": "Time Dt", + "description": "Event time in human-readable RFC 3339 format, derived from 'time'.", + "readOnly": true + }, + "type_uid": { + "type": "integer", + "title": "Type Uid", + "description": "OCSF type_uid is class_uid * 100 + activity_id.", + "readOnly": true + }, + "type_name": { + "type": "string", + "title": "Type Name", + "description": "OCSF type_name combines class_name and activity_name.", + "readOnly": true + } + }, + "type": "object", + "required": [ + "activity_id", + "activity_name", + "status_id", + "actor", + "message", + "id", + "time_dt", + "type_uid", + "type_name" + ], + "title": "WorkspaceAuditLogEntryResponse", + "description": "Audit log entry with Firestore document ID for API responses." + }, + "WorkspaceAuditLogsPageResponse": { + "properties": { + "entries": { + "items": { + "$ref": "#/components/schemas/WorkspaceAuditLogEntryResponse" + }, + "type": "array", + "title": "Entries" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + } + }, + "type": "object", + "required": [ + "entries", + "has_more", + "next_cursor" + ], + "title": "WorkspaceAuditLogsPageResponse", + "description": "Paginated workspace audit log response." + }, + "WorkspaceBatchCallsResponse": { + "properties": { + "batch_calls": { + "items": { + "$ref": "#/components/schemas/BatchCallResponse" + }, + "type": "array", + "title": "Batch Calls" + }, + "next_doc": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Doc", + "description": "The next document, used to paginate through the batch calls" + }, + "has_more": { + "type": "boolean", + "title": "Has More", + "description": "Whether there are more batch calls to paginate through", + "default": false + } + }, + "type": "object", + "required": [ + "batch_calls" + ], + "title": "WorkspaceBatchCallsResponse" + }, + "WorkspaceCreateApiKeyResponseModel": { + "properties": { + "xi-api-key": { + "type": "string", + "title": "Xi-Api-Key" + }, + "key_id": { + "type": "string", + "title": "Key Id" + } + }, + "type": "object", + "required": [ + "xi-api-key", + "key_id" + ], + "title": "WorkspaceCreateApiKeyResponseModel" + }, + "WorkspaceCreateWebhookResponseModel": { + "properties": { + "webhook_id": { + "type": "string", + "title": "Webhook Id" + }, + "webhook_secret": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Webhook Secret" + } + }, + "type": "object", + "required": [ + "webhook_id" + ], + "title": "WorkspaceCreateWebhookResponseModel" + }, + "WorkspaceGroupByNameResponseModel": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The name of the workspace group." + }, + "id": { + "type": "string", + "title": "Id", + "description": "The ID of the workspace group." + }, + "members_emails": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Members Emails", + "description": "The emails of the members of the workspace group." + } + }, + "type": "object", + "required": [ + "name", + "id", + "members_emails" + ], + "title": "WorkspaceGroupByNameResponseModel", + "example": { + "id": "1234567890", + "members_emails": [ + "john.doe@example.com", + "jane.smith@example.com" + ], + "name": "My Workspace Group" + } + }, + "WorkspaceGroupPermission": { + "type": "string", + "enum": [ + "text_to_speech", + "speech_to_speech", + "speech_to_text", + "voice_lab", + "sound_effects", + "projects", + "voiceover_studio", + "dubbing", + "audio_native", + "conversational_ai", + "conversational_ai_read", + "voice_isolator", + "ai_speech_classifier", + "add_voice_from_voice_library", + "create_instant_voice_clone", + "create_professional_voice_clone", + "create_user_api_key", + "publish_studio_project", + "music", + "image_video_generation", + "share_voice_externally", + "publish_voice_to_voice_library", + "view_fiat_balance", + "workspace_analytics_full_read", + "service_accounts_manage", + "webhooks_manage", + "group_members_manage", + "workspace_members_invite", + "workspace_members_remove", + "terms_of_service_accept", + "audit_log_read", + "copy_resources_cross_workspace", + "voice_design" + ], + "title": "WorkspaceGroupPermission" + }, + "WorkspaceGroupResponseModel": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "id": { + "type": "string", + "title": "Id" + }, + "members": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Members" + }, + "permissions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/WorkspaceGroupPermission" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Permissions" + }, + "group_usage_limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string", + "const": "unlimited" + }, + { + "type": "null" + } + ], + "title": "Group Usage Limit" + }, + "group_pvc_limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string", + "const": "unlimited" + }, + { + "type": "null" + } + ], + "title": "Group Pvc Limit" + }, + "character_count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Character Count" + }, + "scim_external_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Scim External Id" + }, + "is_scim_synced": { + "type": "boolean", + "title": "Is Scim Synced", + "default": false + } + }, + "type": "object", + "required": [ + "name", + "id", + "members", + "permissions" + ], + "title": "WorkspaceGroupResponseModel" + }, + "WorkspaceResourceType": { + "type": "string", + "enum": [ + "voice", + "voice_collection", + "pronunciation_dictionary", + "dubbing", + "project", + "convai_agents", + "convai_knowledge_base_documents", + "convai_tools", + "convai_settings", + "convai_secrets", + "workspace_auth_connections", + "convai_phone_numbers", + "convai_mcp_servers", + "convai_api_integration_connections", + "convai_api_integration_trigger_connections", + "convai_batch_calls", + "convai_agent_response_tests", + "convai_test_suite_invocations", + "convai_crawl_jobs", + "convai_crawl_tasks", + "convai_whatsapp_accounts", + "convai_agent_versions", + "convai_agent_branches", + "convai_agent_versions_deployments", + "convai_memory_entries", + "convai_coaching_proposals", + "convai_templates", + "dashboard", + "dashboard_configuration", + "convai_agent_drafts", + "resource_locators", + "assets", + "content_generations", + "content_templates", + "songs", + "transcription_tasks", + "avatars", + "avatar_video_generations", + "resource_collection", + "studio_projects" + ], + "title": "WorkspaceResourceType", + "description": "Resource types that can be shared in the workspace. The name always need to match the collection names" + }, + "WorkspaceServiceAccountListResponseModel": { + "properties": { + "service-accounts": { + "items": { + "$ref": "#/components/schemas/WorkspaceServiceAccountResponseModel" + }, + "type": "array", + "title": "Service-Accounts" + } + }, + "type": "object", + "required": [ + "service-accounts" + ], + "title": "WorkspaceServiceAccountListResponseModel" + }, + "WorkspaceServiceAccountResponseModel": { + "properties": { + "service_account_user_id": { + "type": "string", + "title": "Service Account User Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "created_at_unix": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Created At Unix" + }, + "api-keys": { + "items": { + "$ref": "#/components/schemas/WorkspaceApiKeyResponseModel" + }, + "type": "array", + "title": "Api-Keys" + }, + "default_sharing_groups": { + "items": { + "$ref": "#/components/schemas/DefaultSharingGroupResponseModel" + }, + "type": "array", + "title": "Default Sharing Groups", + "default": [] + } + }, + "type": "object", + "required": [ + "service_account_user_id", + "name", + "api-keys" + ], + "title": "WorkspaceServiceAccountResponseModel" + }, + "WorkspaceWebhookListResponseModel": { + "properties": { + "webhooks": { + "items": { + "$ref": "#/components/schemas/WorkspaceWebhookResponseModel" + }, + "type": "array", + "title": "Webhooks", + "description": "List of webhooks currently configured for the workspace" + } + }, + "type": "object", + "required": [ + "webhooks" + ], + "title": "WorkspaceWebhookListResponseModel", + "example": { + "webhooks": [ + { + "auth_type": "hmac", + "created_at_unix": 123456789, + "is_auto_disabled": false, + "is_disabled": false, + "most_recent_failure_error_code": 404, + "most_recent_failure_timestamp": 123456799, + "name": "My Webhook", + "usage": [ + { + "usage_type": "ConvAI Settings" + } + ], + "webhook_id": "123", + "webhook_url": "https://elevenlabs.io/example-callback-url" + } + ] + } + }, + "WorkspaceWebhookResponseModel": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "The display name for this webhook." + }, + "webhook_id": { + "type": "string", + "title": "Webhook Id", + "description": "The unique ID for this webhook." + }, + "webhook_url": { + "type": "string", + "title": "Webhook Url", + "description": "The HTTPS callback URL that is called when this webhook is triggered in the platform." + }, + "is_disabled": { + "type": "boolean", + "title": "Is Disabled", + "description": "Whether the webhook has been manually disabled by a user." + }, + "is_auto_disabled": { + "type": "boolean", + "title": "Is Auto Disabled", + "description": "Whether the webhook has been automatically disabled due to repeated consecutive failures over a long period of time." + }, + "created_at_unix": { + "type": "integer", + "title": "Created At Unix", + "description": "Original creation time of the webhook." + }, + "auth_type": { + "$ref": "#/components/schemas/WebhookAuthMethodType", + "description": "The authentication mode used to secure the webhook." + }, + "usage": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/WorkspaceWebhookUsageResponseModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Usage", + "description": "The list of products that are currently configured to trigger this webhook." + }, + "most_recent_failure_error_code": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Most Recent Failure Error Code", + "description": "The most recent error code returned from the callback URL." + }, + "most_recent_failure_timestamp": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Most Recent Failure Timestamp", + "description": "The most recent time the webhook failed, failures are any non-200 codes returned by the callback URL." + } + }, + "type": "object", + "required": [ + "name", + "webhook_id", + "webhook_url", + "is_disabled", + "is_auto_disabled", + "created_at_unix", + "auth_type" + ], + "title": "WorkspaceWebhookResponseModel" + }, + "WorkspaceWebhookUsageResponseModel": { + "properties": { + "usage_type": { + "$ref": "#/components/schemas/WebhookUsageType" + } + }, + "type": "object", + "required": [ + "usage_type" + ], + "title": "WorkspaceWebhookUsageResponseModel" + } + } + }, + "tags": [ + { + "name": "text-to-speech", + "description": "Convert text into lifelike speech using a voice of your choice." + }, + { + "name": "speech-to-speech", + "description": "Create speech by combining the style and content of an audio file you upload with a voice of your choice." + }, + { + "name": "speech-to-text", + "description": "Transcribe your audio files with detailed speaker annotations and precise timestamps using our cutting-edge model." + }, + { + "name": "forced-alignment", + "description": "Force align an audio file to a text transcript to get precise word-level and character level timing information. Response is a list of characters with their start and end times as milliseconds elapsed from the start of the recording." + }, + { + "name": "models", + "description": "Access the different models of the platform." + }, + { + "name": "productions", + "description": "Access and manage ElevenProductions orders." + }, + { + "name": "voices", + "description": "Access to voices created either by you or ElevenLabs." + }, + { + "name": "samples", + "description": "Access to your samples. A sample is any audio file you attached to a voice. A voice can have one or more samples." + }, + { + "name": "speech-history", + "description": "Accesses your speech history. Your speech history is a list of all your created audio including its metadata using our text-to-speech and speech-to-speech models." + }, + { + "name": "studios", + "description": "Access, create and convert Studio Projects programmatically, only specifically whitelisted accounts can access the Studio API. If you need access please contact our sales team." + }, + { + "name": "workspace", + "description": "Access to workspace related endpoints." + } + ] +} \ No newline at end of file diff --git a/packages/typescript/ai-schemas/scripts/specs/gemini/gemini.discovery.json b/packages/typescript/ai-schemas/scripts/specs/gemini/gemini.discovery.json new file mode 100644 index 000000000..dc84699c9 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/specs/gemini/gemini.discovery.json @@ -0,0 +1,7765 @@ +{ + "basePath": "", + "id": "generativelanguage:v1beta", + "ownerDomain": "google.com", + "fullyEncodeReservedExpansion": true, + "resources": { + "batches": { + "methods": { + "list": { + "id": "generativelanguage.batches.list", + "path": "v1beta/{+name}", + "flatPath": "v1beta/batches", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation's parent resource.", + "pattern": "^batches$", + "location": "path", + "required": true, + "type": "string" + }, + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`." + }, + "get": { + "id": "generativelanguage.batches.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/batches/{batchesId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation resource.", + "pattern": "^batches/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." + }, + "delete": { + "id": "generativelanguage.batches.delete", + "path": "v1beta/{+name}", + "flatPath": "v1beta/batches/{batchesId}", + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "pattern": "^batches/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`." + }, + "cancel": { + "id": "generativelanguage.batches.cancel", + "path": "v1beta/{+name}:cancel", + "flatPath": "v1beta/batches/{batchesId}:cancel", + "httpMethod": "POST", + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "pattern": "^batches/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`." + }, + "updateGenerateContentBatch": { + "id": "generativelanguage.batches.updateGenerateContentBatch", + "path": "v1beta/{+name}:updateGenerateContentBatch", + "flatPath": "v1beta/batches/{batchesId}:updateGenerateContentBatch", + "httpMethod": "PATCH", + "parameters": { + "name": { + "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.", + "pattern": "^batches/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The list of fields to update.", + "location": "query", + "type": "string", + "format": "google-fieldmask" + } + }, + "parameterOrder": [ + "name" + ], + "request": { + "$ref": "GenerateContentBatch" + }, + "response": { + "$ref": "GenerateContentBatch" + }, + "description": "Updates a batch of GenerateContent requests for batch processing." + }, + "updateEmbedContentBatch": { + "id": "generativelanguage.batches.updateEmbedContentBatch", + "path": "v1beta/{+name}:updateEmbedContentBatch", + "flatPath": "v1beta/batches/{batchesId}:updateEmbedContentBatch", + "httpMethod": "PATCH", + "parameters": { + "name": { + "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.", + "pattern": "^batches/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The list of fields to update.", + "location": "query", + "type": "string", + "format": "google-fieldmask" + } + }, + "parameterOrder": [ + "name" + ], + "request": { + "$ref": "EmbedContentBatch" + }, + "response": { + "$ref": "EmbedContentBatch" + }, + "description": "Updates a batch of EmbedContent requests for batch processing." + } + } + }, + "models": { + "methods": { + "generateContent": { + "id": "generativelanguage.models.generateContent", + "path": "v1beta/{+model}:generateContent", + "flatPath": "v1beta/models/{modelsId}:generateContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "GenerateContentRequest" + }, + "response": { + "$ref": "GenerateContentResponse" + }, + "description": "Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details." + }, + "generateAnswer": { + "id": "generativelanguage.models.generateAnswer", + "path": "v1beta/{+model}:generateAnswer", + "flatPath": "v1beta/models/{modelsId}:generateAnswer", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the grounded response. Format: `model=models/{model}`.", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "GenerateAnswerRequest" + }, + "response": { + "$ref": "GenerateAnswerResponse" + }, + "description": "Generates a grounded answer from the model given an input `GenerateAnswerRequest`." + }, + "streamGenerateContent": { + "id": "generativelanguage.models.streamGenerateContent", + "path": "v1beta/{+model}:streamGenerateContent", + "flatPath": "v1beta/models/{modelsId}:streamGenerateContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "GenerateContentRequest" + }, + "response": { + "$ref": "GenerateContentResponse" + }, + "description": "Generates a [streamed response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream) from the model given an input `GenerateContentRequest`." + }, + "embedContent": { + "id": "generativelanguage.models.embedContent", + "path": "v1beta/{+model}:embedContent", + "flatPath": "v1beta/models/{modelsId}:embedContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "EmbedContentRequest" + }, + "response": { + "$ref": "EmbedContentResponse" + }, + "description": "Generates a text embedding vector from the input `Content` using the specified [Gemini Embedding model](https://ai.google.dev/gemini-api/docs/models/gemini#text-embedding)." + }, + "batchEmbedContents": { + "id": "generativelanguage.models.batchEmbedContents", + "path": "v1beta/{+model}:batchEmbedContents", + "flatPath": "v1beta/models/{modelsId}:batchEmbedContents", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "BatchEmbedContentsRequest" + }, + "response": { + "$ref": "BatchEmbedContentsResponse" + }, + "description": "Generates multiple embedding vectors from the input `Content` which consists of a batch of strings represented as `EmbedContentRequest` objects." + }, + "countTokens": { + "id": "generativelanguage.models.countTokens", + "path": "v1beta/{+model}:countTokens", + "flatPath": "v1beta/models/{modelsId}:countTokens", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "CountTokensRequest" + }, + "response": { + "$ref": "CountTokensResponse" + }, + "description": "Runs a model's tokenizer on input `Content` and returns the token count. Refer to the [tokens guide](https://ai.google.dev/gemini-api/docs/tokens) to learn more about tokens." + }, + "batchGenerateContent": { + "id": "generativelanguage.models.batchGenerateContent", + "path": "v1beta/{+model}:batchGenerateContent", + "flatPath": "v1beta/models/{modelsId}:batchGenerateContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "BatchGenerateContentRequest" + }, + "response": { + "$ref": "Operation" + }, + "description": "Enqueues a batch of `GenerateContent` requests for batch processing." + }, + "asyncBatchEmbedContent": { + "id": "generativelanguage.models.asyncBatchEmbedContent", + "path": "v1beta/{+model}:asyncBatchEmbedContent", + "flatPath": "v1beta/models/{modelsId}:asyncBatchEmbedContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "AsyncBatchEmbedContentRequest" + }, + "response": { + "$ref": "Operation" + }, + "description": "Enqueues a batch of `EmbedContent` requests for batch processing. We have a `BatchEmbedContents` handler in `GenerativeService`, but it was synchronized. So we name this one to be `Async` to avoid confusion." + }, + "generateMessage": { + "id": "generativelanguage.models.generateMessage", + "path": "v1beta/{+model}:generateMessage", + "flatPath": "v1beta/models/{modelsId}:generateMessage", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the model to use. Format: `name=models/{model}`.", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "GenerateMessageRequest" + }, + "response": { + "$ref": "GenerateMessageResponse" + }, + "description": "Generates a response from the model given an input `MessagePrompt`." + }, + "countMessageTokens": { + "id": "generativelanguage.models.countMessageTokens", + "path": "v1beta/{+model}:countMessageTokens", + "flatPath": "v1beta/models/{modelsId}:countMessageTokens", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "CountMessageTokensRequest" + }, + "response": { + "$ref": "CountMessageTokensResponse" + }, + "description": "Runs a model's tokenizer on a string and returns the token count." + }, + "get": { + "id": "generativelanguage.models.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/models/{modelsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Required. The resource name of the model. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Model" + }, + "description": "Gets information about a specific `Model` such as its version number, token limits, [parameters](https://ai.google.dev/gemini-api/docs/models/generative-models#model-parameters) and other metadata. Refer to the [Gemini models guide](https://ai.google.dev/gemini-api/docs/models/gemini) for detailed model information." + }, + "list": { + "id": "generativelanguage.models.list", + "path": "v1beta/models", + "flatPath": "v1beta/models", + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "The maximum number of `Models` to return (per page). If unspecified, 50 models will be returned per page. This method returns at most 1000 models per page, even if you pass a larger page_size.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "A page token, received from a previous `ListModels` call. Provide the `page_token` returned by one request as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListModels` must match the call that provided the page token.", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [], + "response": { + "$ref": "ListModelsResponse" + }, + "description": "Lists the [`Model`s](https://ai.google.dev/gemini-api/docs/models/gemini) available through the Gemini API." + }, + "predict": { + "id": "generativelanguage.models.predict", + "path": "v1beta/{+model}:predict", + "flatPath": "v1beta/models/{modelsId}:predict", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the model for prediction. Format: `name=models/{model}`.", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "PredictRequest" + }, + "response": { + "$ref": "PredictResponse" + }, + "description": "Performs a prediction request." + }, + "predictLongRunning": { + "id": "generativelanguage.models.predictLongRunning", + "path": "v1beta/{+model}:predictLongRunning", + "flatPath": "v1beta/models/{modelsId}:predictLongRunning", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the model for prediction. Format: `name=models/{model}`.", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "PredictLongRunningRequest" + }, + "response": { + "$ref": "Operation" + }, + "description": "Same as Predict but returns an LRO." + }, + "generateText": { + "id": "generativelanguage.models.generateText", + "path": "v1beta/{+model}:generateText", + "flatPath": "v1beta/models/{modelsId}:generateText", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` or `TunedModel` to use for generating the completion. Examples: models/text-bison-001 tunedModels/sentence-translator-u3b7m", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "GenerateTextRequest" + }, + "response": { + "$ref": "GenerateTextResponse" + }, + "description": "Generates a response from the model given an input message." + }, + "embedText": { + "id": "generativelanguage.models.embedText", + "path": "v1beta/{+model}:embedText", + "flatPath": "v1beta/models/{modelsId}:embedText", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The model name to use with the format model=models/{model}.", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "EmbedTextRequest" + }, + "response": { + "$ref": "EmbedTextResponse" + }, + "description": "Generates an embedding from the model given an input message." + }, + "batchEmbedText": { + "id": "generativelanguage.models.batchEmbedText", + "path": "v1beta/{+model}:batchEmbedText", + "flatPath": "v1beta/models/{modelsId}:batchEmbedText", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the embedding. Examples: models/embedding-gecko-001", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "BatchEmbedTextRequest" + }, + "response": { + "$ref": "BatchEmbedTextResponse" + }, + "description": "Generates multiple embeddings from the model given input text in a synchronous call." + }, + "countTextTokens": { + "id": "generativelanguage.models.countTextTokens", + "path": "v1beta/{+model}:countTextTokens", + "flatPath": "v1beta/models/{modelsId}:countTextTokens", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "CountTextTokensRequest" + }, + "response": { + "$ref": "CountTextTokensResponse" + }, + "description": "Runs a model's tokenizer on a text and returns the token count." + } + }, + "resources": { + "operations": { + "methods": { + "list": { + "id": "generativelanguage.models.operations.list", + "path": "v1beta/{+name}/operations", + "flatPath": "v1beta/models/{modelsId}/operations", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation's parent resource.", + "pattern": "^models/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`." + }, + "get": { + "id": "generativelanguage.models.operations.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/models/{modelsId}/operations/{operationsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation resource.", + "pattern": "^models/[^/]+/operations/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." + } + } + } + } + }, + "tunedModels": { + "methods": { + "generateContent": { + "id": "generativelanguage.tunedModels.generateContent", + "path": "v1beta/{+model}:generateContent", + "flatPath": "v1beta/tunedModels/{tunedModelsId}:generateContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "GenerateContentRequest" + }, + "response": { + "$ref": "GenerateContentResponse" + }, + "description": "Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details." + }, + "streamGenerateContent": { + "id": "generativelanguage.tunedModels.streamGenerateContent", + "path": "v1beta/{+model}:streamGenerateContent", + "flatPath": "v1beta/tunedModels/{tunedModelsId}:streamGenerateContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "GenerateContentRequest" + }, + "response": { + "$ref": "GenerateContentResponse" + }, + "description": "Generates a [streamed response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream) from the model given an input `GenerateContentRequest`." + }, + "batchGenerateContent": { + "id": "generativelanguage.tunedModels.batchGenerateContent", + "path": "v1beta/{+model}:batchGenerateContent", + "flatPath": "v1beta/tunedModels/{tunedModelsId}:batchGenerateContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "BatchGenerateContentRequest" + }, + "response": { + "$ref": "Operation" + }, + "description": "Enqueues a batch of `GenerateContent` requests for batch processing." + }, + "asyncBatchEmbedContent": { + "id": "generativelanguage.tunedModels.asyncBatchEmbedContent", + "path": "v1beta/{+model}:asyncBatchEmbedContent", + "flatPath": "v1beta/tunedModels/{tunedModelsId}:asyncBatchEmbedContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "AsyncBatchEmbedContentRequest" + }, + "response": { + "$ref": "Operation" + }, + "description": "Enqueues a batch of `EmbedContent` requests for batch processing. We have a `BatchEmbedContents` handler in `GenerativeService`, but it was synchronized. So we name this one to be `Async` to avoid confusion." + }, + "get": { + "id": "generativelanguage.tunedModels.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/tunedModels/{tunedModelsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Required. The resource name of the model. Format: `tunedModels/my-model-id`", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "TunedModel" + }, + "description": "Gets information about a specific TunedModel." + }, + "list": { + "id": "generativelanguage.tunedModels.list", + "path": "v1beta/tunedModels", + "flatPath": "v1beta/tunedModels", + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of `TunedModels` to return (per page). The service may return fewer tuned models. If unspecified, at most 10 tuned models will be returned. This method returns at most 1000 models per page, even if you pass a larger page_size.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListTunedModels` call. Provide the `page_token` returned by one request as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListTunedModels` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "filter": { + "description": "Optional. A filter is a full text search over the tuned model's description and display name. By default, results will not include tuned models shared with everyone. Additional operators: - owner:me - writers:me - readers:me - readers:everyone Examples: \"owner:me\" returns all tuned models to which caller has owner role \"readers:me\" returns all tuned models to which caller has reader role \"readers:everyone\" returns all tuned models that are shared with everyone", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [], + "response": { + "$ref": "ListTunedModelsResponse" + }, + "description": "Lists created tuned models." + }, + "create": { + "id": "generativelanguage.tunedModels.create", + "path": "v1beta/tunedModels", + "flatPath": "v1beta/tunedModels", + "httpMethod": "POST", + "parameters": { + "tunedModelId": { + "description": "Optional. The unique id for the tuned model if specified. This value should be up to 40 characters, the first character must be a letter, the last could be a letter or a number. The id must match the regular expression: `[a-z]([a-z0-9-]{0,38}[a-z0-9])?`.", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [], + "request": { + "$ref": "TunedModel" + }, + "response": { + "$ref": "Operation" + }, + "description": "Creates a tuned model. Check intermediate tuning progress (if any) through the [google.longrunning.Operations] service. Access status and results through the Operations service. Example: GET /v1/tunedModels/az2mb0bpw6i/operations/000-111-222" + }, + "patch": { + "id": "generativelanguage.tunedModels.patch", + "path": "v1beta/{+name}", + "flatPath": "v1beta/tunedModels/{tunedModelsId}", + "httpMethod": "PATCH", + "parameters": { + "name": { + "description": "Output only. The tuned model name. A unique name will be generated on create. Example: `tunedModels/az2mb0bpw6i` If display_name is set on create, the id portion of the name will be set by concatenating the words of the display_name with hyphens and adding a random portion for uniqueness. Example: * display_name = `Sentence Translator` * name = `tunedModels/sentence-translator-u3b7m`", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The list of fields to update.", + "location": "query", + "type": "string", + "format": "google-fieldmask" + } + }, + "parameterOrder": [ + "name" + ], + "request": { + "$ref": "TunedModel" + }, + "response": { + "$ref": "TunedModel" + }, + "description": "Updates a tuned model." + }, + "delete": { + "id": "generativelanguage.tunedModels.delete", + "path": "v1beta/{+name}", + "flatPath": "v1beta/tunedModels/{tunedModelsId}", + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "Required. The resource name of the model. Format: `tunedModels/my-model-id`", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "description": "Deletes a tuned model." + }, + "transferOwnership": { + "id": "generativelanguage.tunedModels.transferOwnership", + "path": "v1beta/{+name}:transferOwnership", + "flatPath": "v1beta/tunedModels/{tunedModelsId}:transferOwnership", + "httpMethod": "POST", + "parameters": { + "name": { + "description": "Required. The resource name of the tuned model to transfer ownership. Format: `tunedModels/my-model-id`", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "request": { + "$ref": "TransferOwnershipRequest" + }, + "response": { + "$ref": "TransferOwnershipResponse" + }, + "description": "Transfers ownership of the tuned model. This is the only way to change ownership of the tuned model. The current owner will be downgraded to writer role." + }, + "generateText": { + "id": "generativelanguage.tunedModels.generateText", + "path": "v1beta/{+model}:generateText", + "flatPath": "v1beta/tunedModels/{tunedModelsId}:generateText", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` or `TunedModel` to use for generating the completion. Examples: models/text-bison-001 tunedModels/sentence-translator-u3b7m", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "GenerateTextRequest" + }, + "response": { + "$ref": "GenerateTextResponse" + }, + "description": "Generates a response from the model given an input message." + } + }, + "resources": { + "operations": { + "methods": { + "list": { + "id": "generativelanguage.tunedModels.operations.list", + "path": "v1beta/{+name}/operations", + "flatPath": "v1beta/tunedModels/{tunedModelsId}/operations", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation's parent resource.", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + }, + "returnPartialSuccess": { + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", + "location": "query", + "type": "boolean" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`." + }, + "get": { + "id": "generativelanguage.tunedModels.operations.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/tunedModels/{tunedModelsId}/operations/{operationsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation resource.", + "pattern": "^tunedModels/[^/]+/operations/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." + } + } + }, + "permissions": { + "methods": { + "create": { + "id": "generativelanguage.tunedModels.permissions.create", + "path": "v1beta/{+parent}/permissions", + "flatPath": "v1beta/tunedModels/{tunedModelsId}/permissions", + "httpMethod": "POST", + "parameters": { + "parent": { + "description": "Required. The parent resource of the `Permission`. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "parent" + ], + "request": { + "$ref": "Permission" + }, + "response": { + "$ref": "Permission" + }, + "description": "Create a permission to a specific resource." + }, + "get": { + "id": "generativelanguage.tunedModels.permissions.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/tunedModels/{tunedModelsId}/permissions/{permissionsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`", + "pattern": "^tunedModels/[^/]+/permissions/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Permission" + }, + "description": "Gets information about a specific Permission." + }, + "list": { + "id": "generativelanguage.tunedModels.permissions.list", + "path": "v1beta/{+parent}/permissions", + "flatPath": "v1beta/tunedModels/{tunedModelsId}/permissions", + "httpMethod": "GET", + "parameters": { + "parent": { + "description": "Required. The parent resource of the permissions. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`", + "pattern": "^tunedModels/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of `Permission`s to return (per page). The service may return fewer permissions. If unspecified, at most 10 permissions will be returned. This method returns at most 1000 permissions per page, even if you pass larger page_size.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListPermissions` call. Provide the `page_token` returned by one request as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListPermissions` must match the call that provided the page token.", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListPermissionsResponse" + }, + "description": "Lists permissions for the specific resource." + }, + "patch": { + "id": "generativelanguage.tunedModels.permissions.patch", + "path": "v1beta/{+name}", + "flatPath": "v1beta/tunedModels/{tunedModelsId}/permissions/{permissionsId}", + "httpMethod": "PATCH", + "parameters": { + "name": { + "description": "Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only.", + "pattern": "^tunedModels/[^/]+/permissions/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to update. Accepted ones: - role (`Permission.role` field)", + "location": "query", + "type": "string", + "format": "google-fieldmask" + } + }, + "parameterOrder": [ + "name" + ], + "request": { + "$ref": "Permission" + }, + "response": { + "$ref": "Permission" + }, + "description": "Updates the permission." + }, + "delete": { + "id": "generativelanguage.tunedModels.permissions.delete", + "path": "v1beta/{+name}", + "flatPath": "v1beta/tunedModels/{tunedModelsId}/permissions/{permissionsId}", + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`", + "pattern": "^tunedModels/[^/]+/permissions/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "description": "Deletes the permission." + } + } + } + } + }, + "dynamic": { + "methods": { + "generateContent": { + "id": "generativelanguage.dynamic.generateContent", + "path": "v1beta/{+model}:generateContent", + "flatPath": "v1beta/dynamic/{dynamicId}:generateContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "pattern": "^dynamic/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "GenerateContentRequest" + }, + "response": { + "$ref": "GenerateContentResponse" + }, + "description": "Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details." + }, + "streamGenerateContent": { + "id": "generativelanguage.dynamic.streamGenerateContent", + "path": "v1beta/{+model}:streamGenerateContent", + "flatPath": "v1beta/dynamic/{dynamicId}:streamGenerateContent", + "httpMethod": "POST", + "parameters": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "pattern": "^dynamic/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "model" + ], + "request": { + "$ref": "GenerateContentRequest" + }, + "response": { + "$ref": "GenerateContentResponse" + }, + "description": "Generates a [streamed response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream) from the model given an input `GenerateContentRequest`." + } + } + }, + "cachedContents": { + "methods": { + "list": { + "id": "generativelanguage.cachedContents.list", + "path": "v1beta/cachedContents", + "flatPath": "v1beta/cachedContents", + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of cached contents to return. The service may return fewer than this value. If unspecified, some default (under maximum) number of items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListCachedContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCachedContents` must match the call that provided the page token.", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [], + "response": { + "$ref": "ListCachedContentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Lists CachedContents." + }, + "create": { + "id": "generativelanguage.cachedContents.create", + "path": "v1beta/cachedContents", + "flatPath": "v1beta/cachedContents", + "httpMethod": "POST", + "parameters": {}, + "parameterOrder": [], + "request": { + "$ref": "CachedContent" + }, + "response": { + "$ref": "CachedContent" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Creates CachedContent resource." + }, + "get": { + "id": "generativelanguage.cachedContents.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/cachedContents/{cachedContentsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Required. The resource name referring to the content cache entry. Format: `cachedContents/{id}`", + "pattern": "^cachedContents/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CachedContent" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Reads CachedContent resource." + }, + "patch": { + "id": "generativelanguage.cachedContents.patch", + "path": "v1beta/{+name}", + "flatPath": "v1beta/cachedContents/{cachedContentsId}", + "httpMethod": "PATCH", + "parameters": { + "name": { + "description": "Output only. Identifier. The resource name referring to the cached content. Format: `cachedContents/{id}`", + "pattern": "^cachedContents/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to update.", + "location": "query", + "type": "string", + "format": "google-fieldmask" + } + }, + "parameterOrder": [ + "name" + ], + "request": { + "$ref": "CachedContent" + }, + "response": { + "$ref": "CachedContent" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Updates CachedContent resource (only expiration is updatable)." + }, + "delete": { + "id": "generativelanguage.cachedContents.delete", + "path": "v1beta/{+name}", + "flatPath": "v1beta/cachedContents/{cachedContentsId}", + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "Required. The resource name referring to the content cache entry Format: `cachedContents/{id}`", + "pattern": "^cachedContents/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Deletes CachedContent resource." + } + } + }, + "media": { + "methods": { + "upload": { + "id": "generativelanguage.media.upload", + "path": "v1beta/files", + "flatPath": "v1beta/files", + "httpMethod": "POST", + "parameters": {}, + "parameterOrder": [], + "supportsMediaUpload": true, + "mediaUpload": { + "accept": [ + "*/*" + ], + "maxSize": "2147483648", + "protocols": { + "resumable": { + "multipart": true, + "path": "/resumable/upload/v1beta/files" + }, + "simple": { + "multipart": true, + "path": "/upload/v1beta/files" + } + } + }, + "request": { + "$ref": "CreateFileRequest" + }, + "response": { + "$ref": "CreateFileResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Creates a `File`." + }, + "uploadToFileSearchStore": { + "id": "generativelanguage.media.uploadToFileSearchStore", + "path": "v1beta/{+fileSearchStoreName}:uploadToFileSearchStore", + "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}:uploadToFileSearchStore", + "httpMethod": "POST", + "parameters": { + "fileSearchStoreName": { + "description": "Required. Immutable. The name of the `FileSearchStore` to upload the file into. Example: `fileSearchStores/my-file-search-store-123`", + "pattern": "^fileSearchStores/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "fileSearchStoreName" + ], + "supportsMediaUpload": true, + "mediaUpload": { + "accept": [ + "*/*" + ], + "maxSize": "104857600", + "protocols": { + "resumable": { + "multipart": true, + "path": "/resumable/upload/v1beta/{+fileSearchStoreName}:uploadToFileSearchStore" + }, + "simple": { + "multipart": true, + "path": "/upload/v1beta/{+fileSearchStoreName}:uploadToFileSearchStore" + } + } + }, + "request": { + "$ref": "UploadToFileSearchStoreRequest" + }, + "response": { + "$ref": "CustomLongRunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Uploads data to a FileSearchStore, preprocesses and chunks before storing it in a FileSearchStore Document." + } + } + }, + "files": { + "methods": { + "register": { + "id": "generativelanguage.files.register", + "path": "v1beta/files:register", + "flatPath": "v1beta/files:register", + "httpMethod": "POST", + "parameters": {}, + "parameterOrder": [], + "request": { + "$ref": "RegisterFilesRequest" + }, + "response": { + "$ref": "RegisterFilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Registers a Google Cloud Storage files with FileService. The user is expected to provide Google Cloud Storage URIs and will receive a File resource for each URI in return. Note that the files are not copied, just registered with File API. If one file fails to register, the whole request fails." + }, + "list": { + "id": "generativelanguage.files.list", + "path": "v1beta/files", + "flatPath": "v1beta/files", + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of `File`s to return per page. If unspecified, defaults to 10. Maximum `page_size` is 100.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "Optional. A page token from a previous `ListFiles` call.", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [], + "response": { + "$ref": "ListFilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Lists the metadata for `File`s owned by the requesting project." + }, + "get": { + "id": "generativelanguage.files.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/files/{filesId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Required. The name of the `File` to get. Example: `files/abc-123`", + "pattern": "^files/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "File" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Gets the metadata for the given `File`." + }, + "delete": { + "id": "generativelanguage.files.delete", + "path": "v1beta/{+name}", + "flatPath": "v1beta/files/{filesId}", + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "Required. The name of the `File` to delete. Example: `files/abc-123`", + "pattern": "^files/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Deletes the `File`." + } + } + }, + "generatedFiles": { + "methods": { + "list": { + "id": "generativelanguage.generatedFiles.list", + "path": "v1beta/generatedFiles", + "flatPath": "v1beta/generatedFiles", + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of `GeneratedFile`s to return per page. If unspecified, defaults to 10. Maximum `page_size` is 50.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "Optional. A page token from a previous `ListGeneratedFiles` call.", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [], + "response": { + "$ref": "ListGeneratedFilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Lists the generated files owned by the requesting project." + } + }, + "resources": { + "operations": { + "methods": { + "get": { + "id": "generativelanguage.generatedFiles.operations.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/generatedFiles/{generatedFilesId}/operations/{operationsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation resource.", + "pattern": "^generatedFiles/[^/]+/operations/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." + } + } + } + } + }, + "fileSearchStores": { + "methods": { + "create": { + "id": "generativelanguage.fileSearchStores.create", + "path": "v1beta/fileSearchStores", + "flatPath": "v1beta/fileSearchStores", + "httpMethod": "POST", + "parameters": {}, + "parameterOrder": [], + "request": { + "$ref": "FileSearchStore" + }, + "response": { + "$ref": "FileSearchStore" + }, + "description": "Creates an empty `FileSearchStore`." + }, + "get": { + "id": "generativelanguage.fileSearchStores.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Required. The name of the `FileSearchStore`. Example: `fileSearchStores/my-file-search-store-123`", + "pattern": "^fileSearchStores/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "FileSearchStore" + }, + "description": "Gets information about a specific `FileSearchStore`." + }, + "delete": { + "id": "generativelanguage.fileSearchStores.delete", + "path": "v1beta/{+name}", + "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}", + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "Required. The resource name of the `FileSearchStore`. Example: `fileSearchStores/my-file-search-store-123`", + "pattern": "^fileSearchStores/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "force": { + "description": "Optional. If set to true, any `Document`s and objects related to this `FileSearchStore` will also be deleted. If false (the default), a `FAILED_PRECONDITION` error will be returned if `FileSearchStore` contains any `Document`s.", + "location": "query", + "type": "boolean" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "description": "Deletes a `FileSearchStore`." + }, + "list": { + "id": "generativelanguage.fileSearchStores.list", + "path": "v1beta/fileSearchStores", + "flatPath": "v1beta/fileSearchStores", + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of `FileSearchStores` to return (per page). The service may return fewer `FileSearchStores`. If unspecified, at most 10 `FileSearchStores` will be returned. The maximum size limit is 20 `FileSearchStores` per page.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListFileSearchStores` call. Provide the `next_page_token` returned in the response as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListFileSearchStores` must match the call that provided the page token.", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [], + "response": { + "$ref": "ListFileSearchStoresResponse" + }, + "description": "Lists all `FileSearchStores` owned by the user." + }, + "importFile": { + "id": "generativelanguage.fileSearchStores.importFile", + "path": "v1beta/{+fileSearchStoreName}:importFile", + "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}:importFile", + "httpMethod": "POST", + "parameters": { + "fileSearchStoreName": { + "description": "Required. Immutable. The name of the `FileSearchStore` to import the file into. Example: `fileSearchStores/my-file-search-store-123`", + "pattern": "^fileSearchStores/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "fileSearchStoreName" + ], + "request": { + "$ref": "ImportFileRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/devstorage.read_only" + ], + "description": "Imports a `File` from File Service to a `FileSearchStore`." + } + }, + "resources": { + "operations": { + "methods": { + "get": { + "id": "generativelanguage.fileSearchStores.operations.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}/operations/{operationsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation resource.", + "pattern": "^fileSearchStores/[^/]+/operations/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." + } + } + }, + "upload": { + "resources": { + "operations": { + "methods": { + "get": { + "id": "generativelanguage.fileSearchStores.upload.operations.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}/upload/operations/{operationsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation resource.", + "pattern": "^fileSearchStores/[^/]+/upload/operations/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." + } + } + } + } + }, + "documents": { + "methods": { + "get": { + "id": "generativelanguage.fileSearchStores.documents.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}/documents/{documentsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Required. The name of the `Document` to retrieve. Example: `fileSearchStores/my-file-search-store-123/documents/the-doc-abc`", + "pattern": "^fileSearchStores/[^/]+/documents/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Document" + }, + "description": "Gets information about a specific `Document`." + }, + "delete": { + "id": "generativelanguage.fileSearchStores.documents.delete", + "path": "v1beta/{+name}", + "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}/documents/{documentsId}", + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "Required. The resource name of the `Document` to delete. Example: `fileSearchStores/my-file-search-store-123/documents/the-doc-abc`", + "pattern": "^fileSearchStores/[^/]+/documents/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "force": { + "description": "Optional. If set to true, any `Chunk`s and objects related to this `Document` will also be deleted. If false (the default), a `FAILED_PRECONDITION` error will be returned if `Document` contains any `Chunk`s.", + "location": "query", + "type": "boolean" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "description": "Deletes a `Document`." + }, + "list": { + "id": "generativelanguage.fileSearchStores.documents.list", + "path": "v1beta/{+parent}/documents", + "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}/documents", + "httpMethod": "GET", + "parameters": { + "parent": { + "description": "Required. The name of the `FileSearchStore` containing `Document`s. Example: `fileSearchStores/my-file-search-store-123`", + "pattern": "^fileSearchStores/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of `Document`s to return (per page). The service may return fewer `Document`s. If unspecified, at most 10 `Document`s will be returned. The maximum size limit is 20 `Document`s per page.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListDocuments` call. Provide the `next_page_token` returned in the response as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListDocuments` must match the call that provided the page token.", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListDocumentsResponse" + }, + "description": "Lists all `Document`s in a `Corpus`." + } + } + } + } + }, + "corpora": { + "methods": { + "create": { + "id": "generativelanguage.corpora.create", + "path": "v1beta/corpora", + "flatPath": "v1beta/corpora", + "httpMethod": "POST", + "parameters": {}, + "parameterOrder": [], + "request": { + "$ref": "Corpus" + }, + "response": { + "$ref": "Corpus" + }, + "description": "Creates an empty `Corpus`." + }, + "get": { + "id": "generativelanguage.corpora.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/corpora/{corporaId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Required. The name of the `Corpus`. Example: `corpora/my-corpus-123`", + "pattern": "^corpora/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Corpus" + }, + "description": "Gets information about a specific `Corpus`." + }, + "delete": { + "id": "generativelanguage.corpora.delete", + "path": "v1beta/{+name}", + "flatPath": "v1beta/corpora/{corporaId}", + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "Required. The resource name of the `Corpus`. Example: `corpora/my-corpus-123`", + "pattern": "^corpora/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "force": { + "description": "Optional. If set to true, any `Document`s and objects related to this `Corpus` will also be deleted. If false (the default), a `FAILED_PRECONDITION` error will be returned if `Corpus` contains any `Document`s.", + "location": "query", + "type": "boolean" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "description": "Deletes a `Corpus`." + }, + "list": { + "id": "generativelanguage.corpora.list", + "path": "v1beta/corpora", + "flatPath": "v1beta/corpora", + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of `Corpora` to return (per page). The service may return fewer `Corpora`. If unspecified, at most 10 `Corpora` will be returned. The maximum size limit is 20 `Corpora` per page.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListCorpora` call. Provide the `next_page_token` returned in the response as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListCorpora` must match the call that provided the page token.", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [], + "response": { + "$ref": "ListCorporaResponse" + }, + "description": "Lists all `Corpora` owned by the user." + } + }, + "resources": { + "operations": { + "methods": { + "get": { + "id": "generativelanguage.corpora.operations.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/corpora/{corporaId}/operations/{operationsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation resource.", + "pattern": "^corpora/[^/]+/operations/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." + } + } + }, + "permissions": { + "methods": { + "create": { + "id": "generativelanguage.corpora.permissions.create", + "path": "v1beta/{+parent}/permissions", + "flatPath": "v1beta/corpora/{corporaId}/permissions", + "httpMethod": "POST", + "parameters": { + "parent": { + "description": "Required. The parent resource of the `Permission`. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`", + "pattern": "^corpora/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "parent" + ], + "request": { + "$ref": "Permission" + }, + "response": { + "$ref": "Permission" + }, + "description": "Create a permission to a specific resource." + }, + "get": { + "id": "generativelanguage.corpora.permissions.get", + "path": "v1beta/{+name}", + "flatPath": "v1beta/corpora/{corporaId}/permissions/{permissionsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`", + "pattern": "^corpora/[^/]+/permissions/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Permission" + }, + "description": "Gets information about a specific Permission." + }, + "list": { + "id": "generativelanguage.corpora.permissions.list", + "path": "v1beta/{+parent}/permissions", + "flatPath": "v1beta/corpora/{corporaId}/permissions", + "httpMethod": "GET", + "parameters": { + "parent": { + "description": "Required. The parent resource of the permissions. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`", + "pattern": "^corpora/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of `Permission`s to return (per page). The service may return fewer permissions. If unspecified, at most 10 permissions will be returned. This method returns at most 1000 permissions per page, even if you pass larger page_size.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListPermissions` call. Provide the `page_token` returned by one request as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListPermissions` must match the call that provided the page token.", + "location": "query", + "type": "string" + } + }, + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListPermissionsResponse" + }, + "description": "Lists permissions for the specific resource." + }, + "patch": { + "id": "generativelanguage.corpora.permissions.patch", + "path": "v1beta/{+name}", + "flatPath": "v1beta/corpora/{corporaId}/permissions/{permissionsId}", + "httpMethod": "PATCH", + "parameters": { + "name": { + "description": "Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only.", + "pattern": "^corpora/[^/]+/permissions/[^/]+$", + "location": "path", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to update. Accepted ones: - role (`Permission.role` field)", + "location": "query", + "type": "string", + "format": "google-fieldmask" + } + }, + "parameterOrder": [ + "name" + ], + "request": { + "$ref": "Permission" + }, + "response": { + "$ref": "Permission" + }, + "description": "Updates the permission." + }, + "delete": { + "id": "generativelanguage.corpora.permissions.delete", + "path": "v1beta/{+name}", + "flatPath": "v1beta/corpora/{corporaId}/permissions/{permissionsId}", + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`", + "pattern": "^corpora/[^/]+/permissions/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "description": "Deletes the permission." + } + } + } + } + } + }, + "canonicalName": "Generative Language", + "schemas": { + "ListOperationsResponse": { + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "unreachable": { + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Operation": { + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "response": { + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + }, + "Status": { + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer", + "format": "int32" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + } + }, + "Empty": { + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "type": "object", + "properties": {} + }, + "GenerateContentRequest": { + "id": "GenerateContentRequest", + "description": "Request to generate a completion from the model.", + "type": "object", + "properties": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "type": "string" + }, + "systemInstruction": { + "description": "Optional. Developer set [system instruction(s)](https://ai.google.dev/gemini-api/docs/system-instructions). Currently, text only.", + "$ref": "Content" + }, + "contents": { + "description": "Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://ai.google.dev/gemini-api/docs/text-generation#chat), this is a repeated field that contains the conversation history and the latest request.", + "type": "array", + "items": { + "$ref": "Content" + } + }, + "tools": { + "description": "Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://ai.google.dev/gemini-api/docs/function-calling) and the [Code execution](https://ai.google.dev/gemini-api/docs/code-execution) guides to learn more.", + "type": "array", + "items": { + "$ref": "Tool" + } + }, + "toolConfig": { + "description": "Optional. Tool configuration for any `Tool` specified in the request. Refer to the [Function calling guide](https://ai.google.dev/gemini-api/docs/function-calling#function_calling_mode) for a usage example.", + "$ref": "ToolConfig" + }, + "safetySettings": { + "description": "Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY are supported. Refer to the [guide](https://ai.google.dev/gemini-api/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications.", + "type": "array", + "items": { + "$ref": "SafetySetting" + } + }, + "generationConfig": { + "description": "Optional. Configuration options for model generation and outputs.", + "$ref": "GenerationConfig" + }, + "cachedContent": { + "description": "Optional. The name of the content [cached](https://ai.google.dev/gemini-api/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}`", + "type": "string" + }, + "serviceTier": { + "description": "Optional. The service tier of the request.", + "type": "string", + "enumDescriptions": [ + "Default service tier, which is standard.", + "Standard service tier.", + "Flex service tier.", + "Priority service tier." + ], + "enum": [ + "unspecified", + "standard", + "flex", + "priority" + ] + }, + "store": { + "description": "Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config.", + "type": "boolean" + } + } + }, + "Content": { + "id": "Content", + "description": "The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.", + "type": "object", + "properties": { + "parts": { + "description": "Ordered `Parts` that constitute a single message. Parts may have different MIME types.", + "type": "array", + "items": { + "$ref": "Part" + } + }, + "role": { + "description": "Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset.", + "type": "string" + } + } + }, + "Part": { + "id": "Part", + "description": "A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.", + "type": "object", + "properties": { + "text": { + "description": "Inline text.", + "type": "string" + }, + "inlineData": { + "description": "Inline media bytes.", + "$ref": "Blob" + }, + "functionCall": { + "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.", + "$ref": "FunctionCall" + }, + "functionResponse": { + "description": "The result output of a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model.", + "$ref": "FunctionResponse" + }, + "fileData": { + "description": "URI based data.", + "$ref": "FileData" + }, + "executableCode": { + "description": "Code generated by the model that is meant to be executed.", + "$ref": "ExecutableCode" + }, + "codeExecutionResult": { + "description": "Result of executing the `ExecutableCode`.", + "$ref": "CodeExecutionResult" + }, + "toolCall": { + "description": "Server-side tool call. This field is populated when the model predicts a tool invocation that should be executed on the server. The client is expected to echo this message back to the API.", + "$ref": "ToolCall" + }, + "toolResponse": { + "description": "The output from a server-side `ToolCall` execution. This field is populated by the client with the results of executing the corresponding `ToolCall`.", + "$ref": "ToolResponse" + }, + "videoMetadata": { + "description": "Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.", + "$ref": "VideoMetadata" + }, + "thought": { + "description": "Optional. Indicates if the part is thought from the model.", + "type": "boolean" + }, + "thoughtSignature": { + "description": "Optional. An opaque signature for the thought so it can be reused in subsequent requests.", + "type": "string", + "format": "byte" + }, + "partMetadata": { + "description": "Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + }, + "mediaResolution": { + "description": "Optional. Media resolution for the input media.", + "$ref": "MediaResolution" + } + } + }, + "Blob": { + "id": "Blob", + "description": "Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.", + "type": "object", + "properties": { + "mimeType": { + "description": "The IANA standard MIME type of the source data. Examples of supported types: - Images: image/png, image/jpeg, image/jpg, image/webp, image/heic, image/heif, image/gif, image/avif - Audio: audio/*, video/audio/s16le, video/audio/wav - Video: video/* - Text: text/plain, text/html, text/css, text/javascript, text/x-typescript, text/csv, text/markdown, text/x-python, text/xml, text/rtf, video/text/timestamp - Applications: application/x-javascript, application/x-typescript, application/x-python-code, application/json, application/x-ipynb+json, application/rtf, application/pdf For additional context, see [Supported file formats](https://ai.google.dev/gemini-api/docs/file-input-methods#supported-content-types). //", + "type": "string" + }, + "data": { + "description": "Raw bytes for media formats.", + "type": "string", + "format": "byte" + } + } + }, + "FunctionCall": { + "id": "FunctionCall", + "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.", + "type": "object", + "properties": { + "id": { + "description": "Optional. Unique identifier of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.", + "type": "string" + }, + "name": { + "description": "Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128.", + "type": "string" + }, + "args": { + "description": "Optional. The function parameters and values in JSON object format.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "FunctionResponse": { + "id": "FunctionResponse", + "description": "The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction.", + "type": "object", + "properties": { + "id": { + "description": "Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`.", + "type": "string" + }, + "name": { + "description": "Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128.", + "type": "string" + }, + "response": { + "description": "Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. \"output\", \"result\", etc. In particular, if the function call failed to execute, the response can have an \"error\" key to return error details to the model. Multimedia can be included by using a subobject containing a single \"$ref\" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://ai.google.dev/gemini-api/docs/function-calling#multimodal.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + }, + "parts": { + "description": "Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.", + "type": "array", + "items": { + "$ref": "FunctionResponsePart" + } + }, + "willContinue": { + "description": "Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`.", + "type": "boolean" + }, + "scheduling": { + "description": "Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.", + "type": "string", + "enumDescriptions": [ + "This value is unused.", + "Only add the result to the conversation context, do not interrupt or trigger generation.", + "Add the result to the conversation context, and prompt to generate output without interrupting ongoing generation.", + "Add the result to the conversation context, interrupt ongoing generation and prompt to generate output." + ], + "enum": [ + "SCHEDULING_UNSPECIFIED", + "SILENT", + "WHEN_IDLE", + "INTERRUPT" + ] + } + } + }, + "FunctionResponsePart": { + "id": "FunctionResponsePart", + "description": "A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.", + "type": "object", + "properties": { + "inlineData": { + "description": "Inline media bytes.", + "$ref": "FunctionResponseBlob" + } + } + }, + "FunctionResponseBlob": { + "id": "FunctionResponseBlob", + "description": "Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.", + "type": "object", + "properties": { + "mimeType": { + "description": "The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats).", + "type": "string" + }, + "data": { + "description": "Raw bytes for media formats.", + "type": "string", + "format": "byte" + } + } + }, + "FileData": { + "id": "FileData", + "description": "URI based data.", + "type": "object", + "properties": { + "mimeType": { + "description": "Optional. The IANA standard MIME type of the source data.", + "type": "string" + }, + "fileUri": { + "description": "Required. URI.", + "type": "string" + } + } + }, + "ExecutableCode": { + "id": "ExecutableCode", + "description": "Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated.", + "type": "object", + "properties": { + "id": { + "description": "Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`.", + "type": "string" + }, + "language": { + "description": "Required. Programming language of the `code`.", + "type": "string", + "enumDescriptions": [ + "Unspecified language. This value should not be used.", + "Python >= 3.10, with numpy and simpy available. Python is the default language." + ], + "enum": [ + "LANGUAGE_UNSPECIFIED", + "PYTHON" + ] + }, + "code": { + "description": "Required. The code to be executed.", + "type": "string" + } + } + }, + "CodeExecutionResult": { + "id": "CodeExecutionResult", + "description": "Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used.", + "type": "object", + "properties": { + "id": { + "description": "Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id.", + "type": "string" + }, + "outcome": { + "description": "Required. Outcome of the code execution.", + "type": "string", + "enumDescriptions": [ + "Unspecified status. This value should not be used.", + "Code execution completed successfully. `output` contains the stdout, if any.", + "Code execution failed. `output` contains the stderr and stdout, if any.", + "Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present." + ], + "enum": [ + "OUTCOME_UNSPECIFIED", + "OUTCOME_OK", + "OUTCOME_FAILED", + "OUTCOME_DEADLINE_EXCEEDED" + ] + }, + "output": { + "description": "Optional. Contains stdout when code execution is successful, stderr or other description otherwise.", + "type": "string" + } + } + }, + "ToolCall": { + "id": "ToolCall", + "description": "A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`.", + "type": "object", + "properties": { + "id": { + "description": "Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`.", + "type": "string" + }, + "toolType": { + "description": "Required. The type of tool that was called.", + "type": "string", + "enumDescriptions": [ + "Unspecified tool type.", + "Google search tool, maps to Tool.google_search.search_types.web_search.", + "Image search tool, maps to Tool.google_search.search_types.image_search.", + "URL context tool, maps to Tool.url_context.", + "Google maps tool, maps to Tool.google_maps.", + "File search tool, maps to Tool.file_search." + ], + "enum": [ + "TOOL_TYPE_UNSPECIFIED", + "GOOGLE_SEARCH_WEB", + "GOOGLE_SEARCH_IMAGE", + "URL_CONTEXT", + "GOOGLE_MAPS", + "FILE_SEARCH" + ] + }, + "args": { + "description": "Optional. The tool call arguments. Example: {\"arg1\" : \"value1\", \"arg2\" : \"value2\" , ...}", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "ToolResponse": { + "id": "ToolResponse", + "description": "The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`.", + "type": "object", + "properties": { + "id": { + "description": "Optional. The identifier of the tool call this response is for.", + "type": "string" + }, + "toolType": { + "description": "Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`.", + "type": "string", + "enumDescriptions": [ + "Unspecified tool type.", + "Google search tool, maps to Tool.google_search.search_types.web_search.", + "Image search tool, maps to Tool.google_search.search_types.image_search.", + "URL context tool, maps to Tool.url_context.", + "Google maps tool, maps to Tool.google_maps.", + "File search tool, maps to Tool.file_search." + ], + "enum": [ + "TOOL_TYPE_UNSPECIFIED", + "GOOGLE_SEARCH_WEB", + "GOOGLE_SEARCH_IMAGE", + "URL_CONTEXT", + "GOOGLE_MAPS", + "FILE_SEARCH" + ] + }, + "response": { + "description": "Optional. The tool response.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "VideoMetadata": { + "id": "VideoMetadata", + "deprecated": true, + "description": "Deprecated: Use `GenerateContentRequest.processing_options` instead. Metadata describes the input video content.", + "type": "object", + "properties": { + "startOffset": { + "description": "Optional. The start offset of the video.", + "type": "string", + "format": "google-duration" + }, + "endOffset": { + "description": "Optional. The end offset of the video.", + "type": "string", + "format": "google-duration" + }, + "fps": { + "description": "Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0].", + "type": "number", + "format": "double" + } + } + }, + "Tool": { + "id": "Tool", + "description": "Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. Next ID: 16", + "type": "object", + "properties": { + "functionDeclarations": { + "description": "Optional. A list of `FunctionDeclarations` available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for execution. The model may decide to call a subset of these functions by populating FunctionCall in the response. The next conversation turn may contain a FunctionResponse with the Content.role \"function\" generation context for the next model turn.", + "type": "array", + "items": { + "$ref": "FunctionDeclaration" + } + }, + "googleSearchRetrieval": { + "description": "Optional. Retrieval tool that is powered by Google search.", + "$ref": "GoogleSearchRetrieval" + }, + "codeExecution": { + "description": "Optional. Enables the model to execute code as part of generation.", + "$ref": "CodeExecution" + }, + "googleSearch": { + "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.", + "$ref": "GoogleSearch" + }, + "computerUse": { + "description": "Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.", + "$ref": "ComputerUse" + }, + "urlContext": { + "description": "Optional. Tool to support URL context retrieval.", + "$ref": "UrlContext" + }, + "fileSearch": { + "description": "Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora.", + "$ref": "FileSearch" + }, + "mcpServers": { + "description": "Optional. MCP Servers to connect to.", + "type": "array", + "items": { + "$ref": "McpServer" + } + }, + "googleMaps": { + "description": "Optional. Tool that allows grounding the model's response with geospatial context related to the user's query.", + "$ref": "GoogleMaps" + } + } + }, + "FunctionDeclaration": { + "id": "FunctionDeclaration", + "description": "Structured representation of a function declaration as defined by the [OpenAPI 3.03 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.", + "type": "object", + "properties": { + "name": { + "description": "Required. The name of the function. Must be a-z, A-Z, 0-9, or contain underscores, colons, dots, and dashes, with a maximum length of 128.", + "type": "string" + }, + "description": { + "description": "Required. A brief description of the function.", + "type": "string" + }, + "parameters": { + "description": "Optional. Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.", + "$ref": "Schema" + }, + "parametersJsonSchema": { + "description": "Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { \"type\": \"object\", \"properties\": { \"name\": { \"type\": \"string\" }, \"age\": { \"type\": \"integer\" } }, \"additionalProperties\": false, \"required\": [\"name\", \"age\"], \"propertyOrdering\": [\"name\", \"age\"] } ``` This field is mutually exclusive with `parameters`.", + "type": "any" + }, + "response": { + "description": "Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.", + "$ref": "Schema" + }, + "responseJsonSchema": { + "description": "Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.", + "type": "any" + }, + "behavior": { + "description": "Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method.", + "type": "string", + "enumDescriptions": [ + "This value is unused.", + "If set, the system will wait to receive the function response before continuing the conversation.", + "If set, the system will not wait to receive the function response. Instead, it will attempt to handle function responses as they become available while maintaining the conversation between the user and the model." + ], + "enum": [ + "UNSPECIFIED", + "BLOCKING", + "NON_BLOCKING" + ] + } + } + }, + "Schema": { + "id": "Schema", + "description": "The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema).", + "type": "object", + "properties": { + "type": { + "description": "Required. Data type.", + "type": "string", + "enumDescriptions": [ + "Not specified, should not be used.", + "String type.", + "Number type.", + "Integer type.", + "Boolean type.", + "Array type.", + "Object type.", + "Null type." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "STRING", + "NUMBER", + "INTEGER", + "BOOLEAN", + "ARRAY", + "OBJECT", + "NULL" + ] + }, + "format": { + "description": "Optional. The format of the data. Any value is allowed, but most do not trigger any special functionality.", + "type": "string" + }, + "title": { + "description": "Optional. The title of the schema.", + "type": "string" + }, + "description": { + "description": "Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown.", + "type": "string" + }, + "nullable": { + "description": "Optional. Indicates if the value may be null.", + "type": "boolean" + }, + "enum": { + "description": "Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]}", + "type": "array", + "items": { + "type": "string" + } + }, + "items": { + "description": "Optional. Schema of the elements of Type.ARRAY.", + "$ref": "Schema" + }, + "maxItems": { + "description": "Optional. Maximum number of the elements for Type.ARRAY.", + "type": "string", + "format": "int64" + }, + "minItems": { + "description": "Optional. Minimum number of the elements for Type.ARRAY.", + "type": "string", + "format": "int64" + }, + "properties": { + "description": "Optional. Properties of Type.OBJECT.", + "type": "object", + "additionalProperties": { + "$ref": "Schema" + } + }, + "required": { + "description": "Optional. Required properties of Type.OBJECT.", + "type": "array", + "items": { + "type": "string" + } + }, + "minProperties": { + "description": "Optional. Minimum number of the properties for Type.OBJECT.", + "type": "string", + "format": "int64" + }, + "maxProperties": { + "description": "Optional. Maximum number of the properties for Type.OBJECT.", + "type": "string", + "format": "int64" + }, + "minimum": { + "description": "Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER", + "type": "number", + "format": "double" + }, + "maximum": { + "description": "Optional. Maximum value of the Type.INTEGER and Type.NUMBER", + "type": "number", + "format": "double" + }, + "minLength": { + "description": "Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING", + "type": "string", + "format": "int64" + }, + "maxLength": { + "description": "Optional. Maximum length of the Type.STRING", + "type": "string", + "format": "int64" + }, + "pattern": { + "description": "Optional. Pattern of the Type.STRING to restrict a string to a regular expression.", + "type": "string" + }, + "example": { + "description": "Optional. Example of the object. Will only populated when the object is the root.", + "type": "any" + }, + "anyOf": { + "description": "Optional. The value should be validated against any (one or more) of the subschemas in the list.", + "type": "array", + "items": { + "$ref": "Schema" + } + }, + "propertyOrdering": { + "description": "Optional. The order of the properties. Not a standard field in open api spec. Used to determine the order of the properties in the response.", + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "description": "Optional. Default value of the field. Per JSON Schema, this field is intended for documentation generators and doesn't affect validation. Thus it's included here and ignored so that developers who send schemas with a `default` field don't get unknown-field errors.", + "type": "any" + } + } + }, + "GoogleSearchRetrieval": { + "id": "GoogleSearchRetrieval", + "description": "Tool to retrieve public web data for grounding, powered by Google.", + "type": "object", + "properties": { + "dynamicRetrievalConfig": { + "description": "Specifies the dynamic retrieval configuration for the given source.", + "$ref": "DynamicRetrievalConfig" + } + } + }, + "DynamicRetrievalConfig": { + "id": "DynamicRetrievalConfig", + "description": "Describes the options to customize dynamic retrieval.", + "type": "object", + "properties": { + "mode": { + "description": "The mode of the predictor to be used in dynamic retrieval.", + "type": "string", + "enumDescriptions": [ + "Always trigger retrieval.", + "Run retrieval only when system decides it is necessary." + ], + "enum": [ + "MODE_UNSPECIFIED", + "MODE_DYNAMIC" + ] + }, + "dynamicThreshold": { + "description": "The threshold to be used in dynamic retrieval. If not set, a system default value is used.", + "type": "number", + "format": "float" + } + } + }, + "CodeExecution": { + "id": "CodeExecution", + "description": "Tool that executes code generated by the model, and automatically returns the result to the model. See also `ExecutableCode` and `CodeExecutionResult` which are only generated when using this tool.", + "type": "object", + "properties": {} + }, + "GoogleSearch": { + "id": "GoogleSearch", + "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.", + "type": "object", + "properties": { + "timeRangeFilter": { + "description": "Optional. Filter search results to a specific time range. If customers set a start time, they must set an end time (and vice versa).", + "$ref": "Interval" + }, + "searchTypes": { + "description": "Optional. The set of search types to enable. If not set, web search is enabled by default.", + "$ref": "SearchTypes" + } + } + }, + "Interval": { + "id": "Interval", + "description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", + "type": "object", + "properties": { + "startTime": { + "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.", + "type": "string", + "format": "google-datetime" + }, + "endTime": { + "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.", + "type": "string", + "format": "google-datetime" + } + } + }, + "SearchTypes": { + "id": "SearchTypes", + "description": "Different types of search that can be enabled on the GoogleSearch tool.", + "type": "object", + "properties": { + "webSearch": { + "description": "Optional. Enables web search. Only text results are returned.", + "$ref": "WebSearch" + }, + "imageSearch": { + "description": "Optional. Enables image search. Image bytes are returned.", + "$ref": "ImageSearch" + } + } + }, + "WebSearch": { + "id": "WebSearch", + "description": "Standard web search for grounding and related configurations.", + "type": "object", + "properties": {} + }, + "ImageSearch": { + "id": "ImageSearch", + "description": "Image search for grounding and related configurations.", + "type": "object", + "properties": {} + }, + "ComputerUse": { + "id": "ComputerUse", + "description": "Computer Use tool type.", + "type": "object", + "properties": { + "environment": { + "description": "Required. The environment being operated.", + "type": "string", + "enumDescriptions": [ + "Defaults to browser.", + "Operates in a web browser." + ], + "enum": [ + "ENVIRONMENT_UNSPECIFIED", + "ENVIRONMENT_BROWSER" + ] + }, + "excludedPredefinedFunctions": { + "description": "Optional. By default, predefined functions are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "UrlContext": { + "id": "UrlContext", + "description": "Tool to support URL context retrieval.", + "type": "object", + "properties": {} + }, + "FileSearch": { + "id": "FileSearch", + "description": "The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.", + "type": "object", + "properties": { + "fileSearchStoreNames": { + "description": "Required. The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`", + "type": "array", + "items": { + "type": "string" + } + }, + "topK": { + "description": "Optional. The number of semantic retrieval chunks to retrieve.", + "type": "integer", + "format": "int32" + }, + "metadataFilter": { + "description": "Optional. Metadata filter to apply to the semantic retrieval documents and chunks.", + "type": "string" + } + } + }, + "McpServer": { + "id": "McpServer", + "description": "A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 6", + "type": "object", + "properties": { + "streamableHttpTransport": { + "description": "A transport that can stream HTTP requests and responses.", + "$ref": "StreamableHttpTransport" + }, + "name": { + "description": "The name of the MCPServer.", + "type": "string" + } + } + }, + "StreamableHttpTransport": { + "id": "StreamableHttpTransport", + "description": "A transport that can stream HTTP requests and responses. Next ID: 6", + "type": "object", + "properties": { + "url": { + "description": "The full URL for the MCPServer endpoint. Example: \"https://api.example.com/mcp\"", + "type": "string" + }, + "headers": { + "description": "Optional: Fields for authentication headers, timeouts, etc., if needed.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "timeout": { + "description": "HTTP timeout for regular operations.", + "type": "string", + "format": "google-duration" + }, + "sseReadTimeout": { + "description": "Timeout for SSE read operations.", + "type": "string", + "format": "google-duration" + }, + "terminateOnClose": { + "description": "Whether to close the client session when the transport closes.", + "type": "boolean" + } + } + }, + "GoogleMaps": { + "id": "GoogleMaps", + "description": "The GoogleMaps Tool that provides geospatial context for the user's query.", + "type": "object", + "properties": { + "enableWidget": { + "description": "Optional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response.", + "type": "boolean" + } + } + }, + "ToolConfig": { + "id": "ToolConfig", + "description": "The Tool configuration containing parameters for specifying `Tool` use in the request.", + "type": "object", + "properties": { + "functionCallingConfig": { + "description": "Optional. Function calling config.", + "$ref": "FunctionCallingConfig" + }, + "retrievalConfig": { + "description": "Optional. Retrieval config.", + "$ref": "RetrievalConfig" + }, + "includeServerSideToolInvocations": { + "description": "Optional. If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool interactions.", + "type": "boolean" + } + } + }, + "FunctionCallingConfig": { + "id": "FunctionCallingConfig", + "description": "Configuration for specifying function calling behavior.", + "type": "object", + "properties": { + "mode": { + "description": "Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO.", + "type": "string", + "enumDescriptions": [ + "Unspecified function calling mode. This value should not be used.", + "Default model behavior, model decides to predict either a function call or a natural language response.", + "Model is constrained to always predicting a function call only. If \"allowed_function_names\" are set, the predicted function call will be limited to any one of \"allowed_function_names\", else the predicted function call will be any one of the provided \"function_declarations\".", + "Model will not predict any function call. Model behavior is same as when not passing any function declarations.", + "Model decides to predict either a function call or a natural language response, but will validate function calls with constrained decoding. If \"allowed_function_names\" are set, the predicted function call will be limited to any one of \"allowed_function_names\", else the predicted function call will be any one of the provided \"function_declarations\"." + ], + "enum": [ + "MODE_UNSPECIFIED", + "AUTO", + "ANY", + "NONE", + "VALIDATED" + ] + }, + "allowedFunctionNames": { + "description": "Optional. A set of function names that, when provided, limits the functions the model will call. This should only be set when the Mode is ANY or VALIDATED. Function names should match [FunctionDeclaration.name]. When set, model will predict a function call from only allowed function names.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "RetrievalConfig": { + "id": "RetrievalConfig", + "description": "Retrieval config.", + "type": "object", + "properties": { + "latLng": { + "description": "Optional. The location of the user.", + "$ref": "LatLng" + }, + "languageCode": { + "description": "Optional. The language code of the user. Language code for content. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).", + "type": "string" + } + } + }, + "LatLng": { + "id": "LatLng", + "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", + "type": "object", + "properties": { + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "type": "number", + "format": "double" + }, + "longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "type": "number", + "format": "double" + } + } + }, + "SafetySetting": { + "id": "SafetySetting", + "description": "Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.", + "type": "object", + "properties": { + "category": { + "description": "Required. The category for this setting.", + "type": "string", + "enumDescriptions": [ + "Category is unspecified.", + "**PaLM** - Negative or harmful comments targeting identity and/or protected attribute.", + "**PaLM** - Content that is rude, disrespectful, or profane.", + "**PaLM** - Describes scenarios depicting violence against an individual or group, or general descriptions of gore.", + "**PaLM** - Contains references to sexual acts or other lewd content.", + "**PaLM** - Promotes unchecked medical advice.", + "**PaLM** - Dangerous content that promotes, facilitates, or encourages harmful acts.", + "**Gemini** - Harassment content.", + "**Gemini** - Hate speech and content.", + "**Gemini** - Sexually explicit content.", + "**Gemini** - Dangerous content.", + "**Gemini** - Content that may be used to harm civic integrity. DEPRECATED: use enable_enhanced_civic_answers instead." + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true + ], + "enum": [ + "HARM_CATEGORY_UNSPECIFIED", + "HARM_CATEGORY_DEROGATORY", + "HARM_CATEGORY_TOXICITY", + "HARM_CATEGORY_VIOLENCE", + "HARM_CATEGORY_SEXUAL", + "HARM_CATEGORY_MEDICAL", + "HARM_CATEGORY_DANGEROUS", + "HARM_CATEGORY_HARASSMENT", + "HARM_CATEGORY_HATE_SPEECH", + "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "HARM_CATEGORY_DANGEROUS_CONTENT", + "HARM_CATEGORY_CIVIC_INTEGRITY" + ] + }, + "threshold": { + "description": "Required. Controls the probability threshold at which harm is blocked.", + "type": "string", + "enumDescriptions": [ + "Threshold is unspecified.", + "Content with NEGLIGIBLE will be allowed.", + "Content with NEGLIGIBLE and LOW will be allowed.", + "Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed.", + "All content will be allowed.", + "Turn off the safety filter." + ], + "enum": [ + "HARM_BLOCK_THRESHOLD_UNSPECIFIED", + "BLOCK_LOW_AND_ABOVE", + "BLOCK_MEDIUM_AND_ABOVE", + "BLOCK_ONLY_HIGH", + "BLOCK_NONE", + "OFF" + ] + } + } + }, + "GenerationConfig": { + "id": "GenerationConfig", + "description": "Configuration options for model generation and outputs. Not all parameters are configurable for every model.", + "type": "object", + "properties": { + "candidateCount": { + "description": "Optional. Number of generated responses to return. If unset, this will default to 1. Please note that this doesn't work for previous generation models (Gemini 1.0 family)", + "type": "integer", + "format": "int32" + }, + "stopSequences": { + "description": "Optional. The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a `stop_sequence`. The stop sequence will not be included as part of the response.", + "type": "array", + "items": { + "type": "string" + } + }, + "maxOutputTokens": { + "description": "Optional. The maximum number of tokens to include in a response candidate. Note: The default value varies by model, see the `Model.output_token_limit` attribute of the `Model` returned from the `getModel` function.", + "type": "integer", + "format": "int32" + }, + "temperature": { + "description": "Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned from the `getModel` function. Values can range from [0.0, 2.0].", + "type": "number", + "format": "float" + }, + "topP": { + "description": "Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and Top-p (nucleus) sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits the number of tokens based on the cumulative probability. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests.", + "type": "number", + "format": "float" + }, + "topK": { + "description": "Optional. The maximum number of tokens to consider when sampling. Gemini models use Top-p (nucleus) sampling or a combination of Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Models running with nucleus sampling don't allow top_k setting. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests.", + "type": "integer", + "format": "int32" + }, + "seed": { + "description": "Optional. Seed used in decoding. If not set, the request uses a randomly generated seed.", + "type": "integer", + "format": "int32" + }, + "responseMimeType": { + "description": "Optional. MIME type of the generated candidate text. Supported MIME types are: `text/plain`: (default) Text output. `application/json`: JSON response in the response candidates. `text/x.enum`: ENUM as a string response in the response candidates. Refer to the [docs](https://ai.google.dev/gemini-api/docs/prompting_with_media#plain_text_formats) for a list of all supported text MIME types.", + "type": "string" + }, + "responseSchema": { + "description": "Optional. Output schema of the generated candidate text. Schemas must be a subset of the [OpenAPI schema](https://spec.openapis.org/oas/v3.0.3#schema) and can be objects, primitives or arrays. If set, a compatible `response_mime_type` must also be set. Compatible MIME types: `application/json`: Schema for JSON response. Refer to the [JSON text generation guide](https://ai.google.dev/gemini-api/docs/json-mode) for more details.", + "$ref": "Schema" + }, + "_responseJsonSchema": { + "description": "Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). If set, `response_schema` must be omitted, but `response_mime_type` is required. While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported: - `$id` - `$defs` - `$ref` - `$anchor` - `type` - `format` - `title` - `description` - `enum` (for strings and numbers) - `items` - `prefixItems` - `minItems` - `maxItems` - `minimum` - `maximum` - `anyOf` - `oneOf` (interpreted the same as `anyOf`) - `properties` - `additionalProperties` - `required` The non-standard `propertyOrdering` property may also be set. Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If `$ref` is set on a sub-schema, no other properties, except for than those starting as a `$`, may be set.", + "type": "any" + }, + "responseJsonSchema": { + "description": "Optional. An internal detail. Use `responseJsonSchema` rather than this field.", + "type": "any" + }, + "presencePenalty": { + "description": "Optional. Presence penalty applied to the next token's logprobs if the token has already been seen in the response. This penalty is binary on/off and not dependant on the number of times the token is used (after the first). Use frequency_penalty for a penalty that increases with each use. A positive penalty will discourage the use of tokens that have already been used in the response, increasing the vocabulary. A negative penalty will encourage the use of tokens that have already been used in the response, decreasing the vocabulary.", + "type": "number", + "format": "float" + }, + "frequencyPenalty": { + "description": "Optional. Frequency penalty applied to the next token's logprobs, multiplied by the number of times each token has been seen in the respponse so far. A positive penalty will discourage the use of tokens that have already been used, proportional to the number of times the token has been used: The more a token is used, the more difficult it is for the model to use that token again increasing the vocabulary of responses. Caution: A _negative_ penalty will encourage the model to reuse tokens proportional to the number of times the token has been used. Small negative values will reduce the vocabulary of a response. Larger negative values will cause the model to start repeating a common token until it hits the max_output_tokens limit.", + "type": "number", + "format": "float" + }, + "responseLogprobs": { + "description": "Optional. If true, export the logprobs results in response.", + "type": "boolean" + }, + "logprobs": { + "description": "Optional. Only valid if response_logprobs=True. This sets the number of top logprobs, including the chosen candidate, to return at each decoding step in the Candidate.logprobs_result. The number must be in the range of [0, 20].", + "type": "integer", + "format": "int32" + }, + "enableEnhancedCivicAnswers": { + "description": "Optional. Enables enhanced civic answers. It may not be available for all models.", + "type": "boolean" + }, + "responseModalities": { + "description": "Optional. The requested modalities of the response. Represents the set of modalities that the model can return, and should be expected in the response. This is an exact match to the modalities of the response. A model may have multiple combinations of supported modalities. If the requested modalities do not match any of the supported combinations, an error will be returned. An empty list is equivalent to requesting only text.", + "type": "array", + "items": { + "type": "string", + "enumDescriptions": [ + "Default value.", + "Indicates the model should return text.", + "Indicates the model should return images.", + "Indicates the model should return audio." + ], + "enum": [ + "MODALITY_UNSPECIFIED", + "TEXT", + "IMAGE", + "AUDIO" + ] + } + }, + "speechConfig": { + "description": "Optional. The speech generation config.", + "$ref": "SpeechConfig" + }, + "thinkingConfig": { + "description": "Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.", + "$ref": "ThinkingConfig" + }, + "imageConfig": { + "description": "Optional. Config for image generation. An error will be returned if this field is set for models that don't support these config options.", + "$ref": "ImageConfig" + }, + "mediaResolution": { + "description": "Optional. If specified, the media resolution specified will be used.", + "type": "string", + "enumDescriptions": [ + "Media resolution has not been set.", + "Media resolution set to low (64 tokens).", + "Media resolution set to medium (256 tokens).", + "Media resolution set to high (zoomed reframing with 256 tokens)." + ], + "enum": [ + "MEDIA_RESOLUTION_UNSPECIFIED", + "MEDIA_RESOLUTION_LOW", + "MEDIA_RESOLUTION_MEDIUM", + "MEDIA_RESOLUTION_HIGH" + ] + }, + "responseFormat": { + "description": "Optional. Configuration for the response output format. Allows specifying output configuration per modality (text, audio, image) in a flat structure.", + "$ref": "ResponseFormatConfig" + } + } + }, + "SpeechConfig": { + "id": "SpeechConfig", + "description": "Config for speech generation and transcription.", + "type": "object", + "properties": { + "voiceConfig": { + "description": "The configuration in case of single-voice output.", + "$ref": "VoiceConfig" + }, + "multiSpeakerVoiceConfig": { + "description": "Optional. The configuration for the multi-speaker setup. It is mutually exclusive with the voice_config field.", + "$ref": "MultiSpeakerVoiceConfig" + }, + "languageCode": { + "description": "Optional. The IETF [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language code that the user configured the app to use. Used for speech recognition and synthesis. Valid values are: `de-DE`, `en-AU`, `en-GB`, `en-IN`, `en-US`, `es-US`, `fr-FR`, `hi-IN`, `pt-BR`, `ar-XA`, `es-ES`, `fr-CA`, `id-ID`, `it-IT`, `ja-JP`, `tr-TR`, `vi-VN`, `bn-IN`, `gu-IN`, `kn-IN`, `ml-IN`, `mr-IN`, `ta-IN`, `te-IN`, `nl-NL`, `ko-KR`, `cmn-CN`, `pl-PL`, `ru-RU`, and `th-TH`.", + "type": "string" + } + } + }, + "VoiceConfig": { + "id": "VoiceConfig", + "description": "The configuration for the voice to use.", + "type": "object", + "properties": { + "prebuiltVoiceConfig": { + "description": "The configuration for the prebuilt voice to use.", + "$ref": "PrebuiltVoiceConfig" + } + } + }, + "PrebuiltVoiceConfig": { + "id": "PrebuiltVoiceConfig", + "description": "The configuration for the prebuilt speaker to use.", + "type": "object", + "properties": { + "voiceName": { + "description": "The name of the preset voice to use.", + "type": "string" + } + } + }, + "MultiSpeakerVoiceConfig": { + "id": "MultiSpeakerVoiceConfig", + "description": "The configuration for the multi-speaker setup.", + "type": "object", + "properties": { + "speakerVoiceConfigs": { + "description": "Required. All the enabled speaker voices.", + "type": "array", + "items": { + "$ref": "SpeakerVoiceConfig" + } + } + } + }, + "SpeakerVoiceConfig": { + "id": "SpeakerVoiceConfig", + "description": "The configuration for a single speaker in a multi speaker setup.", + "type": "object", + "properties": { + "speaker": { + "description": "Required. The name of the speaker to use. Should be the same as in the prompt.", + "type": "string" + }, + "voiceConfig": { + "description": "Required. The configuration for the voice to use.", + "$ref": "VoiceConfig" + } + } + }, + "ThinkingConfig": { + "id": "ThinkingConfig", + "description": "Config for thinking features.", + "type": "object", + "properties": { + "includeThoughts": { + "description": "Indicates whether to include thoughts in the response. If true, thoughts are returned only when available.", + "type": "boolean" + }, + "thinkingBudget": { + "description": "The number of thoughts tokens that the model should generate.", + "type": "integer", + "format": "int32" + }, + "thinkingLevel": { + "description": "Optional. Controls the maximum depth of the model's internal reasoning process before it produces a response. The default value is model-dependent. Refer to the [Thinking levels guide](https://ai.google.dev/gemini-api/docs/thinking#thinking-levels) for more details. Recommended for Gemini 3 or later models. Use with earlier models results in an error.", + "type": "string", + "enumDescriptions": [ + "Default value.", + "Little to no thinking.", + "Low thinking level.", + "Medium thinking level.", + "High thinking level." + ], + "enum": [ + "THINKING_LEVEL_UNSPECIFIED", + "MINIMAL", + "LOW", + "MEDIUM", + "HIGH" + ] + } + } + }, + "ImageConfig": { + "id": "ImageConfig", + "description": "Config for image generation features.", + "type": "object", + "properties": { + "aspectRatio": { + "description": "Optional. The aspect ratio of the image to generate. Supported aspect ratios: `1:1`, `1:4`, `4:1`, `1:8`, `8:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, or `21:9`. If not specified, the model will choose a default aspect ratio based on any reference images provided.", + "type": "string" + }, + "imageSize": { + "description": "Optional. Specifies the size of generated images. Supported values are `512`, `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.", + "type": "string" + } + } + }, + "ResponseFormatConfig": { + "id": "ResponseFormatConfig", + "description": "Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality.", + "type": "object", + "properties": { + "text": { + "description": "Optional. Text output format configuration.", + "$ref": "TextResponseFormat" + }, + "audio": { + "description": "Optional. Audio output format configuration.", + "$ref": "AudioResponseFormat" + }, + "image": { + "description": "Optional. Image output format configuration.", + "$ref": "ImageResponseFormat" + } + } + }, + "TextResponseFormat": { + "id": "TextResponseFormat", + "description": "Configuration for text output format.", + "type": "object", + "properties": { + "mimeType": { + "description": "Optional. The MIME type of the text output.", + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "JSON output format.", + "Plain text output format." + ], + "enum": [ + "MIME_TYPE_UNSPECIFIED", + "APPLICATION_JSON", + "TEXT_PLAIN" + ] + }, + "schema": { + "description": "Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.", + "type": "any" + } + } + }, + "AudioResponseFormat": { + "id": "AudioResponseFormat", + "description": "Configuration for audio output format.", + "type": "object", + "properties": { + "mimeType": { + "description": "Optional. The MIME type of the audio output.", + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "MP3 audio format.", + "OGG Opus audio format.", + "Raw PCM (L16) audio format.", + "WAV audio format.", + "A-law audio format.", + "Mu-law audio format." + ], + "enum": [ + "MIME_TYPE_UNSPECIFIED", + "AUDIO_MP3", + "AUDIO_OGG_OPUS", + "AUDIO_L16", + "AUDIO_WAV", + "AUDIO_ALAW", + "AUDIO_MULAW" + ] + }, + "delivery": { + "description": "Optional. The delivery mode for the audio output.", + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "Audio data is returned inline in the response.", + "Audio data is returned as a URI." + ], + "enum": [ + "DELIVERY_UNSPECIFIED", + "INLINE", + "URI" + ] + }, + "sampleRate": { + "description": "Optional. Sample rate in Hz.", + "type": "integer", + "format": "int32" + }, + "bitRate": { + "description": "Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).", + "type": "integer", + "format": "int32" + } + } + }, + "ImageResponseFormat": { + "id": "ImageResponseFormat", + "description": "Configuration for image output format.", + "type": "object", + "properties": { + "mimeType": { + "description": "Optional. The MIME type of the image output.", + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "JPEG image format." + ], + "enum": [ + "MIME_TYPE_UNSPECIFIED", + "IMAGE_JPEG" + ] + }, + "delivery": { + "description": "Optional. The delivery mode for the image output.", + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "Image data is returned inline in the response.", + "Image data is returned as a URI." + ], + "enum": [ + "DELIVERY_UNSPECIFIED", + "INLINE", + "URI" + ] + }, + "aspectRatio": { + "description": "Optional. The aspect ratio for the image output.", + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "1:1 aspect ratio.", + "2:3 aspect ratio.", + "3:2 aspect ratio.", + "3:4 aspect ratio.", + "4:3 aspect ratio.", + "4:5 aspect ratio.", + "5:4 aspect ratio.", + "9:16 aspect ratio.", + "16:9 aspect ratio.", + "21:9 aspect ratio.", + "1:8 aspect ratio.", + "8:1 aspect ratio.", + "1:4 aspect ratio.", + "4:1 aspect ratio." + ], + "enum": [ + "ASPECT_RATIO_UNSPECIFIED", + "ASPECT_RATIO_ONE_BY_ONE", + "ASPECT_RATIO_TWO_BY_THREE", + "ASPECT_RATIO_THREE_BY_TWO", + "ASPECT_RATIO_THREE_BY_FOUR", + "ASPECT_RATIO_FOUR_BY_THREE", + "ASPECT_RATIO_FOUR_BY_FIVE", + "ASPECT_RATIO_FIVE_BY_FOUR", + "ASPECT_RATIO_NINE_BY_SIXTEEN", + "ASPECT_RATIO_SIXTEEN_BY_NINE", + "ASPECT_RATIO_TWENTY_ONE_BY_NINE", + "ASPECT_RATIO_ONE_BY_EIGHT", + "ASPECT_RATIO_EIGHT_BY_ONE", + "ASPECT_RATIO_ONE_BY_FOUR", + "ASPECT_RATIO_FOUR_BY_ONE" + ] + }, + "imageSize": { + "description": "Optional. The size of the image output.", + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "512px image size.", + "1K image size.", + "2K image size.", + "4K image size." + ], + "enum": [ + "IMAGE_SIZE_UNSPECIFIED", + "IMAGE_SIZE_FIVE_TWELVE", + "IMAGE_SIZE_ONE_K", + "IMAGE_SIZE_TWO_K", + "IMAGE_SIZE_FOUR_K" + ] + } + } + }, + "GenerateContentResponse": { + "id": "GenerateContentResponse", + "description": "Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`.", + "type": "object", + "properties": { + "candidates": { + "description": "Candidate responses from the model.", + "type": "array", + "items": { + "$ref": "Candidate" + } + }, + "promptFeedback": { + "description": "Returns the prompt's feedback related to the content filters.", + "$ref": "PromptFeedback" + }, + "usageMetadata": { + "description": "Output only. Metadata on the generation requests' token usage.", + "readOnly": true, + "$ref": "UsageMetadata" + }, + "modelVersion": { + "description": "Output only. The model version used to generate the response.", + "readOnly": true, + "type": "string" + }, + "responseId": { + "description": "Output only. response_id is used to identify each response.", + "readOnly": true, + "type": "string" + }, + "modelStatus": { + "description": "Output only. The current model status of this model.", + "readOnly": true, + "$ref": "ModelStatus" + } + } + }, + "Candidate": { + "id": "Candidate", + "description": "A response candidate generated from the model.", + "type": "object", + "properties": { + "index": { + "description": "Output only. Index of the candidate in the list of response candidates.", + "readOnly": true, + "type": "integer", + "format": "int32" + }, + "content": { + "description": "Output only. Generated content returned from the model.", + "readOnly": true, + "$ref": "Content" + }, + "finishReason": { + "description": "Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens.", + "readOnly": true, + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "Natural stop point of the model or provided stop sequence.", + "The maximum number of tokens as specified in the request was reached.", + "The response candidate content was flagged for safety reasons.", + "The response candidate content was flagged for recitation reasons.", + "The response candidate content was flagged for using an unsupported language.", + "Unknown reason.", + "Token generation stopped because the content contains forbidden terms.", + "Token generation stopped for potentially containing prohibited content.", + "Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).", + "The function call generated by the model is invalid.", + "Token generation stopped because generated images contain safety violations.", + "Image generation stopped because generated images has other prohibited content.", + "Image generation stopped because of other miscellaneous issue.", + "The model was expected to generate an image, but none was generated.", + "Image generation stopped due to recitation.", + "Model generated a tool call but no tools were enabled in the request.", + "Model called too many tools consecutively, thus the system exited execution.", + "Request has at least one thought signature missing.", + "Finished due to malformed response." + ], + "enum": [ + "FINISH_REASON_UNSPECIFIED", + "STOP", + "MAX_TOKENS", + "SAFETY", + "RECITATION", + "LANGUAGE", + "OTHER", + "BLOCKLIST", + "PROHIBITED_CONTENT", + "SPII", + "MALFORMED_FUNCTION_CALL", + "IMAGE_SAFETY", + "IMAGE_PROHIBITED_CONTENT", + "IMAGE_OTHER", + "NO_IMAGE", + "IMAGE_RECITATION", + "UNEXPECTED_TOOL_CALL", + "TOO_MANY_TOOL_CALLS", + "MISSING_THOUGHT_SIGNATURE", + "MALFORMED_RESPONSE" + ] + }, + "finishMessage": { + "description": "Optional. Output only. Details the reason why the model stopped generating tokens. This is populated only when `finish_reason` is set.", + "readOnly": true, + "type": "string" + }, + "safetyRatings": { + "description": "List of ratings for the safety of a response candidate. There is at most one rating per category.", + "type": "array", + "items": { + "$ref": "SafetyRating" + } + }, + "citationMetadata": { + "description": "Output only. Citation information for model-generated candidate. This field may be populated with recitation information for any text included in the `content`. These are passages that are \"recited\" from copyrighted material in the foundational LLM's training data.", + "readOnly": true, + "$ref": "CitationMetadata" + }, + "tokenCount": { + "description": "Output only. Token count for this candidate.", + "readOnly": true, + "type": "integer", + "format": "int32" + }, + "groundingAttributions": { + "description": "Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for `GenerateAnswer` calls.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "GroundingAttribution" + } + }, + "groundingMetadata": { + "description": "Output only. Grounding metadata for the candidate. This field is populated for `GenerateContent` calls.", + "readOnly": true, + "$ref": "GroundingMetadata" + }, + "avgLogprobs": { + "description": "Output only. Average log probability score of the candidate.", + "readOnly": true, + "type": "number", + "format": "double" + }, + "logprobsResult": { + "description": "Output only. Log-likelihood scores for the response tokens and top tokens", + "readOnly": true, + "$ref": "LogprobsResult" + }, + "urlContextMetadata": { + "description": "Output only. Metadata related to url context retrieval tool.", + "readOnly": true, + "$ref": "UrlContextMetadata" + } + } + }, + "SafetyRating": { + "id": "SafetyRating", + "description": "Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.", + "type": "object", + "properties": { + "category": { + "description": "Required. The category for this rating.", + "type": "string", + "enumDescriptions": [ + "Category is unspecified.", + "**PaLM** - Negative or harmful comments targeting identity and/or protected attribute.", + "**PaLM** - Content that is rude, disrespectful, or profane.", + "**PaLM** - Describes scenarios depicting violence against an individual or group, or general descriptions of gore.", + "**PaLM** - Contains references to sexual acts or other lewd content.", + "**PaLM** - Promotes unchecked medical advice.", + "**PaLM** - Dangerous content that promotes, facilitates, or encourages harmful acts.", + "**Gemini** - Harassment content.", + "**Gemini** - Hate speech and content.", + "**Gemini** - Sexually explicit content.", + "**Gemini** - Dangerous content.", + "**Gemini** - Content that may be used to harm civic integrity. DEPRECATED: use enable_enhanced_civic_answers instead." + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true + ], + "enum": [ + "HARM_CATEGORY_UNSPECIFIED", + "HARM_CATEGORY_DEROGATORY", + "HARM_CATEGORY_TOXICITY", + "HARM_CATEGORY_VIOLENCE", + "HARM_CATEGORY_SEXUAL", + "HARM_CATEGORY_MEDICAL", + "HARM_CATEGORY_DANGEROUS", + "HARM_CATEGORY_HARASSMENT", + "HARM_CATEGORY_HATE_SPEECH", + "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "HARM_CATEGORY_DANGEROUS_CONTENT", + "HARM_CATEGORY_CIVIC_INTEGRITY" + ] + }, + "probability": { + "description": "Required. The probability of harm for this content.", + "type": "string", + "enumDescriptions": [ + "Probability is unspecified.", + "Content has a negligible chance of being unsafe.", + "Content has a low chance of being unsafe.", + "Content has a medium chance of being unsafe.", + "Content has a high chance of being unsafe." + ], + "enum": [ + "HARM_PROBABILITY_UNSPECIFIED", + "NEGLIGIBLE", + "LOW", + "MEDIUM", + "HIGH" + ] + }, + "blocked": { + "description": "Was this content blocked because of this rating?", + "type": "boolean" + } + } + }, + "CitationMetadata": { + "id": "CitationMetadata", + "description": "A collection of source attributions for a piece of content.", + "type": "object", + "properties": { + "citationSources": { + "description": "Citations to sources for a specific response.", + "type": "array", + "items": { + "$ref": "CitationSource" + } + } + } + }, + "CitationSource": { + "id": "CitationSource", + "description": "A citation to a source for a portion of a specific response.", + "type": "object", + "properties": { + "startIndex": { + "description": "Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.", + "type": "integer", + "format": "int32" + }, + "endIndex": { + "description": "Optional. End of the attributed segment, exclusive.", + "type": "integer", + "format": "int32" + }, + "uri": { + "description": "Optional. URI that is attributed as a source for a portion of the text.", + "type": "string" + }, + "license": { + "description": "Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations.", + "type": "string" + } + } + }, + "GroundingAttribution": { + "id": "GroundingAttribution", + "description": "Attribution for a source that contributed to an answer.", + "type": "object", + "properties": { + "sourceId": { + "description": "Output only. Identifier for the source contributing to this attribution.", + "readOnly": true, + "$ref": "AttributionSourceId" + }, + "content": { + "description": "Grounding source content that makes up this attribution.", + "$ref": "Content" + } + } + }, + "AttributionSourceId": { + "id": "AttributionSourceId", + "description": "Identifier for the source contributing to this attribution.", + "type": "object", + "properties": { + "groundingPassage": { + "description": "Identifier for an inline passage.", + "$ref": "GroundingPassageId" + }, + "semanticRetrieverChunk": { + "description": "Identifier for a `Chunk` fetched via Semantic Retriever.", + "$ref": "SemanticRetrieverChunk" + } + } + }, + "GroundingPassageId": { + "id": "GroundingPassageId", + "description": "Identifier for a part within a `GroundingPassage`.", + "type": "object", + "properties": { + "passageId": { + "description": "Output only. ID of the passage matching the `GenerateAnswerRequest`'s `GroundingPassage.id`.", + "readOnly": true, + "type": "string" + }, + "partIndex": { + "description": "Output only. Index of the part within the `GenerateAnswerRequest`'s `GroundingPassage.content`.", + "readOnly": true, + "type": "integer", + "format": "int32" + } + } + }, + "SemanticRetrieverChunk": { + "id": "SemanticRetrieverChunk", + "description": "Identifier for a `Chunk` retrieved via Semantic Retriever specified in the `GenerateAnswerRequest` using `SemanticRetrieverConfig`.", + "type": "object", + "properties": { + "source": { + "description": "Output only. Name of the source matching the request's `SemanticRetrieverConfig.source`. Example: `corpora/123` or `corpora/123/documents/abc`", + "readOnly": true, + "type": "string" + }, + "chunk": { + "description": "Output only. Name of the `Chunk` containing the attributed text. Example: `corpora/123/documents/abc/chunks/xyz`", + "readOnly": true, + "type": "string" + } + } + }, + "GroundingMetadata": { + "id": "GroundingMetadata", + "description": "Metadata returned to client when grounding is enabled.", + "type": "object", + "properties": { + "searchEntryPoint": { + "description": "Optional. Google search entry for the following-up web searches.", + "$ref": "SearchEntryPoint" + }, + "groundingChunks": { + "description": "List of supporting references retrieved from specified grounding source. When streaming, this only contains the grounding chunks that have not been included in the grounding metadata of previous responses.", + "type": "array", + "items": { + "$ref": "GroundingChunk" + } + }, + "groundingSupports": { + "description": "List of grounding support.", + "type": "array", + "items": { + "$ref": "GoogleAiGenerativelanguageV1betaGroundingSupport" + } + }, + "retrievalMetadata": { + "description": "Metadata related to retrieval in the grounding flow.", + "$ref": "RetrievalMetadata" + }, + "webSearchQueries": { + "description": "Web search queries for the following-up web search.", + "type": "array", + "items": { + "type": "string" + } + }, + "imageSearchQueries": { + "description": "Image search queries used for grounding.", + "type": "array", + "items": { + "type": "string" + } + }, + "googleMapsWidgetContextToken": { + "description": "Optional. Resource name of the Google Maps widget context token that can be used with the PlacesContextElement widget in order to render contextual data. Only populated in the case that grounding with Google Maps is enabled.", + "type": "string" + } + } + }, + "SearchEntryPoint": { + "id": "SearchEntryPoint", + "description": "Google search entry point.", + "type": "object", + "properties": { + "renderedContent": { + "description": "Optional. Web content snippet that can be embedded in a web page or an app webview.", + "type": "string" + }, + "sdkBlob": { + "description": "Optional. Base64 encoded JSON representing array of tuple.", + "type": "string", + "format": "byte" + } + } + }, + "GroundingChunk": { + "id": "GroundingChunk", + "description": "A `GroundingChunk` represents a segment of supporting evidence that grounds the model's response. It can be a chunk from the web, a retrieved context from a file, or information from Google Maps.", + "type": "object", + "properties": { + "web": { + "description": "Grounding chunk from the web.", + "$ref": "Web" + }, + "image": { + "description": "Optional. Grounding chunk from image search.", + "$ref": "Image" + }, + "retrievedContext": { + "description": "Optional. Grounding chunk from context retrieved by the file search tool.", + "$ref": "RetrievedContext" + }, + "maps": { + "description": "Optional. Grounding chunk from Google Maps.", + "$ref": "Maps" + } + } + }, + "Web": { + "id": "Web", + "description": "Chunk from the web.", + "type": "object", + "properties": { + "uri": { + "description": "Output only. URI reference of the chunk.", + "readOnly": true, + "type": "string" + }, + "title": { + "description": "Output only. Title of the chunk.", + "readOnly": true, + "type": "string" + } + } + }, + "Image": { + "id": "Image", + "description": "Chunk from image search.", + "type": "object", + "properties": { + "sourceUri": { + "description": "The web page URI for attribution.", + "type": "string" + }, + "imageUri": { + "description": "The image asset URL.", + "type": "string" + }, + "title": { + "description": "The title of the web page that the image is from.", + "type": "string" + }, + "domain": { + "description": "The root domain of the web page that the image is from, e.g. \"example.com\".", + "type": "string" + } + } + }, + "RetrievedContext": { + "id": "RetrievedContext", + "description": "Chunk from context retrieved by the file search tool.", + "type": "object", + "properties": { + "uri": { + "description": "Optional. URI reference of the semantic retrieval document.", + "type": "string" + }, + "title": { + "description": "Optional. Title of the document.", + "type": "string" + }, + "text": { + "description": "Optional. Text of the chunk.", + "type": "string" + }, + "fileSearchStore": { + "description": "Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`", + "type": "string" + }, + "customMetadata": { + "description": "Optional. User-provided metadata about the retrieved context.", + "type": "array", + "items": { + "$ref": "GroundingChunkCustomMetadata" + } + }, + "pageNumber": { + "description": "Optional. Page number of the retrieved context, if applicable.", + "type": "integer", + "format": "int32" + }, + "mediaId": { + "description": "Optional. The media blob resource name for multimodal file search results. Format: fileSearchStores/{file_search_store_id}/media/{blob_id}", + "type": "string" + } + } + }, + "GroundingChunkCustomMetadata": { + "id": "GroundingChunkCustomMetadata", + "description": "User provided metadata about the GroundingFact.", + "type": "object", + "properties": { + "stringValue": { + "description": "Optional. The string value of the metadata.", + "type": "string" + }, + "stringListValue": { + "description": "Optional. A list of string values for the metadata.", + "$ref": "GroundingChunkStringList" + }, + "numericValue": { + "description": "Optional. The numeric value of the metadata. The expected range for this value depends on the specific `key` used.", + "type": "number", + "format": "float" + }, + "key": { + "description": "The key of the metadata.", + "type": "string" + } + } + }, + "GroundingChunkStringList": { + "id": "GroundingChunkStringList", + "description": "A list of string values.", + "type": "object", + "properties": { + "values": { + "description": "The string values of the list.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Maps": { + "id": "Maps", + "description": "A grounding chunk from Google Maps. A Maps chunk corresponds to a single place.", + "type": "object", + "properties": { + "uri": { + "description": "URI reference of the place.", + "type": "string" + }, + "title": { + "description": "Title of the place.", + "type": "string" + }, + "text": { + "description": "Text description of the place answer.", + "type": "string" + }, + "placeId": { + "description": "The ID of the place, in `places/{place_id}` format. A user can use this ID to look up that place.", + "type": "string" + }, + "placeAnswerSources": { + "description": "Sources that provide answers about the features of a given place in Google Maps.", + "$ref": "PlaceAnswerSources" + } + } + }, + "PlaceAnswerSources": { + "id": "PlaceAnswerSources", + "description": "Collection of sources that provide answers about the features of a given place in Google Maps. Each PlaceAnswerSources message corresponds to a specific place in Google Maps. The Google Maps tool used these sources in order to answer questions about features of the place (e.g: \"does Bar Foo have Wifi\" or \"is Foo Bar wheelchair accessible?\"). Currently we only support review snippets as sources.", + "type": "object", + "properties": { + "reviewSnippets": { + "description": "Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.", + "type": "array", + "items": { + "$ref": "ReviewSnippet" + } + } + } + }, + "ReviewSnippet": { + "id": "ReviewSnippet", + "description": "Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.", + "type": "object", + "properties": { + "reviewId": { + "description": "The ID of the review snippet.", + "type": "string" + }, + "googleMapsUri": { + "description": "A link that corresponds to the user review on Google Maps.", + "type": "string" + }, + "title": { + "description": "Title of the review.", + "type": "string" + } + } + }, + "GoogleAiGenerativelanguageV1betaGroundingSupport": { + "id": "GoogleAiGenerativelanguageV1betaGroundingSupport", + "description": "Grounding support.", + "type": "object", + "properties": { + "segment": { + "description": "Segment of the content this support belongs to.", + "$ref": "GoogleAiGenerativelanguageV1betaSegment" + }, + "groundingChunkIndices": { + "description": "Optional. A list of indices (into 'grounding_chunk' in `response.candidate.grounding_metadata`) specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. If the response is streaming, the grounding_chunk_indices refer to the indices across all responses. It is the client's responsibility to accumulate the grounding chunks from all responses (while maintaining the same order).", + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "confidenceScores": { + "description": "Optional. Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices.", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "renderedParts": { + "description": "Output only. Indices into the `parts` field of the candidate's content. These indices specify which rendered parts are associated with this support source.", + "readOnly": true, + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + }, + "GoogleAiGenerativelanguageV1betaSegment": { + "id": "GoogleAiGenerativelanguageV1betaSegment", + "description": "Segment of the content.", + "type": "object", + "properties": { + "partIndex": { + "description": "The index of a Part object within its parent Content object.", + "type": "integer", + "format": "int32" + }, + "startIndex": { + "description": "Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.", + "type": "integer", + "format": "int32" + }, + "endIndex": { + "description": "End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.", + "type": "integer", + "format": "int32" + }, + "text": { + "description": "The text corresponding to the segment from the response.", + "type": "string" + } + } + }, + "RetrievalMetadata": { + "id": "RetrievalMetadata", + "description": "Metadata related to retrieval in the grounding flow.", + "type": "object", + "properties": { + "googleSearchDynamicRetrievalScore": { + "description": "Optional. Score indicating how likely information from google search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when google search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger google search.", + "type": "number", + "format": "float" + } + } + }, + "LogprobsResult": { + "id": "LogprobsResult", + "description": "Logprobs Result", + "type": "object", + "properties": { + "logProbabilitySum": { + "description": "Sum of log probabilities for all tokens.", + "type": "number", + "format": "float" + }, + "topCandidates": { + "description": "Length = total number of decoding steps.", + "type": "array", + "items": { + "$ref": "TopCandidates" + } + }, + "chosenCandidates": { + "description": "Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates.", + "type": "array", + "items": { + "$ref": "LogprobsResultCandidate" + } + } + } + }, + "TopCandidates": { + "id": "TopCandidates", + "description": "Candidates with top log probabilities at each decoding step.", + "type": "object", + "properties": { + "candidates": { + "description": "Sorted by log probability in descending order.", + "type": "array", + "items": { + "$ref": "LogprobsResultCandidate" + } + } + } + }, + "LogprobsResultCandidate": { + "id": "LogprobsResultCandidate", + "description": "Candidate for the logprobs token and score.", + "type": "object", + "properties": { + "token": { + "description": "The candidate’s token string value.", + "type": "string" + }, + "tokenId": { + "description": "The candidate’s token id value.", + "type": "integer", + "format": "int32" + }, + "logProbability": { + "description": "The candidate's log probability.", + "type": "number", + "format": "float" + } + } + }, + "UrlContextMetadata": { + "id": "UrlContextMetadata", + "description": "Metadata related to url context retrieval tool.", + "type": "object", + "properties": { + "urlMetadata": { + "description": "List of url context.", + "type": "array", + "items": { + "$ref": "UrlMetadata" + } + } + } + }, + "UrlMetadata": { + "id": "UrlMetadata", + "description": "Context of the a single url retrieval.", + "type": "object", + "properties": { + "retrievedUrl": { + "description": "Retrieved url by the tool.", + "type": "string" + }, + "urlRetrievalStatus": { + "description": "Status of the url retrieval.", + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "Url retrieval is successful.", + "Url retrieval is failed due to error.", + "Url retrieval is failed because the content is behind paywall.", + "Url retrieval is failed because the content is unsafe." + ], + "enum": [ + "URL_RETRIEVAL_STATUS_UNSPECIFIED", + "URL_RETRIEVAL_STATUS_SUCCESS", + "URL_RETRIEVAL_STATUS_ERROR", + "URL_RETRIEVAL_STATUS_PAYWALL", + "URL_RETRIEVAL_STATUS_UNSAFE" + ] + } + } + }, + "PromptFeedback": { + "id": "PromptFeedback", + "description": "A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`.", + "type": "object", + "properties": { + "blockReason": { + "description": "Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt.", + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "Prompt was blocked due to safety reasons. Inspect `safety_ratings` to understand which safety category blocked it.", + "Prompt was blocked due to unknown reasons.", + "Prompt was blocked due to the terms which are included from the terminology blocklist.", + "Prompt was blocked due to prohibited content.", + "Candidates blocked due to unsafe image generation content." + ], + "enum": [ + "BLOCK_REASON_UNSPECIFIED", + "SAFETY", + "OTHER", + "BLOCKLIST", + "PROHIBITED_CONTENT", + "IMAGE_SAFETY" + ] + }, + "safetyRatings": { + "description": "Ratings for safety of the prompt. There is at most one rating per category.", + "type": "array", + "items": { + "$ref": "SafetyRating" + } + } + } + }, + "UsageMetadata": { + "id": "UsageMetadata", + "description": "Metadata on the generation request's token usage.", + "type": "object", + "properties": { + "promptTokenCount": { + "description": "Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.", + "type": "integer", + "format": "int32" + }, + "cachedContentTokenCount": { + "description": "Number of tokens in the cached part of the prompt (the cached content)", + "type": "integer", + "format": "int32" + }, + "candidatesTokenCount": { + "description": "Total number of tokens across all the generated response candidates.", + "type": "integer", + "format": "int32" + }, + "toolUsePromptTokenCount": { + "description": "Output only. Number of tokens present in tool-use prompt(s).", + "readOnly": true, + "type": "integer", + "format": "int32" + }, + "thoughtsTokenCount": { + "description": "Output only. Number of tokens of thoughts for thinking models.", + "readOnly": true, + "type": "integer", + "format": "int32" + }, + "totalTokenCount": { + "description": "Total token count for the generation request (prompt + thoughts + response candidates).", + "type": "integer", + "format": "int32" + }, + "promptTokensDetails": { + "description": "Output only. List of modalities that were processed in the request input.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "ModalityTokenCount" + } + }, + "cacheTokensDetails": { + "description": "Output only. List of modalities of the cached content in the request input.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "ModalityTokenCount" + } + }, + "candidatesTokensDetails": { + "description": "Output only. List of modalities that were returned in the response.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "ModalityTokenCount" + } + }, + "toolUsePromptTokensDetails": { + "description": "Output only. List of modalities that were processed for tool-use request inputs.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "ModalityTokenCount" + } + }, + "serviceTier": { + "description": "Output only. Service tier of the request.", + "readOnly": true, + "type": "string", + "enumDescriptions": [ + "Default service tier, which is standard.", + "Standard service tier.", + "Flex service tier.", + "Priority service tier." + ], + "enum": [ + "unspecified", + "standard", + "flex", + "priority" + ] + } + } + }, + "ModalityTokenCount": { + "id": "ModalityTokenCount", + "description": "Represents token counting info for a single modality.", + "type": "object", + "properties": { + "modality": { + "description": "The modality associated with this token count.", + "type": "string", + "enumDescriptions": [ + "Unspecified modality.", + "Plain text.", + "Image.", + "Video.", + "Audio.", + "Document, e.g. PDF." + ], + "enum": [ + "MODALITY_UNSPECIFIED", + "TEXT", + "IMAGE", + "VIDEO", + "AUDIO", + "DOCUMENT" + ] + }, + "tokenCount": { + "description": "Number of tokens.", + "type": "integer", + "format": "int32" + } + } + }, + "ModelStatus": { + "id": "ModelStatus", + "description": "The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable.", + "type": "object", + "properties": { + "modelStage": { + "description": "The stage of the underlying model.", + "type": "string", + "enumDescriptions": [ + "Unspecified model stage.", + "The underlying model is subject to lots of tunings.", + "Models in this stage are for experimental purposes only.", + "Models in this stage are more mature than experimental models.", + "Models in this stage are considered stable and ready for production use.", + "If the model is on this stage, it means that this model is on the path to deprecation in near future. Only existing customers can use this model.", + "Models in this stage are deprecated. These models cannot be used.", + "Models in this stage are retired. These models cannot be used." + ], + "enumDeprecated": [ + false, + true, + false, + false, + false, + false, + true, + false + ], + "enum": [ + "MODEL_STAGE_UNSPECIFIED", + "UNSTABLE_EXPERIMENTAL", + "EXPERIMENTAL", + "PREVIEW", + "STABLE", + "LEGACY", + "DEPRECATED", + "RETIRED" + ] + }, + "retirementTime": { + "description": "The time at which the model will be retired.", + "type": "string", + "format": "google-datetime" + }, + "message": { + "description": "A message explaining the model status.", + "type": "string" + } + } + }, + "GenerateAnswerRequest": { + "id": "GenerateAnswerRequest", + "description": "Request to generate a grounded answer from the `Model`.", + "type": "object", + "properties": { + "inlinePassages": { + "description": "Passages provided inline with the request.", + "$ref": "GroundingPassages" + }, + "semanticRetriever": { + "description": "Content retrieved from resources created via the Semantic Retriever API.", + "$ref": "SemanticRetrieverConfig" + }, + "contents": { + "description": "Required. The content of the current conversation with the `Model`. For single-turn queries, this is a single question to answer. For multi-turn queries, this is a repeated field that contains conversation history and the last `Content` in the list containing the question. Note: `GenerateAnswer` only supports queries in English.", + "type": "array", + "items": { + "$ref": "Content" + } + }, + "answerStyle": { + "description": "Required. Style in which answers should be returned.", + "type": "string", + "enumDescriptions": [ + "Unspecified answer style.", + "Succinct but abstract style.", + "Very brief and extractive style.", + "Verbose style including extra details. The response may be formatted as a sentence, paragraph, multiple paragraphs, or bullet points, etc." + ], + "enum": [ + "ANSWER_STYLE_UNSPECIFIED", + "ABSTRACTIVE", + "EXTRACTIVE", + "VERBOSE" + ] + }, + "safetySettings": { + "description": "Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateAnswerRequest.contents` and `GenerateAnswerResponse.candidate`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT are supported. Refer to the [guide](https://ai.google.dev/gemini-api/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications.", + "type": "array", + "items": { + "$ref": "SafetySetting" + } + }, + "temperature": { + "description": "Optional. Controls the randomness of the output. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model. A low temperature (~0.2) is usually recommended for Attributed-Question-Answering use cases.", + "type": "number", + "format": "float" + } + } + }, + "GroundingPassages": { + "id": "GroundingPassages", + "description": "A repeated list of passages.", + "type": "object", + "properties": { + "passages": { + "description": "List of passages.", + "type": "array", + "items": { + "$ref": "GroundingPassage" + } + } + } + }, + "GroundingPassage": { + "id": "GroundingPassage", + "description": "Passage included inline with a grounding configuration.", + "type": "object", + "properties": { + "id": { + "description": "Identifier for the passage for attributing this passage in grounded answers.", + "type": "string" + }, + "content": { + "description": "Content of the passage.", + "$ref": "Content" + } + } + }, + "SemanticRetrieverConfig": { + "id": "SemanticRetrieverConfig", + "description": "Configuration for retrieving grounding content from a `Corpus` or `Document` created using the Semantic Retriever API.", + "type": "object", + "properties": { + "source": { + "description": "Required. Name of the resource for retrieval. Example: `corpora/123` or `corpora/123/documents/abc`.", + "type": "string" + }, + "query": { + "description": "Required. Query to use for matching `Chunk`s in the given resource by similarity.", + "$ref": "Content" + }, + "metadataFilters": { + "description": "Optional. Filters for selecting `Document`s and/or `Chunk`s from the resource.", + "type": "array", + "items": { + "$ref": "MetadataFilter" + } + }, + "maxChunksCount": { + "description": "Optional. Maximum number of relevant `Chunk`s to retrieve.", + "type": "integer", + "format": "int32" + }, + "minimumRelevanceScore": { + "description": "Optional. Minimum relevance score for retrieved relevant `Chunk`s.", + "type": "number", + "format": "float" + } + } + }, + "MetadataFilter": { + "id": "MetadataFilter", + "description": "User provided filter to limit retrieval based on `Chunk` or `Document` level metadata values. Example (genre = drama OR genre = action): key = \"document.custom_metadata.genre\" conditions = [{string_value = \"drama\", operation = EQUAL}, {string_value = \"action\", operation = EQUAL}]", + "type": "object", + "properties": { + "key": { + "description": "Required. The key of the metadata to filter on.", + "type": "string" + }, + "conditions": { + "description": "Required. The `Condition`s for the given key that will trigger this filter. Multiple `Condition`s are joined by logical ORs.", + "type": "array", + "items": { + "$ref": "Condition" + } + } + } + }, + "Condition": { + "id": "Condition", + "description": "Filter condition applicable to a single key.", + "type": "object", + "properties": { + "stringValue": { + "description": "The string value to filter the metadata on.", + "type": "string" + }, + "numericValue": { + "description": "The numeric value to filter the metadata on.", + "type": "number", + "format": "float" + }, + "operation": { + "description": "Required. Operator applied to the given key-value pair to trigger the condition.", + "type": "string", + "enumDescriptions": [ + "The default value. This value is unused.", + "Supported by numeric.", + "Supported by numeric.", + "Supported by numeric & string.", + "Supported by numeric.", + "Supported by numeric.", + "Supported by numeric & string.", + "Supported by string only when `CustomMetadata` value type for the given key has a `string_list_value`.", + "Supported by string only when `CustomMetadata` value type for the given key has a `string_list_value`." + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "LESS", + "LESS_EQUAL", + "EQUAL", + "GREATER_EQUAL", + "GREATER", + "NOT_EQUAL", + "INCLUDES", + "EXCLUDES" + ] + } + } + }, + "GenerateAnswerResponse": { + "id": "GenerateAnswerResponse", + "description": "Response from the model for a grounded answer.", + "type": "object", + "properties": { + "answer": { + "description": "Candidate answer from the model. Note: The model *always* attempts to provide a grounded answer, even when the answer is unlikely to be answerable from the given passages. In that case, a low-quality or ungrounded answer may be provided, along with a low `answerable_probability`.", + "$ref": "Candidate" + }, + "answerableProbability": { + "description": "Output only. The model's estimate of the probability that its answer is correct and grounded in the input passages. A low `answerable_probability` indicates that the answer might not be grounded in the sources. When `answerable_probability` is low, you may want to: * Display a message to the effect of \"We couldn’t answer that question\" to the user. * Fall back to a general-purpose LLM that answers the question from world knowledge. The threshold and nature of such fallbacks will depend on individual use cases. `0.5` is a good starting threshold.", + "readOnly": true, + "type": "number", + "format": "float" + }, + "inputFeedback": { + "description": "Output only. Feedback related to the input data used to answer the question, as opposed to the model-generated response to the question. The input data can be one or more of the following: - Question specified by the last entry in `GenerateAnswerRequest.content` - Conversation history specified by the other entries in `GenerateAnswerRequest.content` - Grounding sources (`GenerateAnswerRequest.semantic_retriever` or `GenerateAnswerRequest.inline_passages`)", + "readOnly": true, + "$ref": "InputFeedback" + } + } + }, + "InputFeedback": { + "id": "InputFeedback", + "description": "Feedback related to the input data used to answer the question, as opposed to the model-generated response to the question.", + "type": "object", + "properties": { + "blockReason": { + "description": "Optional. If set, the input was blocked and no candidates are returned. Rephrase the input.", + "type": "string", + "enumDescriptions": [ + "Default value. This value is unused.", + "Input was blocked due to safety reasons. Inspect `safety_ratings` to understand which safety category blocked it.", + "Input was blocked due to other reasons." + ], + "enum": [ + "BLOCK_REASON_UNSPECIFIED", + "SAFETY", + "OTHER" + ] + }, + "safetyRatings": { + "description": "Ratings for safety of the input. There is at most one rating per category.", + "type": "array", + "items": { + "$ref": "SafetyRating" + } + } + } + }, + "EmbedContentRequest": { + "id": "EmbedContentRequest", + "description": "Request containing the `Content` for the model to embed.", + "type": "object", + "properties": { + "model": { + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`", + "type": "string" + }, + "content": { + "description": "Required. The content to embed. Only the `parts.text` fields will be counted.", + "$ref": "Content" + }, + "taskType": { + "description": "Optional. Deprecated: Please use EmbedContentConfig.task_type instead. Optional task type for which the embeddings will be used. Not supported on earlier models (`models/embedding-001`).", + "deprecated": true, + "type": "string", + "enumDescriptions": [ + "Unset value, which will default to one of the other enum values.", + "Specifies the given text is a query in a search/retrieval setting.", + "Specifies the given text is a document from the corpus being searched.", + "Specifies the given text will be used for STS.", + "Specifies that the given text will be classified.", + "Specifies that the embeddings will be used for clustering.", + "Specifies that the given text will be used for question answering.", + "Specifies that the given text will be used for fact verification.", + "Specifies that the given text will be used for code retrieval." + ], + "enum": [ + "TASK_TYPE_UNSPECIFIED", + "RETRIEVAL_QUERY", + "RETRIEVAL_DOCUMENT", + "SEMANTIC_SIMILARITY", + "CLASSIFICATION", + "CLUSTERING", + "QUESTION_ANSWERING", + "FACT_VERIFICATION", + "CODE_RETRIEVAL_QUERY" + ] + }, + "title": { + "description": "Optional. Deprecated: Please use EmbedContentConfig.title instead. An optional title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`. Note: Specifying a `title` for `RETRIEVAL_DOCUMENT` provides better quality embeddings for retrieval.", + "deprecated": true, + "type": "string" + }, + "outputDimensionality": { + "description": "Optional. Deprecated: Please use EmbedContentConfig.output_dimensionality instead. Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. Supported by newer models since 2024 only. You cannot set this value if using the earlier model (`models/embedding-001`).", + "deprecated": true, + "type": "integer", + "format": "int32" + }, + "embedContentConfig": { + "description": "Optional. Configuration for the EmbedContent request.", + "$ref": "EmbedContentConfig" + } + } + }, + "EmbedContentConfig": { + "id": "EmbedContentConfig", + "description": "Configurations for the EmbedContent request.", + "type": "object", + "properties": { + "title": { + "description": "Optional. The title for the text.", + "type": "string" + }, + "taskType": { + "description": "Optional. The task type of the embedding.", + "type": "string", + "enumDescriptions": [ + "Unset value, which will default to one of the other enum values.", + "Specifies the given text is a query in a search/retrieval setting.", + "Specifies the given text is a document from the corpus being searched.", + "Specifies the given text will be used for STS.", + "Specifies that the given text will be classified.", + "Specifies that the embeddings will be used for clustering.", + "Specifies that the given text will be used for question answering.", + "Specifies that the given text will be used for fact verification.", + "Specifies that the given text will be used for code retrieval." + ], + "enum": [ + "TASK_TYPE_UNSPECIFIED", + "RETRIEVAL_QUERY", + "RETRIEVAL_DOCUMENT", + "SEMANTIC_SIMILARITY", + "CLASSIFICATION", + "CLUSTERING", + "QUESTION_ANSWERING", + "FACT_VERIFICATION", + "CODE_RETRIEVAL_QUERY" + ] + }, + "autoTruncate": { + "description": "Optional. Whether to silently truncate the input content if it's longer than the maximum sequence length.", + "type": "boolean" + }, + "outputDimensionality": { + "description": "Optional. Reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end.", + "type": "integer", + "format": "int32" + }, + "documentOcr": { + "description": "Optional. Whether to enable OCR for document content.", + "type": "boolean" + }, + "audioTrackExtraction": { + "description": "Optional. Whether to extract audio from video content.", + "type": "boolean" + } + } + }, + "EmbedContentResponse": { + "id": "EmbedContentResponse", + "description": "The response to an `EmbedContentRequest`.", + "type": "object", + "properties": { + "embedding": { + "description": "Output only. The embedding generated from the input content.", + "readOnly": true, + "$ref": "ContentEmbedding" + }, + "usageMetadata": { + "description": "Output only. The usage metadata for the request.", + "readOnly": true, + "$ref": "EmbeddingUsageMetadata" + } + } + }, + "ContentEmbedding": { + "id": "ContentEmbedding", + "description": "A list of floats representing an embedding.", + "type": "object", + "properties": { + "values": { + "description": "The embedding values. This is for 3P users only and will not be populated for 1P calls.", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "shape": { + "description": "This field stores the soft tokens tensor frame shape (e.g. [1, 1, 256, 2048]).", + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + }, + "EmbeddingUsageMetadata": { + "id": "EmbeddingUsageMetadata", + "description": "Metadata on the usage of the embedding request.", + "type": "object", + "properties": { + "promptTokenCount": { + "description": "Output only. Number of tokens in the prompt.", + "readOnly": true, + "type": "integer", + "format": "int32" + }, + "promptTokenDetails": { + "description": "Output only. List of modalities that were processed in the request input.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "ModalityTokenCount" + } + } + } + }, + "BatchEmbedContentsRequest": { + "id": "BatchEmbedContentsRequest", + "description": "Batch request to get embeddings from the model for a list of prompts.", + "type": "object", + "properties": { + "requests": { + "description": "Required. Embed requests for the batch. The model in each of these requests must match the model specified `BatchEmbedContentsRequest.model`.", + "type": "array", + "items": { + "$ref": "EmbedContentRequest" + } + } + } + }, + "BatchEmbedContentsResponse": { + "id": "BatchEmbedContentsResponse", + "description": "The response to a `BatchEmbedContentsRequest`.", + "type": "object", + "properties": { + "embeddings": { + "description": "Output only. The embeddings for each request, in the same order as provided in the batch request.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "ContentEmbedding" + } + }, + "usageMetadata": { + "description": "Output only. The usage metadata for the request.", + "readOnly": true, + "$ref": "EmbeddingUsageMetadata" + } + } + }, + "CountTokensRequest": { + "id": "CountTokensRequest", + "description": "Counts the number of tokens in the `prompt` sent to a model. Models may tokenize text differently, so each model may return a different `token_count`.", + "type": "object", + "properties": { + "contents": { + "description": "Optional. The input given to the model as a prompt. This field is ignored when `generate_content_request` is set.", + "type": "array", + "items": { + "$ref": "Content" + } + }, + "generateContentRequest": { + "description": "Optional. The overall input given to the `Model`. This includes the prompt as well as other model steering information like [system instructions](https://ai.google.dev/gemini-api/docs/system-instructions), and/or function declarations for [function calling](https://ai.google.dev/gemini-api/docs/function-calling). `Model`s/`Content`s and `generate_content_request`s are mutually exclusive. You can either send `Model` + `Content`s or a `generate_content_request`, but never both.", + "$ref": "GenerateContentRequest" + } + } + }, + "CountTokensResponse": { + "id": "CountTokensResponse", + "description": "A response from `CountTokens`. It returns the model's `token_count` for the `prompt`.", + "type": "object", + "properties": { + "totalTokens": { + "description": "The number of tokens that the `Model` tokenizes the `prompt` into. Always non-negative.", + "type": "integer", + "format": "int32" + }, + "cachedContentTokenCount": { + "description": "Number of tokens in the cached part of the prompt (the cached content).", + "type": "integer", + "format": "int32" + }, + "promptTokensDetails": { + "description": "Output only. List of modalities that were processed in the request input.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "ModalityTokenCount" + } + }, + "cacheTokensDetails": { + "description": "Output only. List of modalities that were processed in the cached content.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "ModalityTokenCount" + } + } + } + }, + "BatchGenerateContentRequest": { + "id": "BatchGenerateContentRequest", + "description": "Request for a `BatchGenerateContent` operation.", + "type": "object", + "properties": { + "batch": { + "description": "Required. The batch to create.", + "$ref": "GenerateContentBatch" + } + } + }, + "GenerateContentBatch": { + "id": "GenerateContentBatch", + "description": "A resource representing a batch of `GenerateContent` requests.", + "type": "object", + "properties": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "type": "string" + }, + "name": { + "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The user-defined name of this batch.", + "type": "string" + }, + "inputConfig": { + "description": "Required. Input configuration of the instances on which batch processing are performed.", + "$ref": "InputConfig" + }, + "output": { + "description": "Output only. The output of the batch request.", + "readOnly": true, + "$ref": "GenerateContentBatchOutput" + }, + "createTime": { + "description": "Output only. The time at which the batch was created.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "endTime": { + "description": "Output only. The time at which the batch processing completed.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "updateTime": { + "description": "Output only. The time at which the batch was last updated.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "batchStats": { + "description": "Output only. Stats about the batch.", + "readOnly": true, + "$ref": "BatchStats" + }, + "state": { + "description": "Output only. The state of the batch.", + "readOnly": true, + "type": "string", + "enumDescriptions": [ + "The batch state is unspecified.", + "The service is preparing to run the batch.", + "The batch is in progress.", + "The batch completed successfully.", + "The batch failed.", + "The batch has been cancelled.", + "The batch has expired." + ], + "enum": [ + "BATCH_STATE_UNSPECIFIED", + "BATCH_STATE_PENDING", + "BATCH_STATE_RUNNING", + "BATCH_STATE_SUCCEEDED", + "BATCH_STATE_FAILED", + "BATCH_STATE_CANCELLED", + "BATCH_STATE_EXPIRED" + ] + }, + "priority": { + "description": "Optional. The priority of the batch. Batches with a higher priority value will be processed before batches with a lower priority value. Negative values are allowed. Default is 0.", + "type": "string", + "format": "int64" + } + } + }, + "InputConfig": { + "id": "InputConfig", + "description": "Configures the input to the batch request.", + "type": "object", + "properties": { + "fileName": { + "description": "The name of the `File` containing the input requests.", + "type": "string" + }, + "requests": { + "description": "The requests to be processed in the batch.", + "$ref": "InlinedRequests" + } + } + }, + "InlinedRequests": { + "id": "InlinedRequests", + "description": "The requests to be processed in the batch if provided as part of the batch creation request.", + "type": "object", + "properties": { + "requests": { + "description": "Required. The requests to be processed in the batch.", + "type": "array", + "items": { + "$ref": "InlinedRequest" + } + } + } + }, + "InlinedRequest": { + "id": "InlinedRequest", + "description": "The request to be processed in the batch.", + "type": "object", + "properties": { + "request": { + "description": "Required. The request to be processed in the batch.", + "$ref": "GenerateContentRequest" + }, + "metadata": { + "description": "Optional. The metadata to be associated with the request.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "GenerateContentBatchOutput": { + "id": "GenerateContentBatchOutput", + "description": "The output of a batch request. This is returned in the `BatchGenerateContentResponse` or the `GenerateContentBatch.output` field.", + "type": "object", + "properties": { + "responsesFile": { + "description": "Output only. The file ID of the file containing the responses. The file will be a JSONL file with a single response per line. The responses will be `GenerateContentResponse` messages formatted as JSON. The responses will be written in the same order as the input requests.", + "readOnly": true, + "type": "string" + }, + "inlinedResponses": { + "description": "Output only. The responses to the requests in the batch. Returned when the batch was built using inlined requests. The responses will be in the same order as the input requests.", + "readOnly": true, + "$ref": "InlinedResponses" + } + } + }, + "InlinedResponses": { + "id": "InlinedResponses", + "description": "The responses to the requests in the batch.", + "type": "object", + "properties": { + "inlinedResponses": { + "description": "Output only. The responses to the requests in the batch.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "InlinedResponse" + } + } + } + }, + "InlinedResponse": { + "id": "InlinedResponse", + "description": "The response to a single request in the batch.", + "type": "object", + "properties": { + "error": { + "description": "Output only. The error encountered while processing the request.", + "readOnly": true, + "$ref": "Status" + }, + "response": { + "description": "Output only. The response to the request.", + "readOnly": true, + "$ref": "GenerateContentResponse" + }, + "metadata": { + "description": "Output only. The metadata associated with the request.", + "readOnly": true, + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "BatchStats": { + "id": "BatchStats", + "description": "Stats about the batch.", + "type": "object", + "properties": { + "requestCount": { + "description": "Output only. The number of requests in the batch.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "successfulRequestCount": { + "description": "Output only. The number of requests that were successfully processed.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "failedRequestCount": { + "description": "Output only. The number of requests that failed to be processed.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "pendingRequestCount": { + "description": "Output only. The number of requests that are still pending processing.", + "readOnly": true, + "type": "string", + "format": "int64" + } + } + }, + "AsyncBatchEmbedContentRequest": { + "id": "AsyncBatchEmbedContentRequest", + "description": "Request for an `AsyncBatchEmbedContent` operation.", + "type": "object", + "properties": { + "batch": { + "description": "Required. The batch to create.", + "$ref": "EmbedContentBatch" + } + } + }, + "EmbedContentBatch": { + "id": "EmbedContentBatch", + "description": "A resource representing a batch of `EmbedContent` requests.", + "type": "object", + "properties": { + "model": { + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.", + "type": "string" + }, + "name": { + "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The user-defined name of this batch.", + "type": "string" + }, + "inputConfig": { + "description": "Required. Input configuration of the instances on which batch processing are performed.", + "$ref": "InputEmbedContentConfig" + }, + "output": { + "description": "Output only. The output of the batch request.", + "readOnly": true, + "$ref": "EmbedContentBatchOutput" + }, + "createTime": { + "description": "Output only. The time at which the batch was created.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "endTime": { + "description": "Output only. The time at which the batch processing completed.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "updateTime": { + "description": "Output only. The time at which the batch was last updated.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "batchStats": { + "description": "Output only. Stats about the batch.", + "readOnly": true, + "$ref": "EmbedContentBatchStats" + }, + "state": { + "description": "Output only. The state of the batch.", + "readOnly": true, + "type": "string", + "enumDescriptions": [ + "The batch state is unspecified.", + "The service is preparing to run the batch.", + "The batch is in progress.", + "The batch completed successfully.", + "The batch failed.", + "The batch has been cancelled.", + "The batch has expired." + ], + "enum": [ + "BATCH_STATE_UNSPECIFIED", + "BATCH_STATE_PENDING", + "BATCH_STATE_RUNNING", + "BATCH_STATE_SUCCEEDED", + "BATCH_STATE_FAILED", + "BATCH_STATE_CANCELLED", + "BATCH_STATE_EXPIRED" + ] + }, + "priority": { + "description": "Optional. The priority of the batch. Batches with a higher priority value will be processed before batches with a lower priority value. Negative values are allowed. Default is 0.", + "type": "string", + "format": "int64" + } + } + }, + "InputEmbedContentConfig": { + "id": "InputEmbedContentConfig", + "description": "Configures the input to the batch request.", + "type": "object", + "properties": { + "fileName": { + "description": "The name of the `File` containing the input requests.", + "type": "string" + }, + "requests": { + "description": "The requests to be processed in the batch.", + "$ref": "InlinedEmbedContentRequests" + } + } + }, + "InlinedEmbedContentRequests": { + "id": "InlinedEmbedContentRequests", + "description": "The requests to be processed in the batch if provided as part of the batch creation request.", + "type": "object", + "properties": { + "requests": { + "description": "Required. The requests to be processed in the batch.", + "type": "array", + "items": { + "$ref": "InlinedEmbedContentRequest" + } + } + } + }, + "InlinedEmbedContentRequest": { + "id": "InlinedEmbedContentRequest", + "description": "The request to be processed in the batch.", + "type": "object", + "properties": { + "request": { + "description": "Required. The request to be processed in the batch.", + "$ref": "EmbedContentRequest" + }, + "metadata": { + "description": "Optional. The metadata to be associated with the request.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "EmbedContentBatchOutput": { + "id": "EmbedContentBatchOutput", + "description": "The output of a batch request. This is returned in the `AsyncBatchEmbedContentResponse` or the `EmbedContentBatch.output` field.", + "type": "object", + "properties": { + "responsesFile": { + "description": "Output only. The file ID of the file containing the responses. The file will be a JSONL file with a single response per line. The responses will be `EmbedContentResponse` messages formatted as JSON. The responses will be written in the same order as the input requests.", + "readOnly": true, + "type": "string" + }, + "inlinedResponses": { + "description": "Output only. The responses to the requests in the batch. Returned when the batch was built using inlined requests. The responses will be in the same order as the input requests.", + "readOnly": true, + "$ref": "InlinedEmbedContentResponses" + } + } + }, + "InlinedEmbedContentResponses": { + "id": "InlinedEmbedContentResponses", + "description": "The responses to the requests in the batch.", + "type": "object", + "properties": { + "inlinedResponses": { + "description": "Output only. The responses to the requests in the batch.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "InlinedEmbedContentResponse" + } + } + } + }, + "InlinedEmbedContentResponse": { + "id": "InlinedEmbedContentResponse", + "description": "The response to a single request in the batch.", + "type": "object", + "properties": { + "error": { + "description": "Output only. The error encountered while processing the request.", + "readOnly": true, + "$ref": "Status" + }, + "response": { + "description": "Output only. The response to the request.", + "readOnly": true, + "$ref": "EmbedContentResponse" + }, + "metadata": { + "description": "Output only. The metadata associated with the request.", + "readOnly": true, + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "EmbedContentBatchStats": { + "id": "EmbedContentBatchStats", + "description": "Stats about the batch.", + "type": "object", + "properties": { + "requestCount": { + "description": "Output only. The number of requests in the batch.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "successfulRequestCount": { + "description": "Output only. The number of requests that were successfully processed.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "failedRequestCount": { + "description": "Output only. The number of requests that failed to be processed.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "pendingRequestCount": { + "description": "Output only. The number of requests that are still pending processing.", + "readOnly": true, + "type": "string", + "format": "int64" + } + } + }, + "ListCachedContentsResponse": { + "id": "ListCachedContentsResponse", + "description": "Response with CachedContents list.", + "type": "object", + "properties": { + "cachedContents": { + "description": "List of cached contents.", + "type": "array", + "items": { + "$ref": "CachedContent" + } + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + } + }, + "CachedContent": { + "id": "CachedContent", + "description": "Content that has been preprocessed and can be used in subsequent request to GenerativeService. Cached content can be only used with model it was created for.", + "type": "object", + "properties": { + "expireTime": { + "description": "Timestamp in UTC of when this resource is considered expired. This is *always* provided on output, regardless of what was sent on input.", + "type": "string", + "format": "google-datetime" + }, + "ttl": { + "description": "Input only. New TTL for this resource, input only.", + "type": "string", + "format": "google-duration" + }, + "name": { + "description": "Output only. Identifier. The resource name referring to the cached content. Format: `cachedContents/{id}`", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. Immutable. The user-generated meaningful display name of the cached content. Maximum 128 Unicode characters.", + "type": "string" + }, + "model": { + "description": "Required. Immutable. The name of the `Model` to use for cached content Format: `models/{model}`", + "type": "string" + }, + "systemInstruction": { + "description": "Optional. Input only. Immutable. Developer set system instruction. Currently text only.", + "$ref": "Content" + }, + "contents": { + "description": "Optional. Input only. Immutable. The content to cache.", + "type": "array", + "items": { + "$ref": "Content" + } + }, + "tools": { + "description": "Optional. Input only. Immutable. A list of `Tools` the model may use to generate the next response", + "type": "array", + "items": { + "$ref": "Tool" + } + }, + "toolConfig": { + "description": "Optional. Input only. Immutable. Tool config. This config is shared for all tools.", + "$ref": "ToolConfig" + }, + "createTime": { + "description": "Output only. Creation time of the cache entry.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "updateTime": { + "description": "Output only. When the cache entry was last updated in UTC time.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "usageMetadata": { + "description": "Output only. Metadata on the usage of the cached content.", + "readOnly": true, + "$ref": "CachedContentUsageMetadata" + } + } + }, + "CachedContentUsageMetadata": { + "id": "CachedContentUsageMetadata", + "description": "Metadata on the usage of the cached content.", + "type": "object", + "properties": { + "totalTokenCount": { + "description": "Total number of tokens that the cached content consumes.", + "type": "integer", + "format": "int32" + } + } + }, + "GenerateMessageRequest": { + "id": "GenerateMessageRequest", + "description": "Request to generate a message response from the model.", + "type": "object", + "properties": { + "prompt": { + "description": "Required. The structured textual input given to the model as a prompt. Given a prompt, the model will return what it predicts is the next message in the discussion.", + "$ref": "MessagePrompt" + }, + "temperature": { + "description": "Optional. Controls the randomness of the output. Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model.", + "type": "number", + "format": "float" + }, + "candidateCount": { + "description": "Optional. The number of generated response messages to return. This value must be between `[1, 8]`, inclusive. If unset, this will default to `1`.", + "type": "integer", + "format": "int32" + }, + "topP": { + "description": "Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`.", + "type": "number", + "format": "float" + }, + "topK": { + "description": "Optional. The maximum number of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens.", + "type": "integer", + "format": "int32" + } + } + }, + "MessagePrompt": { + "id": "MessagePrompt", + "description": "All of the structured input text passed to the model as a prompt. A `MessagePrompt` contains a structured set of fields that provide context for the conversation, examples of user input/model output message pairs that prime the model to respond in different ways, and the conversation history or list of messages representing the alternating turns of the conversation between the user and the model.", + "type": "object", + "properties": { + "context": { + "description": "Optional. Text that should be provided to the model first to ground the response. If not empty, this `context` will be given to the model first before the `examples` and `messages`. When using a `context` be sure to provide it with every request to maintain continuity. This field can be a description of your prompt to the model to help provide context and guide the responses. Examples: \"Translate the phrase from English to French.\" or \"Given a statement, classify the sentiment as happy, sad or neutral.\" Anything included in this field will take precedence over message history if the total input size exceeds the model's `input_token_limit` and the input request is truncated.", + "type": "string" + }, + "examples": { + "description": "Optional. Examples of what the model should generate. This includes both user input and the response that the model should emulate. These `examples` are treated identically to conversation messages except that they take precedence over the history in `messages`: If the total input size exceeds the model's `input_token_limit` the input will be truncated. Items will be dropped from `messages` before `examples`.", + "type": "array", + "items": { + "$ref": "Example" + } + }, + "messages": { + "description": "Required. A snapshot of the recent conversation history sorted chronologically. Turns alternate between two authors. If the total input size exceeds the model's `input_token_limit` the input will be truncated: The oldest items will be dropped from `messages`.", + "type": "array", + "items": { + "$ref": "Message" + } + } + } + }, + "Example": { + "id": "Example", + "description": "An input/output example used to instruct the Model. It demonstrates how the model should respond or format its response.", + "type": "object", + "properties": { + "input": { + "description": "Required. An example of an input `Message` from the user.", + "$ref": "Message" + }, + "output": { + "description": "Required. An example of what the model should output given the input.", + "$ref": "Message" + } + } + }, + "Message": { + "id": "Message", + "description": "The base unit of structured text. A `Message` includes an `author` and the `content` of the `Message`. The `author` is used to tag messages when they are fed to the model as text.", + "type": "object", + "properties": { + "author": { + "description": "Optional. The author of this Message. This serves as a key for tagging the content of this Message when it is fed to the model as text. The author can be any alphanumeric string.", + "type": "string" + }, + "content": { + "description": "Required. The text content of the structured `Message`.", + "type": "string" + }, + "citationMetadata": { + "description": "Output only. Citation information for model-generated `content` in this `Message`. If this `Message` was generated as output from the model, this field may be populated with attribution information for any text included in the `content`. This field is used only on output.", + "readOnly": true, + "$ref": "CitationMetadata" + } + } + }, + "GenerateMessageResponse": { + "id": "GenerateMessageResponse", + "description": "The response from the model. This includes candidate messages and conversation history in the form of chronologically-ordered messages.", + "type": "object", + "properties": { + "candidates": { + "description": "Candidate response messages from the model.", + "type": "array", + "items": { + "$ref": "Message" + } + }, + "messages": { + "description": "The conversation history used by the model.", + "type": "array", + "items": { + "$ref": "Message" + } + }, + "filters": { + "description": "A set of content filtering metadata for the prompt and response text. This indicates which `SafetyCategory`(s) blocked a candidate from this response, the lowest `HarmProbability` that triggered a block, and the HarmThreshold setting for that category.", + "type": "array", + "items": { + "$ref": "ContentFilter" + } + } + } + }, + "ContentFilter": { + "id": "ContentFilter", + "description": "Content filtering metadata associated with processing a single request. ContentFilter contains a reason and an optional supporting string. The reason may be unspecified.", + "type": "object", + "properties": { + "reason": { + "description": "The reason content was blocked during request processing.", + "type": "string", + "enumDescriptions": [ + "A blocked reason was not specified.", + "Content was blocked by safety settings.", + "Content was blocked, but the reason is uncategorized." + ], + "enum": [ + "BLOCKED_REASON_UNSPECIFIED", + "SAFETY", + "OTHER" + ] + }, + "message": { + "description": "A string that describes the filtering behavior in more detail.", + "type": "string" + } + } + }, + "CountMessageTokensRequest": { + "id": "CountMessageTokensRequest", + "description": "Counts the number of tokens in the `prompt` sent to a model. Models may tokenize text differently, so each model may return a different `token_count`.", + "type": "object", + "properties": { + "prompt": { + "description": "Required. The prompt, whose token count is to be returned.", + "$ref": "MessagePrompt" + } + } + }, + "CountMessageTokensResponse": { + "id": "CountMessageTokensResponse", + "description": "A response from `CountMessageTokens`. It returns the model's `token_count` for the `prompt`.", + "type": "object", + "properties": { + "tokenCount": { + "description": "The number of tokens that the `model` tokenizes the `prompt` into. Always non-negative.", + "type": "integer", + "format": "int32" + } + } + }, + "CreateFileRequest": { + "id": "CreateFileRequest", + "description": "Request for `CreateFile`.", + "type": "object", + "properties": { + "file": { + "description": "Optional. Metadata for the file to create.", + "$ref": "File" + } + } + }, + "File": { + "id": "File", + "description": "A file uploaded to the API. Next ID: 15", + "type": "object", + "properties": { + "videoMetadata": { + "description": "Output only. Metadata for a video.", + "readOnly": true, + "$ref": "VideoFileMetadata" + }, + "name": { + "description": "Immutable. Identifier. The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456`", + "type": "string" + }, + "displayName": { + "description": "Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: \"Welcome Image\"", + "type": "string" + }, + "mimeType": { + "description": "Output only. MIME type of the file.", + "readOnly": true, + "type": "string" + }, + "sizeBytes": { + "description": "Output only. Size of the file in bytes.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "createTime": { + "description": "Output only. The timestamp of when the `File` was created.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "updateTime": { + "description": "Output only. The timestamp of when the `File` was last updated.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "expirationTime": { + "description": "Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "sha256Hash": { + "description": "Output only. SHA-256 hash of the uploaded bytes.", + "readOnly": true, + "type": "string", + "format": "byte" + }, + "uri": { + "description": "Output only. The uri of the `File`.", + "readOnly": true, + "type": "string" + }, + "downloadUri": { + "description": "Output only. The download uri of the `File`.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Processing state of the File.", + "readOnly": true, + "type": "string", + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "File is being processed and cannot be used for inference yet.", + "File is processed and available for inference.", + "File failed processing." + ], + "enum": [ + "STATE_UNSPECIFIED", + "PROCESSING", + "ACTIVE", + "FAILED" + ] + }, + "source": { + "description": "Source of the File.", + "type": "string", + "enumDescriptions": [ + "Used if source is not specified.", + "Indicates the file is uploaded by the user.", + "Indicates the file is generated by Google.", + "Indicates the file is a registered, i.e. a Google Cloud Storage file." + ], + "enum": [ + "SOURCE_UNSPECIFIED", + "UPLOADED", + "GENERATED", + "REGISTERED" + ] + }, + "error": { + "description": "Output only. Error status if File processing failed.", + "readOnly": true, + "$ref": "Status" + } + } + }, + "VideoFileMetadata": { + "id": "VideoFileMetadata", + "description": "Metadata for a video `File`.", + "type": "object", + "properties": { + "videoDuration": { + "description": "Duration of the video.", + "type": "string", + "format": "google-duration" + } + } + }, + "CreateFileResponse": { + "id": "CreateFileResponse", + "description": "Response for `CreateFile`.", + "type": "object", + "properties": { + "file": { + "description": "Metadata for the created file.", + "$ref": "File" + } + } + }, + "RegisterFilesRequest": { + "id": "RegisterFilesRequest", + "description": "Request for `RegisterFiles`.", + "type": "object", + "properties": { + "uris": { + "description": "Required. The Google Cloud Storage URIs to register. Example: `gs://bucket/object`.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "RegisterFilesResponse": { + "id": "RegisterFilesResponse", + "description": "Response for `RegisterFiles`.", + "type": "object", + "properties": { + "files": { + "description": "The registered files to be used when calling GenerateContent.", + "type": "array", + "items": { + "$ref": "File" + } + } + } + }, + "ListFilesResponse": { + "id": "ListFilesResponse", + "description": "Response for `ListFiles`.", + "type": "object", + "properties": { + "files": { + "description": "The list of `File`s.", + "type": "array", + "items": { + "$ref": "File" + } + }, + "nextPageToken": { + "description": "A token that can be sent as a `page_token` into a subsequent `ListFiles` call.", + "type": "string" + } + } + }, + "DownloadFileResponse": { + "id": "DownloadFileResponse", + "description": "Response for `DownloadFile`.", + "type": "object", + "properties": {} + }, + "GeneratedFile": { + "id": "GeneratedFile", + "description": "A file generated on behalf of a user.", + "type": "object", + "properties": { + "name": { + "description": "Identifier. The name of the generated file. Example: `generatedFiles/abc-123`", + "type": "string" + }, + "mimeType": { + "description": "MIME type of the generatedFile.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the GeneratedFile.", + "readOnly": true, + "type": "string", + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "Being generated.", + "Generated and is ready for download.", + "Failed to generate the GeneratedFile." + ], + "enum": [ + "STATE_UNSPECIFIED", + "GENERATING", + "GENERATED", + "FAILED" + ] + }, + "error": { + "description": "Error details if the GeneratedFile ends up in the STATE_FAILED state.", + "$ref": "Status" + } + } + }, + "ListGeneratedFilesResponse": { + "id": "ListGeneratedFilesResponse", + "description": "Response for `ListGeneratedFiles`.", + "type": "object", + "properties": { + "generatedFiles": { + "description": "The list of `GeneratedFile`s.", + "type": "array", + "items": { + "$ref": "GeneratedFile" + } + }, + "nextPageToken": { + "description": "A token that can be sent as a `page_token` into a subsequent `ListGeneratedFiles` call.", + "type": "string" + } + } + }, + "Model": { + "id": "Model", + "description": "Information about a Generative Language Model.", + "type": "object", + "properties": { + "name": { + "description": "Required. The resource name of the `Model`. Refer to [Model variants](https://ai.google.dev/gemini-api/docs/models/gemini#model-variations) for all allowed values. Format: `models/{model}` with a `{model}` naming convention of: * \"{base_model_id}-{version}\" Examples: * `models/gemini-1.5-flash-001`", + "type": "string" + }, + "baseModelId": { + "description": "Required. The name of the base model, pass this to the generation request. Examples: * `gemini-1.5-flash`", + "type": "string" + }, + "version": { + "description": "Required. The version number of the model. This represents the major version (`1.0` or `1.5`)", + "type": "string" + }, + "displayName": { + "description": "The human-readable name of the model. E.g. \"Gemini 1.5 Flash\". The name can be up to 128 characters long and can consist of any UTF-8 characters.", + "type": "string" + }, + "description": { + "description": "A short description of the model.", + "type": "string" + }, + "inputTokenLimit": { + "description": "Maximum number of input tokens allowed for this model.", + "type": "integer", + "format": "int32" + }, + "outputTokenLimit": { + "description": "Maximum number of output tokens available for this model.", + "type": "integer", + "format": "int32" + }, + "supportedGenerationMethods": { + "description": "The model's supported generation methods. The corresponding API method names are defined as Pascal case strings, such as `generateMessage` and `generateContent`.", + "type": "array", + "items": { + "type": "string" + } + }, + "temperature": { + "description": "Controls the randomness of the output. Values can range over `[0.0,max_temperature]`, inclusive. A higher value will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model. This value specifies default to be used by the backend while making the call to the model.", + "type": "number", + "format": "float" + }, + "maxTemperature": { + "description": "The maximum temperature this model can use.", + "type": "number", + "format": "float" + }, + "topP": { + "description": "For [Nucleus sampling](https://ai.google.dev/gemini-api/docs/prompting-strategies#top-p). Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`. This value specifies default to be used by the backend while making the call to the model.", + "type": "number", + "format": "float" + }, + "topK": { + "description": "For Top-k sampling. Top-k sampling considers the set of `top_k` most probable tokens. This value specifies default to be used by the backend while making the call to the model. If empty, indicates the model doesn't use top-k sampling, and `top_k` isn't allowed as a generation parameter.", + "type": "integer", + "format": "int32" + }, + "thinking": { + "description": "Whether the model supports thinking.", + "type": "boolean" + } + } + }, + "ListModelsResponse": { + "id": "ListModelsResponse", + "description": "Response from `ListModel` containing a paginated list of Models.", + "type": "object", + "properties": { + "models": { + "description": "The returned Models.", + "type": "array", + "items": { + "$ref": "Model" + } + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages.", + "type": "string" + } + } + }, + "TunedModel": { + "id": "TunedModel", + "description": "A fine-tuned model created using ModelService.CreateTunedModel.", + "type": "object", + "properties": { + "tunedModelSource": { + "description": "Optional. TunedModel to use as the starting point for training the new model.", + "$ref": "TunedModelSource" + }, + "baseModel": { + "description": "Immutable. The name of the `Model` to tune. Example: `models/gemini-1.5-flash-001`", + "type": "string" + }, + "name": { + "description": "Output only. The tuned model name. A unique name will be generated on create. Example: `tunedModels/az2mb0bpw6i` If display_name is set on create, the id portion of the name will be set by concatenating the words of the display_name with hyphens and adding a random portion for uniqueness. Example: * display_name = `Sentence Translator` * name = `tunedModels/sentence-translator-u3b7m`", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. The name to display for this model in user interfaces. The display name must be up to 40 characters including spaces.", + "type": "string" + }, + "description": { + "description": "Optional. A short description of this model.", + "type": "string" + }, + "temperature": { + "description": "Optional. Controls the randomness of the output. Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model. This value specifies default to be the one used by the base model while creating the model.", + "type": "number", + "format": "float" + }, + "topP": { + "description": "Optional. For Nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`. This value specifies default to be the one used by the base model while creating the model.", + "type": "number", + "format": "float" + }, + "topK": { + "description": "Optional. For Top-k sampling. Top-k sampling considers the set of `top_k` most probable tokens. This value specifies default to be used by the backend while making the call to the model. This value specifies default to be the one used by the base model while creating the model.", + "type": "integer", + "format": "int32" + }, + "state": { + "description": "Output only. The state of the tuned model.", + "readOnly": true, + "type": "string", + "enumDescriptions": [ + "The default value. This value is unused.", + "The model is being created.", + "The model is ready to be used.", + "The model failed to be created." + ], + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "FAILED" + ] + }, + "createTime": { + "description": "Output only. The timestamp when this model was created.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "updateTime": { + "description": "Output only. The timestamp when this model was updated.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "tuningTask": { + "description": "Required. The tuning task that creates the tuned model.", + "$ref": "TuningTask" + }, + "readerProjectNumbers": { + "description": "Optional. List of project numbers that have read access to the tuned model.", + "type": "array", + "items": { + "type": "string", + "format": "int64" + } + } + } + }, + "TunedModelSource": { + "id": "TunedModelSource", + "description": "Tuned model as a source for training a new model.", + "type": "object", + "properties": { + "tunedModel": { + "description": "Immutable. The name of the `TunedModel` to use as the starting point for training the new model. Example: `tunedModels/my-tuned-model`", + "type": "string" + }, + "baseModel": { + "description": "Output only. The name of the base `Model` this `TunedModel` was tuned from. Example: `models/gemini-1.5-flash-001`", + "readOnly": true, + "type": "string" + } + } + }, + "TuningTask": { + "id": "TuningTask", + "description": "Tuning tasks that create tuned models.", + "type": "object", + "properties": { + "startTime": { + "description": "Output only. The timestamp when tuning this model started.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "completeTime": { + "description": "Output only. The timestamp when tuning this model completed.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "snapshots": { + "description": "Output only. Metrics collected during tuning.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "TuningSnapshot" + } + }, + "trainingData": { + "description": "Required. Input only. Immutable. The model training data.", + "$ref": "Dataset" + }, + "hyperparameters": { + "description": "Immutable. Hyperparameters controlling the tuning process. If not provided, default values will be used.", + "$ref": "Hyperparameters" + } + } + }, + "TuningSnapshot": { + "id": "TuningSnapshot", + "description": "Record for a single tuning step.", + "type": "object", + "properties": { + "step": { + "description": "Output only. The tuning step.", + "readOnly": true, + "type": "integer", + "format": "int32" + }, + "epoch": { + "description": "Output only. The epoch this step was part of.", + "readOnly": true, + "type": "integer", + "format": "int32" + }, + "meanLoss": { + "description": "Output only. The mean loss of the training examples for this step.", + "readOnly": true, + "type": "number", + "format": "float" + }, + "computeTime": { + "description": "Output only. The timestamp when this metric was computed.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + } + } + }, + "Dataset": { + "id": "Dataset", + "description": "Dataset for training or validation.", + "type": "object", + "properties": { + "examples": { + "description": "Optional. Inline examples with simple input/output text.", + "$ref": "TuningExamples" + } + } + }, + "TuningExamples": { + "id": "TuningExamples", + "description": "A set of tuning examples. Can be training or validation data.", + "type": "object", + "properties": { + "examples": { + "description": "The examples. Example input can be for text or discuss, but all examples in a set must be of the same type.", + "type": "array", + "items": { + "$ref": "TuningExample" + } + } + } + }, + "TuningExample": { + "id": "TuningExample", + "description": "A single example for tuning.", + "type": "object", + "properties": { + "textInput": { + "description": "Optional. Text model input.", + "type": "string" + }, + "output": { + "description": "Required. The expected model output.", + "type": "string" + } + } + }, + "Hyperparameters": { + "id": "Hyperparameters", + "description": "Hyperparameters controlling the tuning process. Read more at https://ai.google.dev/docs/model_tuning_guidance", + "type": "object", + "properties": { + "learningRate": { + "description": "Optional. Immutable. The learning rate hyperparameter for tuning. If not set, a default of 0.001 or 0.0002 will be calculated based on the number of training examples.", + "type": "number", + "format": "float" + }, + "learningRateMultiplier": { + "description": "Optional. Immutable. The learning rate multiplier is used to calculate a final learning_rate based on the default (recommended) value. Actual learning rate := learning_rate_multiplier * default learning rate Default learning rate is dependent on base model and dataset size. If not set, a default of 1.0 will be used.", + "type": "number", + "format": "float" + }, + "epochCount": { + "description": "Immutable. The number of training epochs. An epoch is one pass through the training data. If not set, a default of 5 will be used.", + "type": "integer", + "format": "int32" + }, + "batchSize": { + "description": "Immutable. The batch size hyperparameter for tuning. If not set, a default of 4 or 16 will be used based on the number of training examples.", + "type": "integer", + "format": "int32" + } + } + }, + "ListTunedModelsResponse": { + "id": "ListTunedModelsResponse", + "description": "Response from `ListTunedModels` containing a paginated list of Models.", + "type": "object", + "properties": { + "tunedModels": { + "description": "The returned Models.", + "type": "array", + "items": { + "$ref": "TunedModel" + } + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages.", + "type": "string" + } + } + }, + "Permission": { + "id": "Permission", + "description": "Permission resource grants user, group or the rest of the world access to the PaLM API resource (e.g. a tuned model, corpus). A role is a collection of permitted operations that allows users to perform specific actions on PaLM API resources. To make them available to users, groups, or service accounts, you assign roles. When you assign a role, you grant permissions that the role contains. There are three concentric roles. Each role is a superset of the previous role's permitted operations: - reader can use the resource (e.g. tuned model, corpus) for inference - writer has reader's permissions and additionally can edit and share - owner has writer's permissions and additionally can delete", + "type": "object", + "properties": { + "name": { + "description": "Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only.", + "readOnly": true, + "type": "string" + }, + "granteeType": { + "description": "Optional. Immutable. The type of the grantee.", + "type": "string", + "enumDescriptions": [ + "The default value. This value is unused.", + "Represents a user. When set, you must provide email_address for the user.", + "Represents a group. When set, you must provide email_address for the group.", + "Represents access to everyone. No extra information is required." + ], + "enum": [ + "GRANTEE_TYPE_UNSPECIFIED", + "USER", + "GROUP", + "EVERYONE" + ] + }, + "emailAddress": { + "description": "Optional. Immutable. The email address of the user of group which this permission refers. Field is not set when permission's grantee type is EVERYONE.", + "type": "string" + }, + "role": { + "description": "Required. The role granted by this permission.", + "type": "string", + "enumDescriptions": [ + "The default value. This value is unused.", + "Owner can use, update, share and delete the resource.", + "Writer can use, update and share the resource.", + "Reader can use the resource." + ], + "enum": [ + "ROLE_UNSPECIFIED", + "OWNER", + "WRITER", + "READER" + ] + } + } + }, + "ListPermissionsResponse": { + "id": "ListPermissionsResponse", + "description": "Response from `ListPermissions` containing a paginated list of permissions.", + "type": "object", + "properties": { + "permissions": { + "description": "Returned permissions.", + "type": "array", + "items": { + "$ref": "Permission" + } + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages.", + "type": "string" + } + } + }, + "TransferOwnershipRequest": { + "id": "TransferOwnershipRequest", + "description": "Request to transfer the ownership of the tuned model.", + "type": "object", + "properties": { + "emailAddress": { + "description": "Required. The email address of the user to whom the tuned model is being transferred to.", + "type": "string" + } + } + }, + "TransferOwnershipResponse": { + "id": "TransferOwnershipResponse", + "description": "Response from `TransferOwnership`.", + "type": "object", + "properties": {} + }, + "PredictRequest": { + "id": "PredictRequest", + "description": "Request message for PredictionService.Predict.", + "type": "object", + "properties": { + "instances": { + "description": "Required. The instances that are the input to the prediction call.", + "type": "array", + "items": { + "type": "any" + } + }, + "parameters": { + "description": "Optional. The parameters that govern the prediction call.", + "type": "any" + } + } + }, + "PredictResponse": { + "id": "PredictResponse", + "description": "Response message for [PredictionService.Predict].", + "type": "object", + "properties": { + "predictions": { + "description": "The outputs of the prediction call.", + "type": "array", + "items": { + "type": "any" + } + } + } + }, + "PredictLongRunningRequest": { + "id": "PredictLongRunningRequest", + "description": "Request message for [PredictionService.PredictLongRunning].", + "type": "object", + "properties": { + "instances": { + "description": "Required. The instances that are the input to the prediction call.", + "type": "array", + "items": { + "type": "any" + } + }, + "parameters": { + "description": "Optional. The parameters that govern the prediction call.", + "type": "any" + } + } + }, + "FileSearchStore": { + "id": "FileSearchStore", + "description": "A `FileSearchStore` is a collection of `Document`s.", + "type": "object", + "properties": { + "name": { + "description": "Output only. Immutable. Identifier. The `FileSearchStore` resource name. It is an ID (name excluding the \"fileSearchStores/\" prefix) that can contain up to 40 characters that are lowercase alphanumeric or dashes (-). It is output only. The unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/my-awesome-file-search-store-123a456b789c` If `display_name` is not provided, the name will be randomly generated.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. The human-readable display name for the `FileSearchStore`. The display name must be no more than 512 characters in length, including spaces. Example: \"Docs on Semantic Retriever\"", + "type": "string" + }, + "createTime": { + "description": "Output only. The Timestamp of when the `FileSearchStore` was created.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "updateTime": { + "description": "Output only. The Timestamp of when the `FileSearchStore` was last updated.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "activeDocumentsCount": { + "description": "Output only. The number of documents in the `FileSearchStore` that are active and ready for retrieval.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "pendingDocumentsCount": { + "description": "Output only. The number of documents in the `FileSearchStore` that are being processed.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "failedDocumentsCount": { + "description": "Output only. The number of documents in the `FileSearchStore` that have failed processing.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "sizeBytes": { + "description": "Output only. The size of raw bytes ingested into the `FileSearchStore`. This is the total size of all the documents in the `FileSearchStore`.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "embeddingModel": { + "description": "Optional. The embedding model to use for the `FileSearchStore`. The model's resource name. This serves as an ID for the Model to use. Format: `models/{model}`. If not specified, the default embedding model will be used.", + "type": "string" + } + } + }, + "Corpus": { + "id": "Corpus", + "description": "A `Corpus` is a collection of `Document`s. A project can create up to 10 corpora.", + "type": "object", + "properties": { + "name": { + "description": "Output only. Immutable. Identifier. The `Corpus` resource name. The ID (name excluding the \"corpora/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `corpora/my-awesome-corpora-123a456b789c`", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. The human-readable display name for the `Corpus`. The display name must be no more than 512 characters in length, including spaces. Example: \"Docs on Semantic Retriever\"", + "type": "string" + }, + "createTime": { + "description": "Output only. The Timestamp of when the `Corpus` was created.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "updateTime": { + "description": "Output only. The Timestamp of when the `Corpus` was last updated.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + } + } + }, + "ListFileSearchStoresResponse": { + "id": "ListFileSearchStoresResponse", + "description": "Response from `ListFileSearchStores` containing a paginated list of `FileSearchStores`. The results are sorted by ascending `file_search_store.create_time`.", + "type": "object", + "properties": { + "fileSearchStores": { + "description": "The returned rag_stores.", + "type": "array", + "items": { + "$ref": "FileSearchStore" + } + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages.", + "type": "string" + } + } + }, + "ListCorporaResponse": { + "id": "ListCorporaResponse", + "description": "Response from `ListCorpora` containing a paginated list of `Corpora`. The results are sorted by ascending `corpus.create_time`.", + "type": "object", + "properties": { + "corpora": { + "description": "The returned corpora.", + "type": "array", + "items": { + "$ref": "Corpus" + } + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages.", + "type": "string" + } + } + }, + "Document": { + "id": "Document", + "description": "A `Document` is a collection of `Chunk`s.", + "type": "object", + "properties": { + "name": { + "description": "Immutable. Identifier. The `Document` resource name. The ID (name excluding the \"fileSearchStores/*/documents/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/{file_search_store_id}/documents/my-awesome-doc-123a456b789c`", + "type": "string" + }, + "displayName": { + "description": "Optional. The human-readable display name for the `Document`. The display name must be no more than 512 characters in length, including spaces. Example: \"Semantic Retriever Documentation\"", + "type": "string" + }, + "customMetadata": { + "description": "Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`.", + "type": "array", + "items": { + "$ref": "CustomMetadata" + } + }, + "updateTime": { + "description": "Output only. The Timestamp of when the `Document` was last updated.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "createTime": { + "description": "Output only. The Timestamp of when the `Document` was created.", + "readOnly": true, + "type": "string", + "format": "google-datetime" + }, + "state": { + "description": "Output only. Current state of the `Document`.", + "readOnly": true, + "type": "string", + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "Some `Chunks` of the `Document` are being processed (embedding and vector storage).", + "All `Chunks` of the `Document` is processed and available for querying.", + "Some `Chunks` of the `Document` failed processing." + ], + "enum": [ + "STATE_UNSPECIFIED", + "STATE_PENDING", + "STATE_ACTIVE", + "STATE_FAILED" + ] + }, + "sizeBytes": { + "description": "Output only. The size of raw bytes ingested into the Document.", + "readOnly": true, + "type": "string", + "format": "int64" + }, + "mimeType": { + "description": "Output only. The mime type of the Document.", + "readOnly": true, + "type": "string" + } + } + }, + "CustomMetadata": { + "id": "CustomMetadata", + "description": "User provided metadata stored as key-value pairs.", + "type": "object", + "properties": { + "stringValue": { + "description": "The string value of the metadata to store.", + "type": "string" + }, + "stringListValue": { + "description": "The StringList value of the metadata to store.", + "$ref": "StringList" + }, + "numericValue": { + "description": "The numeric value of the metadata to store.", + "type": "number", + "format": "float" + }, + "key": { + "description": "Required. The key of the metadata to store.", + "type": "string" + } + } + }, + "StringList": { + "id": "StringList", + "description": "User provided string values assigned to a single metadata key.", + "type": "object", + "properties": { + "values": { + "description": "The string values of the metadata to store.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ListDocumentsResponse": { + "id": "ListDocumentsResponse", + "description": "Response from `ListDocuments` containing a paginated list of `Document`s. The `Document`s are sorted by ascending `document.create_time`.", + "type": "object", + "properties": { + "documents": { + "description": "The returned `Document`s.", + "type": "array", + "items": { + "$ref": "Document" + } + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages.", + "type": "string" + } + } + }, + "ImportFileRequest": { + "id": "ImportFileRequest", + "description": "Request for `ImportFile` to import a File API file with a `FileSearchStore`.", + "type": "object", + "properties": { + "fileName": { + "description": "Required. The name of the `File` to import. Example: `files/abc-123`", + "type": "string" + }, + "customMetadata": { + "description": "Custom metadata to be associated with the file.", + "type": "array", + "items": { + "$ref": "CustomMetadata" + } + }, + "chunkingConfig": { + "description": "Optional. Config for telling the service how to chunk the file. If not provided, the service will use default parameters.", + "$ref": "ChunkingConfig" + } + } + }, + "ChunkingConfig": { + "id": "ChunkingConfig", + "description": "Parameters for telling the service how to chunk the file. inspired by google3/cloud/ai/platform/extension/lib/retrieval/config/chunker_config.proto", + "type": "object", + "properties": { + "whiteSpaceConfig": { + "description": "White space chunking configuration.", + "$ref": "WhiteSpaceConfig" + } + } + }, + "WhiteSpaceConfig": { + "id": "WhiteSpaceConfig", + "description": "Configuration for a white space chunking algorithm [white space delimited].", + "type": "object", + "properties": { + "maxTokensPerChunk": { + "description": "Maximum number of tokens per chunk. Tokens are defined as words for this chunking algorithm. Note: we are defining tokens as words split by whitespace as opposed to the output of a tokenizer. The context window of the latest gemini embedding model as of 2025-04-17 is currently 8192 tokens. We assume that the average word is 5 characters. Therefore, we set the upper limit to 2**9, which is 512 words, or 2560 tokens, assuming worst case a character per token. This is a conservative estimate meant to prevent context window overflow.", + "type": "integer", + "format": "int32" + }, + "maxOverlapTokens": { + "description": "Maximum number of overlapping tokens between two adjacent chunks.", + "type": "integer", + "format": "int32" + } + } + }, + "UploadToFileSearchStoreRequest": { + "id": "UploadToFileSearchStoreRequest", + "description": "Request for `UploadToFileSearchStore`.", + "type": "object", + "properties": { + "displayName": { + "description": "Optional. Display name of the created document.", + "type": "string" + }, + "customMetadata": { + "description": "Custom metadata to be associated with the data.", + "type": "array", + "items": { + "$ref": "CustomMetadata" + } + }, + "chunkingConfig": { + "description": "Optional. Config for telling the service how to chunk the data. If not provided, the service will use default parameters.", + "$ref": "ChunkingConfig" + }, + "mimeType": { + "description": "Optional. MIME type of the data. If not provided, it will be inferred from the uploaded content.", + "type": "string" + } + } + }, + "CustomLongRunningOperation": { + "id": "CustomLongRunningOperation", + "type": "object", + "properties": { + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "response": { + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + } + } + }, + "DownloadMediaResponse": { + "id": "DownloadMediaResponse", + "description": "Response for DownloadMedia.", + "type": "object", + "properties": { + "blob": { + "description": "Output only. The blob data.", + "readOnly": true, + "$ref": "GdataMedia" + } + } + }, + "GdataMedia": { + "id": "GdataMedia", + "description": "A reference to data stored on the filesystem, on GFS or in blobstore.", + "type": "object", + "properties": { + "contentType": { + "description": "MIME type of the data", + "type": "string" + }, + "timestamp": { + "description": "Time at which the media data was last updated, in milliseconds since UNIX epoch", + "type": "string", + "format": "uint64" + }, + "token": { + "description": "A unique fingerprint/version id for the media data", + "type": "string" + }, + "length": { + "description": "Size of the data, in bytes", + "type": "string", + "format": "int64" + }, + "filename": { + "description": "Original file name", + "type": "string" + }, + "referenceType": { + "description": "Describes what the field reference contains.", + "type": "string", + "enumDescriptions": [ + "Reference contains a GFS path or a local path.", + "Reference points to a blobstore object. This could be either a v1 blob_ref or a v2 blobstore2_info. Clients should check blobstore2_info first, since v1 is being deprecated.", + "Data is included into this proto buffer", + "Data should be accessed from the current service using the operation GetMedia.", + "The content for this media object is stored across multiple partial media objects under the composite_media field.", + "Reference points to a bigstore object", + "Indicates the data is stored in diff_version_response.", + "Indicates the data is stored in diff_checksums_response.", + "Indicates the data is stored in diff_download_response.", + "Indicates the data is stored in diff_upload_request.", + "Indicates the data is stored in diff_upload_response.", + "Indicates the data is stored in cosmo_binary_reference.", + "Informs Scotty to generate a response payload with the size specified in the length field. The contents of the payload are generated by Scotty and are undefined. This is useful for testing download speeds between the user and Scotty without involving a real payload source. Note: range is not supported when using arbitrary_bytes." + ], + "enum": [ + "PATH", + "BLOB_REF", + "INLINE", + "GET_MEDIA", + "COMPOSITE_MEDIA", + "BIGSTORE_REF", + "DIFF_VERSION_RESPONSE", + "DIFF_CHECKSUMS_RESPONSE", + "DIFF_DOWNLOAD_RESPONSE", + "DIFF_UPLOAD_REQUEST", + "DIFF_UPLOAD_RESPONSE", + "COSMO_BINARY_REFERENCE", + "ARBITRARY_BYTES" + ] + }, + "path": { + "description": "Path to the data, set if reference_type is PATH", + "type": "string" + }, + "blobRef": { + "description": "Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte representation of a blobstore.BlobRef. Since Blobstore is deprecating v1, use blobstore2_info instead. For now, any v2 blob will also be represented in this field as v1 BlobRef.", + "deprecated": true, + "type": "string", + "format": "byte" + }, + "inline": { + "description": "Media data, set if reference_type is INLINE", + "type": "string", + "format": "byte" + }, + "mediaId": { + "description": "Media id to forward to the operation GetMedia. Can be set if reference_type is GET_MEDIA.", + "type": "string", + "format": "byte" + }, + "hash": { + "description": "Deprecated, use one of explicit hash type fields instead. These two hash related fields will only be populated on Scotty based media uploads and will contain the content of the hash group in the NotificationRequest: http://cs/#google3/blobstore2/api/scotty/service/proto/upload_listener.proto&q=class:Hash Hex encoded hash value of the uploaded media.", + "deprecated": true, + "type": "string" + }, + "algorithm": { + "description": "Deprecated, use one of explicit hash type fields instead. Algorithm used for calculating the hash. As of 2011/01/21, \"MD5\" is the only possible value for this field. New values may be added at any time.", + "deprecated": true, + "type": "string" + }, + "compositeMedia": { + "description": "A composite media composed of one or more media objects, set if reference_type is COMPOSITE_MEDIA. The media length field must be set to the sum of the lengths of all composite media objects. Note: All composite media must have length specified.", + "type": "array", + "items": { + "$ref": "CompositeMedia" + } + }, + "bigstoreObjectRef": { + "description": "Use object_id instead.", + "deprecated": true, + "type": "string", + "format": "byte" + }, + "objectId": { + "description": "Reference to a TI Blob, set if reference_type is BIGSTORE_REF.", + "$ref": "ObjectId" + }, + "blobstore2Info": { + "description": "Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to a v2 blob.", + "$ref": "Blobstore2Info" + }, + "diffVersionResponse": { + "description": "Set if reference_type is DIFF_VERSION_RESPONSE.", + "$ref": "DiffVersionResponse" + }, + "diffChecksumsResponse": { + "description": "Set if reference_type is DIFF_CHECKSUMS_RESPONSE.", + "$ref": "DiffChecksumsResponse" + }, + "diffDownloadResponse": { + "description": "Set if reference_type is DIFF_DOWNLOAD_RESPONSE.", + "$ref": "DiffDownloadResponse" + }, + "diffUploadRequest": { + "description": "Set if reference_type is DIFF_UPLOAD_REQUEST.", + "$ref": "DiffUploadRequest" + }, + "diffUploadResponse": { + "description": "Set if reference_type is DIFF_UPLOAD_RESPONSE.", + "$ref": "DiffUploadResponse" + }, + "contentTypeInfo": { + "description": "Extended content type information provided for Scotty uploads.", + "$ref": "ContentTypeInfo" + }, + "downloadParameters": { + "description": "Parameters for a media download.", + "$ref": "DownloadParameters" + }, + "crc32cHash": { + "description": "For Scotty Uploads: Scotty-provided hashes for uploads For Scotty Downloads: (WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.) A Hash provided by the agent to be used to verify the data being downloaded. Currently only supported for inline payloads. Further, only crc32c_hash is currently supported.", + "type": "integer", + "format": "uint32" + }, + "md5Hash": { + "description": "Scotty-provided MD5 hash for an upload.", + "type": "string", + "format": "byte" + }, + "sha1Hash": { + "description": "Scotty-provided SHA1 hash for an upload.", + "type": "string", + "format": "byte" + }, + "sha256Hash": { + "description": "Scotty-provided SHA256 hash for an upload.", + "type": "string", + "format": "byte" + }, + "sha512Hash": { + "description": "Scotty-provided SHA512 hash for an upload.", + "type": "string", + "format": "byte" + }, + "isPotentialRetry": { + "description": "|is_potential_retry| is set false only when Scotty is certain that it has not sent the request before. When a client resumes an upload, this field must be set true in agent calls, because Scotty cannot be certain that it has never sent the request before due to potential failure in the session state persistence.", + "type": "boolean" + }, + "cosmoBinaryReference": { + "description": "A binary data reference for a media download. Serves as a technology-agnostic binary reference in some Google infrastructure. This value is a serialized storage_cosmo.BinaryReference proto. Storing it as bytes is a hack to get around the fact that the cosmo proto (as well as others it includes) doesn't support JavaScript. This prevents us from including the actual type of this field.", + "type": "string", + "format": "byte" + }, + "hashVerified": { + "description": "For Scotty uploads only. If a user sends a hash code and the backend has requested that Scotty verify the upload against the client hash, Scotty will perform the check on behalf of the backend and will reject it if the hashes don't match. This is set to true if Scotty performed this verification.", + "type": "boolean" + } + } + }, + "CompositeMedia": { + "id": "CompositeMedia", + "description": "A sequence of media data references representing composite data. Introduced to support Bigstore composite objects. For details, visit http://go/bigstore-composites.", + "type": "object", + "properties": { + "length": { + "description": "Size of the data, in bytes", + "type": "string", + "format": "int64" + }, + "referenceType": { + "description": "Describes what the field reference contains.", + "type": "string", + "enumDescriptions": [ + "Reference contains a GFS path or a local path.", + "Reference points to a blobstore object. This could be either a v1 blob_ref or a v2 blobstore2_info. Clients should check blobstore2_info first, since v1 is being deprecated.", + "Data is included into this proto buffer", + "Reference points to a bigstore object", + "Indicates the data is stored in cosmo_binary_reference." + ], + "enum": [ + "PATH", + "BLOB_REF", + "INLINE", + "BIGSTORE_REF", + "COSMO_BINARY_REFERENCE" + ] + }, + "path": { + "description": "Path to the data, set if reference_type is PATH", + "type": "string" + }, + "blobRef": { + "description": "Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte representation of a blobstore.BlobRef. Since Blobstore is deprecating v1, use blobstore2_info instead. For now, any v2 blob will also be represented in this field as v1 BlobRef.", + "deprecated": true, + "type": "string", + "format": "byte" + }, + "inline": { + "description": "Media data, set if reference_type is INLINE", + "type": "string", + "format": "byte" + }, + "objectId": { + "description": "Reference to a TI Blob, set if reference_type is BIGSTORE_REF.", + "$ref": "ObjectId" + }, + "blobstore2Info": { + "description": "Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to a v2 blob.", + "$ref": "Blobstore2Info" + }, + "cosmoBinaryReference": { + "description": "A binary data reference for a media download. Serves as a technology-agnostic binary reference in some Google infrastructure. This value is a serialized storage_cosmo.BinaryReference proto. Storing it as bytes is a hack to get around the fact that the cosmo proto (as well as others it includes) doesn't support JavaScript. This prevents us from including the actual type of this field.", + "type": "string", + "format": "byte" + }, + "crc32cHash": { + "description": "crc32.c hash for the payload.", + "type": "integer", + "format": "uint32" + }, + "md5Hash": { + "description": "MD5 hash for the payload.", + "type": "string", + "format": "byte" + }, + "sha1Hash": { + "description": "SHA-1 hash for the payload.", + "type": "string", + "format": "byte" + } + } + }, + "ObjectId": { + "id": "ObjectId", + "description": "This is a copy of the tech.blob.ObjectId proto, which could not be used directly here due to transitive closure issues with JavaScript support; see http://b/8801763.", + "type": "object", + "properties": { + "bucketName": { + "description": "The name of the bucket to which this object belongs.", + "type": "string" + }, + "objectName": { + "description": "The name of the object.", + "type": "string" + }, + "generation": { + "description": "Generation of the object. Generations are monotonically increasing across writes, allowing them to be be compared to determine which generation is newer. If this is omitted in a request, then you are requesting the live object. See http://go/bigstore-versions", + "type": "string", + "format": "int64" + } + } + }, + "Blobstore2Info": { + "id": "Blobstore2Info", + "description": "Information to read/write to blobstore2.", + "type": "object", + "properties": { + "blobId": { + "description": "The blob id, e.g., /blobstore/prod/playground/scotty", + "type": "string" + }, + "blobGeneration": { + "description": "The blob generation id.", + "type": "string", + "format": "int64" + }, + "readToken": { + "description": "The blob read token. Needed to read blobs that have not been replicated. Might not be available until the final call.", + "type": "string" + }, + "uploadMetadataContainer": { + "description": "Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a signed, serialized blobstore2.BlobMetadataContainer proto which must never be consumed outside of Bigstore, and is not applicable to non-GCS media uploads.", + "type": "string", + "format": "byte" + }, + "downloadReadHandle": { + "description": "Read handle passed from Bigstore -> Scotty for a GCS download. This is a signed, serialized blobstore2.ReadHandle proto which must never be set outside of Bigstore, and is not applicable to non-GCS media downloads.", + "type": "string", + "format": "byte" + }, + "downloadExternalReadToken": { + "description": "A serialized External Read Token passed from Bigstore -> Scotty for a GCS download. This field must never be consumed outside of Bigstore, and is not applicable to non-GCS media uploads.", + "type": "string", + "format": "byte" + }, + "uploadFragmentListCreationInfo": { + "description": "A serialized Object Fragment List Creation Info passed from Bigstore -> Scotty for a GCS upload. This field must never be consumed outside of Bigstore, and is not applicable to non-GCS media uploads.", + "type": "string", + "format": "byte" + } + } + }, + "DiffVersionResponse": { + "id": "DiffVersionResponse", + "description": "Backend response for a Diff get version response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", + "type": "object", + "properties": { + "objectVersion": { + "description": "The version of the object stored at the server.", + "type": "string" + }, + "objectSizeBytes": { + "description": "The total size of the server object.", + "type": "string", + "format": "int64" + } + } + }, + "DiffChecksumsResponse": { + "id": "DiffChecksumsResponse", + "description": "Backend response for a Diff get checksums response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", + "type": "object", + "properties": { + "objectVersion": { + "description": "The object version of the object the checksums are being returned for.", + "type": "string" + }, + "objectSizeBytes": { + "description": "The total size of the server object.", + "type": "string", + "format": "int64" + }, + "chunkSizeBytes": { + "description": "The chunk size of checksums. Must be a multiple of 256KB.", + "type": "string", + "format": "int64" + }, + "checksumsLocation": { + "description": "Exactly one of these fields must be populated. If checksums_location is filled, the server will return the corresponding contents to the user. If object_location is filled, the server will calculate the checksums based on the content there and return that to the user. For details on the format of the checksums, see http://go/scotty-diff-protocol.", + "$ref": "CompositeMedia" + }, + "objectLocation": { + "description": "If set, calculate the checksums based on the contents and return them to the caller.", + "$ref": "CompositeMedia" + } + } + }, + "DiffDownloadResponse": { + "id": "DiffDownloadResponse", + "description": "Backend response for a Diff download response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", + "type": "object", + "properties": { + "objectLocation": { + "description": "The original object location.", + "$ref": "CompositeMedia" + } + } + }, + "DiffUploadRequest": { + "id": "DiffUploadRequest", + "description": "A Diff upload request. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", + "type": "object", + "properties": { + "objectVersion": { + "description": "The object version of the object that is the base version the incoming diff script will be applied to. This field will always be filled in.", + "type": "string" + }, + "objectInfo": { + "description": "The location of the new object. Agents must clone the object located here, as the upload server will delete the contents once a response is received.", + "$ref": "CompositeMedia" + }, + "checksumsInfo": { + "description": "The location of the checksums for the new object. Agents must clone the object located here, as the upload server will delete the contents once a response is received. For details on the format of the checksums, see http://go/scotty-diff-protocol.", + "$ref": "CompositeMedia" + } + } + }, + "DiffUploadResponse": { + "id": "DiffUploadResponse", + "description": "Backend response for a Diff upload request. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", + "type": "object", + "properties": { + "objectVersion": { + "description": "The object version of the object at the server. Must be included in the end notification response. The version in the end notification response must correspond to the new version of the object that is now stored at the server, after the upload.", + "type": "string" + }, + "originalObject": { + "description": "The location of the original file for a diff upload request. Must be filled in if responding to an upload start notification.", + "$ref": "CompositeMedia" + } + } + }, + "ContentTypeInfo": { + "id": "ContentTypeInfo", + "description": "Detailed Content-Type information from Scotty. The Content-Type of the media will typically be filled in by the header or Scotty's best_guess, but this extended information provides the backend with more information so that it can make a better decision if needed. This is only used on media upload requests from Scotty.", + "type": "object", + "properties": { + "bestGuess": { + "description": "Scotty's best guess of what the content type of the file is.", + "type": "string" + }, + "fromHeader": { + "description": "The content type of the file as specified in the request headers, multipart headers, or RUPIO start request.", + "type": "string" + }, + "fromFileName": { + "description": "The content type of the file derived from the file extension of the original file name used by the client.", + "type": "string" + }, + "fromUrlPath": { + "description": "The content type of the file derived from the file extension of the URL path. The URL path is assumed to represent a file name (which is typically only true for agents that are providing a REST API).", + "type": "string" + }, + "fromBytes": { + "description": "The content type of the file derived by looking at specific bytes (i.e. \"magic bytes\") of the actual file.", + "type": "string" + }, + "fromFusionId": { + "description": "The content type of the file detected by Fusion ID. go/fusionid", + "type": "string" + }, + "fusionIdDetectionMetadata": { + "description": "Metadata information from Fusion ID detection. Serialized FusionIdDetectionMetadata proto. Only set if from_fusion_id is set.", + "type": "string", + "format": "byte" + } + } + }, + "DownloadParameters": { + "id": "DownloadParameters", + "description": "Parameters specific to media downloads.", + "type": "object", + "properties": { + "allowGzipCompression": { + "description": "A boolean to be returned in the response to Scotty. Allows/disallows gzip encoding of the payload content when the server thinks it's advantageous (hence, does not guarantee compression) which allows Scotty to GZip the response to the client.", + "type": "boolean" + }, + "ignoreRange": { + "description": "Determining whether or not Apiary should skip the inclusion of any Content-Range header on its response to Scotty.", + "type": "boolean" + } + } + }, + "GenerateTextRequest": { + "id": "GenerateTextRequest", + "description": "Request to generate a text completion response from the model.", + "type": "object", + "properties": { + "prompt": { + "description": "Required. The free-form input text given to the model as a prompt. Given a prompt, the model will generate a TextCompletion response it predicts as the completion of the input text.", + "$ref": "TextPrompt" + }, + "temperature": { + "description": "Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned the `getModel` function. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model.", + "type": "number", + "format": "float" + }, + "candidateCount": { + "description": "Optional. Number of generated responses to return. This value must be between [1, 8], inclusive. If unset, this will default to 1.", + "type": "integer", + "format": "int32" + }, + "maxOutputTokens": { + "description": "Optional. The maximum number of tokens to include in a candidate. If unset, this will default to output_token_limit specified in the `Model` specification.", + "type": "integer", + "format": "int32" + }, + "topP": { + "description": "Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits number of tokens based on the cumulative probability. Note: The default value varies by model, see the `Model.top_p` attribute of the `Model` returned the `getModel` function.", + "type": "number", + "format": "float" + }, + "topK": { + "description": "Optional. The maximum number of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Defaults to 40. Note: The default value varies by model, see the `Model.top_k` attribute of the `Model` returned the `getModel` function.", + "type": "integer", + "format": "int32" + }, + "safetySettings": { + "description": "Optional. A list of unique `SafetySetting` instances for blocking unsafe content. that will be enforced on the `GenerateTextRequest.prompt` and `GenerateTextResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any prompts and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_DEROGATORY, HARM_CATEGORY_TOXICITY, HARM_CATEGORY_VIOLENCE, HARM_CATEGORY_SEXUAL, HARM_CATEGORY_MEDICAL, HARM_CATEGORY_DANGEROUS are supported in text service.", + "type": "array", + "items": { + "$ref": "SafetySetting" + } + }, + "stopSequences": { + "description": "The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a stop sequence. The stop sequence will not be included as part of the response.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "TextPrompt": { + "id": "TextPrompt", + "description": "Text given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion.", + "type": "object", + "properties": { + "text": { + "description": "Required. The prompt text.", + "type": "string" + } + } + }, + "GenerateTextResponse": { + "id": "GenerateTextResponse", + "description": "The response from the model, including candidate completions.", + "type": "object", + "properties": { + "candidates": { + "description": "Candidate responses from the model.", + "type": "array", + "items": { + "$ref": "TextCompletion" + } + }, + "filters": { + "description": "A set of content filtering metadata for the prompt and response text. This indicates which `SafetyCategory`(s) blocked a candidate from this response, the lowest `HarmProbability` that triggered a block, and the HarmThreshold setting for that category. This indicates the smallest change to the `SafetySettings` that would be necessary to unblock at least 1 response. The blocking is configured by the `SafetySettings` in the request (or the default `SafetySettings` of the API).", + "type": "array", + "items": { + "$ref": "ContentFilter" + } + }, + "safetyFeedback": { + "description": "Returns any safety feedback related to content filtering.", + "type": "array", + "items": { + "$ref": "SafetyFeedback" + } + } + } + }, + "TextCompletion": { + "id": "TextCompletion", + "description": "Output text returned from a model.", + "type": "object", + "properties": { + "output": { + "description": "Output only. The generated text returned from the model.", + "readOnly": true, + "type": "string" + }, + "safetyRatings": { + "description": "Ratings for the safety of a response. There is at most one rating per category.", + "type": "array", + "items": { + "$ref": "SafetyRating" + } + }, + "citationMetadata": { + "description": "Output only. Citation information for model-generated `output` in this `TextCompletion`. This field may be populated with attribution information for any text included in the `output`.", + "readOnly": true, + "$ref": "CitationMetadata" + } + } + }, + "SafetyFeedback": { + "id": "SafetyFeedback", + "description": "Safety feedback for an entire request. This field is populated if content in the input and/or response is blocked due to safety settings. SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback will return the safety settings used by the request as well as the lowest HarmProbability that should be allowed in order to return a result.", + "type": "object", + "properties": { + "rating": { + "description": "Safety rating evaluated from content.", + "$ref": "SafetyRating" + }, + "setting": { + "description": "Safety settings applied to the request.", + "$ref": "SafetySetting" + } + } + }, + "EmbedTextRequest": { + "id": "EmbedTextRequest", + "description": "Request to get a text embedding from the model.", + "type": "object", + "properties": { + "model": { + "description": "Required. The model name to use with the format model=models/{model}.", + "type": "string" + }, + "text": { + "description": "Optional. The free-form input text that the model will turn into an embedding.", + "type": "string" + } + } + }, + "EmbedTextResponse": { + "id": "EmbedTextResponse", + "description": "The response to a EmbedTextRequest.", + "type": "object", + "properties": { + "embedding": { + "description": "Output only. The embedding generated from the input text.", + "readOnly": true, + "$ref": "Embedding" + } + } + }, + "Embedding": { + "id": "Embedding", + "description": "A list of floats representing the embedding.", + "type": "object", + "properties": { + "value": { + "description": "The embedding values.", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "BatchEmbedTextRequest": { + "id": "BatchEmbedTextRequest", + "description": "Batch request to get a text embedding from the model.", + "type": "object", + "properties": { + "texts": { + "description": "Optional. The free-form input texts that the model will turn into an embedding. The current limit is 100 texts, over which an error will be thrown.", + "type": "array", + "items": { + "type": "string" + } + }, + "requests": { + "description": "Optional. Embed requests for the batch. Only one of `texts` or `requests` can be set.", + "type": "array", + "items": { + "$ref": "EmbedTextRequest" + } + } + } + }, + "BatchEmbedTextResponse": { + "id": "BatchEmbedTextResponse", + "description": "The response to a EmbedTextRequest.", + "type": "object", + "properties": { + "embeddings": { + "description": "Output only. The embeddings generated from the input text.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "Embedding" + } + } + } + }, + "CountTextTokensRequest": { + "id": "CountTextTokensRequest", + "description": "Counts the number of tokens in the `prompt` sent to a model. Models may tokenize text differently, so each model may return a different `token_count`.", + "type": "object", + "properties": { + "prompt": { + "description": "Required. The free-form input text given to the model as a prompt.", + "$ref": "TextPrompt" + } + } + }, + "CountTextTokensResponse": { + "id": "CountTextTokensResponse", + "description": "A response from `CountTextTokens`. It returns the model's `token_count` for the `prompt`.", + "type": "object", + "properties": { + "tokenCount": { + "description": "The number of tokens that the `model` tokenizes the `prompt` into. Always non-negative.", + "type": "integer", + "format": "int32" + } + } + } + }, + "batchPath": "batch", + "name": "generativelanguage", + "mtlsRootUrl": "https://generativelanguage.mtls.googleapis.com/", + "description": "The Gemini API allows developers to build generative AI applications using Gemini models. Gemini is our most capable model, built from the ground up to be multimodal. It can generalize and seamlessly understand, operate across, and combine different types of information including language, images, audio, video, and code. You can use the Gemini API for use cases like reasoning across text and images, content generation, dialogue agents, summarization and classification systems, and more.", + "documentationLink": "https://developers.generativeai.google/api", + "version_module": true, + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/devstorage.read_only": { + "description": "View your data in Google Cloud Storage" + } + } + } + }, + "revision": "20260521", + "rootUrl": "https://generativelanguage.googleapis.com/", + "discoveryVersion": "v1", + "ownerName": "Google", + "parameters": { + "access_token": { + "type": "string", + "description": "OAuth access token.", + "location": "query" + }, + "alt": { + "type": "string", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "callback": { + "type": "string", + "description": "JSONP", + "location": "query" + }, + "fields": { + "type": "string", + "description": "Selector specifying which fields to include in a partial response.", + "location": "query" + }, + "key": { + "type": "string", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query" + }, + "oauth_token": { + "type": "string", + "description": "OAuth 2.0 token for the current user.", + "location": "query" + }, + "prettyPrint": { + "type": "boolean", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "location": "query" + }, + "quotaUser": { + "type": "string", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query" + }, + "upload_protocol": { + "type": "string", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query" + }, + "uploadType": { + "type": "string", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query" + }, + "$.xgafv": { + "type": "string", + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "baseUrl": "https://generativelanguage.googleapis.com/", + "kind": "discovery#restDescription", + "servicePath": "", + "title": "Gemini API", + "protocol": "rest", + "version": "v1beta" +} \ No newline at end of file diff --git a/packages/typescript/ai-schemas/scripts/specs/gemini/gemini.openapi.json b/packages/typescript/ai-schemas/scripts/specs/gemini/gemini.openapi.json new file mode 100644 index 000000000..9fafeac09 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/specs/gemini/gemini.openapi.json @@ -0,0 +1,7565 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "Gemini API", + "version": "v1beta" + }, + "servers": [ + { + "url": "https://generativelanguage.googleapis.com" + } + ], + "paths": { + "/v1beta/batches": { + "get": { + "operationId": "generativelanguage.batches.list", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation's parent resource." + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The standard list filter." + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "The standard list page size." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The standard list page token." + }, + { + "name": "returnPartialSuccess", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOperationsResponse" + } + } + } + } + } + } + }, + "/v1beta/batches/{batchesId}": { + "get": { + "operationId": "generativelanguage.batches.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation resource." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + } + }, + "delete": { + "operationId": "generativelanguage.batches.delete", + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation resource to be deleted." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1beta/batches/{batchesId}:cancel": { + "post": { + "operationId": "generativelanguage.batches.cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation resource to be cancelled." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1beta/batches/{batchesId}:updateGenerateContentBatch": { + "patch": { + "operationId": "generativelanguage.batches.updateGenerateContentBatch", + "description": "Updates a batch of GenerateContent requests for batch processing.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`." + }, + { + "name": "updateMask", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. The list of fields to update." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentBatch" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentBatch" + } + } + } + } + } + }, + "/v1beta/batches/{batchesId}:updateEmbedContentBatch": { + "patch": { + "operationId": "generativelanguage.batches.updateEmbedContentBatch", + "description": "Updates a batch of EmbedContent requests for batch processing.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`." + }, + { + "name": "updateMask", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. The list of fields to update." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmbedContentBatch" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmbedContentBatch" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:generateContent": { + "post": { + "operationId": "generativelanguage.models.generateContent", + "description": "Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:generateAnswer": { + "post": { + "operationId": "generativelanguage.models.generateAnswer", + "description": "Generates a grounded answer from the model given an input `GenerateAnswerRequest`.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the grounded response. Format: `model=models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateAnswerResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateAnswerRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:streamGenerateContent": { + "post": { + "operationId": "generativelanguage.models.streamGenerateContent", + "description": "Generates a [streamed response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream) from the model given an input `GenerateContentRequest`.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:embedContent": { + "post": { + "operationId": "generativelanguage.models.embedContent", + "description": "Generates a text embedding vector from the input `Content` using the specified [Gemini Embedding model](https://ai.google.dev/gemini-api/docs/models/gemini#text-embedding).", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmbedContentResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmbedContentRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:batchEmbedContents": { + "post": { + "operationId": "generativelanguage.models.batchEmbedContents", + "description": "Generates multiple embedding vectors from the input `Content` which consists of a batch of strings represented as `EmbedContentRequest` objects.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchEmbedContentsResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchEmbedContentsRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:countTokens": { + "post": { + "operationId": "generativelanguage.models.countTokens", + "description": "Runs a model's tokenizer on input `Content` and returns the token count. Refer to the [tokens guide](https://ai.google.dev/gemini-api/docs/tokens) to learn more about tokens.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountTokensResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountTokensRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:batchGenerateContent": { + "post": { + "operationId": "generativelanguage.models.batchGenerateContent", + "description": "Enqueues a batch of `GenerateContent` requests for batch processing.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchGenerateContentRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:asyncBatchEmbedContent": { + "post": { + "operationId": "generativelanguage.models.asyncBatchEmbedContent", + "description": "Enqueues a batch of `EmbedContent` requests for batch processing. We have a `BatchEmbedContents` handler in `GenerativeService`, but it was synchronized. So we name this one to be `Async` to avoid confusion.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncBatchEmbedContentRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:generateMessage": { + "post": { + "operationId": "generativelanguage.models.generateMessage", + "description": "Generates a response from the model given an input `MessagePrompt`.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the model to use. Format: `name=models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateMessageResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateMessageRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:countMessageTokens": { + "post": { + "operationId": "generativelanguage.models.countMessageTokens", + "description": "Runs a model's tokenizer on a string and returns the token count.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountMessageTokensResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountMessageTokensRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}": { + "get": { + "operationId": "generativelanguage.models.get", + "description": "Gets information about a specific `Model` such as its version number, token limits, [parameters](https://ai.google.dev/gemini-api/docs/models/generative-models#model-parameters) and other metadata. Refer to the [Gemini models guide](https://ai.google.dev/gemini-api/docs/models/gemini) for detailed model information.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the model. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Model" + } + } + } + } + } + } + }, + "/v1beta/models": { + "get": { + "operationId": "generativelanguage.models.list", + "description": "Lists the [`Model`s](https://ai.google.dev/gemini-api/docs/models/gemini) available through the Gemini API.", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "The maximum number of `Models` to return (per page). If unspecified, 50 models will be returned per page. This method returns at most 1000 models per page, even if you pass a larger page_size." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "A page token, received from a previous `ListModels` call. Provide the `page_token` returned by one request as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListModels` must match the call that provided the page token." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListModelsResponse" + } + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:predict": { + "post": { + "operationId": "generativelanguage.models.predict", + "description": "Performs a prediction request.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the model for prediction. Format: `name=models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PredictResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PredictRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:predictLongRunning": { + "post": { + "operationId": "generativelanguage.models.predictLongRunning", + "description": "Same as Predict but returns an LRO.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the model for prediction. Format: `name=models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PredictLongRunningRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:generateText": { + "post": { + "operationId": "generativelanguage.models.generateText", + "description": "Generates a response from the model given an input message.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` or `TunedModel` to use for generating the completion. Examples: models/text-bison-001 tunedModels/sentence-translator-u3b7m" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateTextResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateTextRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:embedText": { + "post": { + "operationId": "generativelanguage.models.embedText", + "description": "Generates an embedding from the model given an input message.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The model name to use with the format model=models/{model}." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmbedTextResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmbedTextRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:batchEmbedText": { + "post": { + "operationId": "generativelanguage.models.batchEmbedText", + "description": "Generates multiple embeddings from the model given input text in a synchronous call.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the embedding. Examples: models/embedding-gecko-001" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchEmbedTextResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchEmbedTextRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}:countTextTokens": { + "post": { + "operationId": "generativelanguage.models.countTextTokens", + "description": "Runs a model's tokenizer on a text and returns the token count.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountTextTokensResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountTextTokensRequest" + } + } + } + } + } + }, + "/v1beta/models/{modelsId}/operations": { + "get": { + "operationId": "generativelanguage.models.operations.list", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation's parent resource." + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The standard list filter." + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "The standard list page size." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The standard list page token." + }, + { + "name": "returnPartialSuccess", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOperationsResponse" + } + } + } + } + } + } + }, + "/v1beta/models/{modelsId}/operations/{operationsId}": { + "get": { + "operationId": "generativelanguage.models.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation resource." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}:generateContent": { + "post": { + "operationId": "generativelanguage.tunedModels.generateContent", + "description": "Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentRequest" + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}:streamGenerateContent": { + "post": { + "operationId": "generativelanguage.tunedModels.streamGenerateContent", + "description": "Generates a [streamed response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream) from the model given an input `GenerateContentRequest`.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentRequest" + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}:batchGenerateContent": { + "post": { + "operationId": "generativelanguage.tunedModels.batchGenerateContent", + "description": "Enqueues a batch of `GenerateContent` requests for batch processing.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchGenerateContentRequest" + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}:asyncBatchEmbedContent": { + "post": { + "operationId": "generativelanguage.tunedModels.asyncBatchEmbedContent", + "description": "Enqueues a batch of `EmbedContent` requests for batch processing. We have a `BatchEmbedContents` handler in `GenerativeService`, but it was synchronized. So we name this one to be `Async` to avoid confusion.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncBatchEmbedContentRequest" + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}": { + "get": { + "operationId": "generativelanguage.tunedModels.get", + "description": "Gets information about a specific TunedModel.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the model. Format: `tunedModels/my-model-id`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TunedModel" + } + } + } + } + } + }, + "patch": { + "operationId": "generativelanguage.tunedModels.patch", + "description": "Updates a tuned model.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Output only. The tuned model name. A unique name will be generated on create. Example: `tunedModels/az2mb0bpw6i` If display_name is set on create, the id portion of the name will be set by concatenating the words of the display_name with hyphens and adding a random portion for uniqueness. Example: * display_name = `Sentence Translator` * name = `tunedModels/sentence-translator-u3b7m`" + }, + { + "name": "updateMask", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. The list of fields to update." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TunedModel" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TunedModel" + } + } + } + } + }, + "delete": { + "operationId": "generativelanguage.tunedModels.delete", + "description": "Deletes a tuned model.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the model. Format: `tunedModels/my-model-id`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1beta/tunedModels": { + "get": { + "operationId": "generativelanguage.tunedModels.list", + "description": "Lists created tuned models.", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "Optional. The maximum number of `TunedModels` to return (per page). The service may return fewer tuned models. If unspecified, at most 10 tuned models will be returned. This method returns at most 1000 models per page, even if you pass a larger page_size." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. A page token, received from a previous `ListTunedModels` call. Provide the `page_token` returned by one request as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListTunedModels` must match the call that provided the page token." + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. A filter is a full text search over the tuned model's description and display name. By default, results will not include tuned models shared with everyone. Additional operators: - owner:me - writers:me - readers:me - readers:everyone Examples: \"owner:me\" returns all tuned models to which caller has owner role \"readers:me\" returns all tuned models to which caller has reader role \"readers:everyone\" returns all tuned models that are shared with everyone" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListTunedModelsResponse" + } + } + } + } + } + }, + "post": { + "operationId": "generativelanguage.tunedModels.create", + "description": "Creates a tuned model. Check intermediate tuning progress (if any) through the [google.longrunning.Operations] service. Access status and results through the Operations service. Example: GET /v1/tunedModels/az2mb0bpw6i/operations/000-111-222", + "parameters": [ + { + "name": "tunedModelId", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. The unique id for the tuned model if specified. This value should be up to 40 characters, the first character must be a letter, the last could be a letter or a number. The id must match the regular expression: `[a-z]([a-z0-9-]{0,38}[a-z0-9])?`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TunedModel" + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}:transferOwnership": { + "post": { + "operationId": "generativelanguage.tunedModels.transferOwnership", + "description": "Transfers ownership of the tuned model. This is the only way to change ownership of the tuned model. The current owner will be downgraded to writer role.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the tuned model to transfer ownership. Format: `tunedModels/my-model-id`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransferOwnershipResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransferOwnershipRequest" + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}:generateText": { + "post": { + "operationId": "generativelanguage.tunedModels.generateText", + "description": "Generates a response from the model given an input message.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` or `TunedModel` to use for generating the completion. Examples: models/text-bison-001 tunedModels/sentence-translator-u3b7m" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateTextResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateTextRequest" + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}/operations": { + "get": { + "operationId": "generativelanguage.tunedModels.operations.list", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation's parent resource." + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The standard list filter." + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "The standard list page size." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The standard list page token." + }, + { + "name": "returnPartialSuccess", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOperationsResponse" + } + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}/operations/{operationsId}": { + "get": { + "operationId": "generativelanguage.tunedModels.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation resource." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}/permissions": { + "post": { + "operationId": "generativelanguage.tunedModels.permissions.create", + "description": "Create a permission to a specific resource.", + "parameters": [ + { + "name": "parent", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The parent resource of the `Permission`. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Permission" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Permission" + } + } + } + } + }, + "get": { + "operationId": "generativelanguage.tunedModels.permissions.list", + "description": "Lists permissions for the specific resource.", + "parameters": [ + { + "name": "parent", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The parent resource of the permissions. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`" + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "Optional. The maximum number of `Permission`s to return (per page). The service may return fewer permissions. If unspecified, at most 10 permissions will be returned. This method returns at most 1000 permissions per page, even if you pass larger page_size." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. A page token, received from a previous `ListPermissions` call. Provide the `page_token` returned by one request as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListPermissions` must match the call that provided the page token." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListPermissionsResponse" + } + } + } + } + } + } + }, + "/v1beta/tunedModels/{tunedModelsId}/permissions/{permissionsId}": { + "get": { + "operationId": "generativelanguage.tunedModels.permissions.get", + "description": "Gets information about a specific Permission.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Permission" + } + } + } + } + } + }, + "patch": { + "operationId": "generativelanguage.tunedModels.permissions.patch", + "description": "Updates the permission.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only." + }, + { + "name": "updateMask", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Required. The list of fields to update. Accepted ones: - role (`Permission.role` field)" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Permission" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Permission" + } + } + } + } + }, + "delete": { + "operationId": "generativelanguage.tunedModels.permissions.delete", + "description": "Deletes the permission.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1beta/dynamic/{dynamicId}:generateContent": { + "post": { + "operationId": "generativelanguage.dynamic.generateContent", + "description": "Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentRequest" + } + } + } + } + } + }, + "/v1beta/dynamic/{dynamicId}:streamGenerateContent": { + "post": { + "operationId": "generativelanguage.dynamic.streamGenerateContent", + "description": "Generates a [streamed response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream) from the model given an input `GenerateContentRequest`.", + "parameters": [ + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateContentRequest" + } + } + } + } + } + }, + "/v1beta/cachedContents": { + "get": { + "operationId": "generativelanguage.cachedContents.list", + "description": "Lists CachedContents.", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "Optional. The maximum number of cached contents to return. The service may return fewer than this value. If unspecified, some default (under maximum) number of items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. A page token, received from a previous `ListCachedContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCachedContents` must match the call that provided the page token." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCachedContentsResponse" + } + } + } + } + } + }, + "post": { + "operationId": "generativelanguage.cachedContents.create", + "description": "Creates CachedContent resource.", + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CachedContent" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CachedContent" + } + } + } + } + } + }, + "/v1beta/cachedContents/{cachedContentsId}": { + "get": { + "operationId": "generativelanguage.cachedContents.get", + "description": "Reads CachedContent resource.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name referring to the content cache entry. Format: `cachedContents/{id}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CachedContent" + } + } + } + } + } + }, + "patch": { + "operationId": "generativelanguage.cachedContents.patch", + "description": "Updates CachedContent resource (only expiration is updatable).", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Output only. Identifier. The resource name referring to the cached content. Format: `cachedContents/{id}`" + }, + { + "name": "updateMask", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The list of fields to update." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CachedContent" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CachedContent" + } + } + } + } + }, + "delete": { + "operationId": "generativelanguage.cachedContents.delete", + "description": "Deletes CachedContent resource.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name referring to the content cache entry Format: `cachedContents/{id}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1beta/files": { + "post": { + "operationId": "generativelanguage.media.upload", + "description": "Creates a `File`.", + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFileResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFileRequest" + } + } + } + } + }, + "get": { + "operationId": "generativelanguage.files.list", + "description": "Lists the metadata for `File`s owned by the requesting project.", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "Optional. Maximum number of `File`s to return per page. If unspecified, defaults to 10. Maximum `page_size` is 100." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. A page token from a previous `ListFiles` call." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFilesResponse" + } + } + } + } + } + } + }, + "/v1beta/fileSearchStores/{fileSearchStoresId}:uploadToFileSearchStore": { + "post": { + "operationId": "generativelanguage.media.uploadToFileSearchStore", + "description": "Uploads data to a FileSearchStore, preprocesses and chunks before storing it in a FileSearchStore Document.", + "parameters": [ + { + "name": "fileSearchStoreName", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. Immutable. The name of the `FileSearchStore` to upload the file into. Example: `fileSearchStores/my-file-search-store-123`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomLongRunningOperation" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadToFileSearchStoreRequest" + } + } + } + } + } + }, + "/v1beta/files:register": { + "post": { + "operationId": "generativelanguage.files.register", + "description": "Registers a Google Cloud Storage files with FileService. The user is expected to provide Google Cloud Storage URIs and will receive a File resource for each URI in return. Note that the files are not copied, just registered with File API. If one file fails to register, the whole request fails.", + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterFilesResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterFilesRequest" + } + } + } + } + } + }, + "/v1beta/files/{filesId}": { + "get": { + "operationId": "generativelanguage.files.get", + "description": "Gets the metadata for the given `File`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `File` to get. Example: `files/abc-123`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/File" + } + } + } + } + } + }, + "delete": { + "operationId": "generativelanguage.files.delete", + "description": "Deletes the `File`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `File` to delete. Example: `files/abc-123`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1beta/generatedFiles": { + "get": { + "operationId": "generativelanguage.generatedFiles.list", + "description": "Lists the generated files owned by the requesting project.", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "Optional. Maximum number of `GeneratedFile`s to return per page. If unspecified, defaults to 10. Maximum `page_size` is 50." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. A page token from a previous `ListGeneratedFiles` call." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListGeneratedFilesResponse" + } + } + } + } + } + } + }, + "/v1beta/generatedFiles/{generatedFilesId}/operations/{operationsId}": { + "get": { + "operationId": "generativelanguage.generatedFiles.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation resource." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + } + } + }, + "/v1beta/fileSearchStores": { + "post": { + "operationId": "generativelanguage.fileSearchStores.create", + "description": "Creates an empty `FileSearchStore`.", + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileSearchStore" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileSearchStore" + } + } + } + } + }, + "get": { + "operationId": "generativelanguage.fileSearchStores.list", + "description": "Lists all `FileSearchStores` owned by the user.", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "Optional. The maximum number of `FileSearchStores` to return (per page). The service may return fewer `FileSearchStores`. If unspecified, at most 10 `FileSearchStores` will be returned. The maximum size limit is 20 `FileSearchStores` per page." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. A page token, received from a previous `ListFileSearchStores` call. Provide the `next_page_token` returned in the response as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListFileSearchStores` must match the call that provided the page token." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFileSearchStoresResponse" + } + } + } + } + } + } + }, + "/v1beta/fileSearchStores/{fileSearchStoresId}": { + "get": { + "operationId": "generativelanguage.fileSearchStores.get", + "description": "Gets information about a specific `FileSearchStore`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `FileSearchStore`. Example: `fileSearchStores/my-file-search-store-123`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileSearchStore" + } + } + } + } + } + }, + "delete": { + "operationId": "generativelanguage.fileSearchStores.delete", + "description": "Deletes a `FileSearchStore`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the `FileSearchStore`. Example: `fileSearchStores/my-file-search-store-123`" + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Optional. If set to true, any `Document`s and objects related to this `FileSearchStore` will also be deleted. If false (the default), a `FAILED_PRECONDITION` error will be returned if `FileSearchStore` contains any `Document`s." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1beta/fileSearchStores/{fileSearchStoresId}:importFile": { + "post": { + "operationId": "generativelanguage.fileSearchStores.importFile", + "description": "Imports a `File` from File Service to a `FileSearchStore`.", + "parameters": [ + { + "name": "fileSearchStoreName", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. Immutable. The name of the `FileSearchStore` to import the file into. Example: `fileSearchStores/my-file-search-store-123`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportFileRequest" + } + } + } + } + } + }, + "/v1beta/fileSearchStores/{fileSearchStoresId}/operations/{operationsId}": { + "get": { + "operationId": "generativelanguage.fileSearchStores.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation resource." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + } + } + }, + "/v1beta/fileSearchStores/{fileSearchStoresId}/upload/operations/{operationsId}": { + "get": { + "operationId": "generativelanguage.fileSearchStores.upload.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation resource." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + } + } + }, + "/v1beta/fileSearchStores/{fileSearchStoresId}/documents/{documentsId}": { + "get": { + "operationId": "generativelanguage.fileSearchStores.documents.get", + "description": "Gets information about a specific `Document`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Document` to retrieve. Example: `fileSearchStores/my-file-search-store-123/documents/the-doc-abc`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + } + } + }, + "delete": { + "operationId": "generativelanguage.fileSearchStores.documents.delete", + "description": "Deletes a `Document`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the `Document` to delete. Example: `fileSearchStores/my-file-search-store-123/documents/the-doc-abc`" + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Optional. If set to true, any `Chunk`s and objects related to this `Document` will also be deleted. If false (the default), a `FAILED_PRECONDITION` error will be returned if `Document` contains any `Chunk`s." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1beta/fileSearchStores/{fileSearchStoresId}/documents": { + "get": { + "operationId": "generativelanguage.fileSearchStores.documents.list", + "description": "Lists all `Document`s in a `Corpus`.", + "parameters": [ + { + "name": "parent", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `FileSearchStore` containing `Document`s. Example: `fileSearchStores/my-file-search-store-123`" + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "Optional. The maximum number of `Document`s to return (per page). The service may return fewer `Document`s. If unspecified, at most 10 `Document`s will be returned. The maximum size limit is 20 `Document`s per page." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. A page token, received from a previous `ListDocuments` call. Provide the `next_page_token` returned in the response as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListDocuments` must match the call that provided the page token." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListDocumentsResponse" + } + } + } + } + } + } + }, + "/v1beta/corpora": { + "post": { + "operationId": "generativelanguage.corpora.create", + "description": "Creates an empty `Corpus`.", + "parameters": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Corpus" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Corpus" + } + } + } + } + }, + "get": { + "operationId": "generativelanguage.corpora.list", + "description": "Lists all `Corpora` owned by the user.", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "Optional. The maximum number of `Corpora` to return (per page). The service may return fewer `Corpora`. If unspecified, at most 10 `Corpora` will be returned. The maximum size limit is 20 `Corpora` per page." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. A page token, received from a previous `ListCorpora` call. Provide the `next_page_token` returned in the response as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListCorpora` must match the call that provided the page token." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCorporaResponse" + } + } + } + } + } + } + }, + "/v1beta/corpora/{corporaId}": { + "get": { + "operationId": "generativelanguage.corpora.get", + "description": "Gets information about a specific `Corpus`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The name of the `Corpus`. Example: `corpora/my-corpus-123`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Corpus" + } + } + } + } + } + }, + "delete": { + "operationId": "generativelanguage.corpora.delete", + "description": "Deletes a `Corpus`.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the `Corpus`. Example: `corpora/my-corpus-123`" + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Optional. If set to true, any `Document`s and objects related to this `Corpus` will also be deleted. If false (the default), a `FAILED_PRECONDITION` error will be returned if `Corpus` contains any `Document`s." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1beta/corpora/{corporaId}/operations/{operationsId}": { + "get": { + "operationId": "generativelanguage.corpora.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The name of the operation resource." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + } + } + }, + "/v1beta/corpora/{corporaId}/permissions": { + "post": { + "operationId": "generativelanguage.corpora.permissions.create", + "description": "Create a permission to a specific resource.", + "parameters": [ + { + "name": "parent", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The parent resource of the `Permission`. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Permission" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Permission" + } + } + } + } + }, + "get": { + "operationId": "generativelanguage.corpora.permissions.list", + "description": "Lists permissions for the specific resource.", + "parameters": [ + { + "name": "parent", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The parent resource of the permissions. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`" + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "Optional. The maximum number of `Permission`s to return (per page). The service may return fewer permissions. If unspecified, at most 10 permissions will be returned. This method returns at most 1000 permissions per page, even if you pass larger page_size." + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Optional. A page token, received from a previous `ListPermissions` call. Provide the `page_token` returned by one request as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListPermissions` must match the call that provided the page token." + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListPermissionsResponse" + } + } + } + } + } + } + }, + "/v1beta/corpora/{corporaId}/permissions/{permissionsId}": { + "get": { + "operationId": "generativelanguage.corpora.permissions.get", + "description": "Gets information about a specific Permission.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Permission" + } + } + } + } + } + }, + "patch": { + "operationId": "generativelanguage.corpora.permissions.patch", + "description": "Updates the permission.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only." + }, + { + "name": "updateMask", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Required. The list of fields to update. Accepted ones: - role (`Permission.role` field)" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Permission" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Permission" + } + } + } + } + }, + "delete": { + "operationId": "generativelanguage.corpora.permissions.delete", + "description": "Deletes the permission.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ListOperationsResponse": { + "type": "object", + "description": "The response message for Operations.ListOperations.", + "properties": { + "operations": { + "type": "array", + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "#/components/schemas/Operation" + } + }, + "nextPageToken": { + "type": "string", + "description": "The standard List next-page token." + }, + "unreachable": { + "type": "array", + "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.", + "items": { + "type": "string" + } + } + } + }, + "Operation": { + "type": "object", + "description": "This resource represents a long-running operation that is the result of a network API call.", + "properties": { + "name": { + "type": "string", + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`." + }, + "metadata": { + "type": "object", + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + }, + "done": { + "type": "boolean", + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available." + }, + "error": { + "$ref": "#/components/schemas/Status" + }, + "response": { + "type": "object", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + }, + "Status": { + "type": "object", + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code." + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." + }, + "details": { + "type": "array", + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + } + }, + "Empty": { + "type": "object", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "properties": {} + }, + "GenerateContentRequest": { + "type": "object", + "description": "Request to generate a completion from the model.", + "properties": { + "model": { + "type": "string", + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + }, + "systemInstruction": { + "$ref": "#/components/schemas/Content" + }, + "contents": { + "type": "array", + "description": "Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://ai.google.dev/gemini-api/docs/text-generation#chat), this is a repeated field that contains the conversation history and the latest request.", + "items": { + "$ref": "#/components/schemas/Content" + } + }, + "tools": { + "type": "array", + "description": "Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://ai.google.dev/gemini-api/docs/function-calling) and the [Code execution](https://ai.google.dev/gemini-api/docs/code-execution) guides to learn more.", + "items": { + "$ref": "#/components/schemas/Tool" + } + }, + "toolConfig": { + "$ref": "#/components/schemas/ToolConfig" + }, + "safetySettings": { + "type": "array", + "description": "Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY are supported. Refer to the [guide](https://ai.google.dev/gemini-api/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications.", + "items": { + "$ref": "#/components/schemas/SafetySetting" + } + }, + "generationConfig": { + "$ref": "#/components/schemas/GenerationConfig" + }, + "cachedContent": { + "type": "string", + "description": "Optional. The name of the content [cached](https://ai.google.dev/gemini-api/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}`" + }, + "serviceTier": { + "type": "string", + "description": "Optional. The service tier of the request.", + "enum": [ + "unspecified", + "standard", + "flex", + "priority" + ] + }, + "store": { + "type": "boolean", + "description": "Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config." + } + } + }, + "Content": { + "type": "object", + "description": "The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.", + "properties": { + "parts": { + "type": "array", + "description": "Ordered `Parts` that constitute a single message. Parts may have different MIME types.", + "items": { + "$ref": "#/components/schemas/Part" + } + }, + "role": { + "type": "string", + "description": "Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset." + } + } + }, + "Part": { + "type": "object", + "description": "A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.", + "properties": { + "text": { + "type": "string", + "description": "Inline text." + }, + "inlineData": { + "$ref": "#/components/schemas/Blob" + }, + "functionCall": { + "$ref": "#/components/schemas/FunctionCall" + }, + "functionResponse": { + "$ref": "#/components/schemas/FunctionResponse" + }, + "fileData": { + "$ref": "#/components/schemas/FileData" + }, + "executableCode": { + "$ref": "#/components/schemas/ExecutableCode" + }, + "codeExecutionResult": { + "$ref": "#/components/schemas/CodeExecutionResult" + }, + "toolCall": { + "$ref": "#/components/schemas/ToolCall" + }, + "toolResponse": { + "$ref": "#/components/schemas/ToolResponse" + }, + "videoMetadata": { + "$ref": "#/components/schemas/VideoMetadata" + }, + "thought": { + "type": "boolean", + "description": "Optional. Indicates if the part is thought from the model." + }, + "thoughtSignature": { + "type": "string", + "format": "byte", + "description": "Optional. An opaque signature for the thought so it can be reused in subsequent requests." + }, + "partMetadata": { + "type": "object", + "description": "Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + }, + "mediaResolution": { + "$ref": "#/components/schemas/MediaResolution" + } + } + }, + "Blob": { + "type": "object", + "description": "Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.", + "properties": { + "mimeType": { + "type": "string", + "description": "The IANA standard MIME type of the source data. Examples of supported types: - Images: image/png, image/jpeg, image/jpg, image/webp, image/heic, image/heif, image/gif, image/avif - Audio: audio/*, video/audio/s16le, video/audio/wav - Video: video/* - Text: text/plain, text/html, text/css, text/javascript, text/x-typescript, text/csv, text/markdown, text/x-python, text/xml, text/rtf, video/text/timestamp - Applications: application/x-javascript, application/x-typescript, application/x-python-code, application/json, application/x-ipynb+json, application/rtf, application/pdf For additional context, see [Supported file formats](https://ai.google.dev/gemini-api/docs/file-input-methods#supported-content-types). //" + }, + "data": { + "type": "string", + "format": "byte", + "description": "Raw bytes for media formats." + } + } + }, + "FunctionCall": { + "type": "object", + "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.", + "properties": { + "id": { + "type": "string", + "description": "Optional. Unique identifier of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`." + }, + "name": { + "type": "string", + "description": "Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128." + }, + "args": { + "type": "object", + "description": "Optional. The function parameters and values in JSON object format.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "FunctionResponse": { + "type": "object", + "description": "The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction.", + "properties": { + "id": { + "type": "string", + "description": "Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`." + }, + "name": { + "type": "string", + "description": "Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128." + }, + "response": { + "type": "object", + "description": "Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. \"output\", \"result\", etc. In particular, if the function call failed to execute, the response can have an \"error\" key to return error details to the model. Multimedia can be included by using a subobject containing a single \"$ref\" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://ai.google.dev/gemini-api/docs/function-calling#multimodal.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + }, + "parts": { + "type": "array", + "description": "Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.", + "items": { + "$ref": "#/components/schemas/FunctionResponsePart" + } + }, + "willContinue": { + "type": "boolean", + "description": "Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`." + }, + "scheduling": { + "type": "string", + "description": "Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.", + "enum": [ + "SCHEDULING_UNSPECIFIED", + "SILENT", + "WHEN_IDLE", + "INTERRUPT" + ] + } + } + }, + "FunctionResponsePart": { + "type": "object", + "description": "A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.", + "properties": { + "inlineData": { + "$ref": "#/components/schemas/FunctionResponseBlob" + } + } + }, + "FunctionResponseBlob": { + "type": "object", + "description": "Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.", + "properties": { + "mimeType": { + "type": "string", + "description": "The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats)." + }, + "data": { + "type": "string", + "format": "byte", + "description": "Raw bytes for media formats." + } + } + }, + "FileData": { + "type": "object", + "description": "URI based data.", + "properties": { + "mimeType": { + "type": "string", + "description": "Optional. The IANA standard MIME type of the source data." + }, + "fileUri": { + "type": "string", + "description": "Required. URI." + } + } + }, + "ExecutableCode": { + "type": "object", + "description": "Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated.", + "properties": { + "id": { + "type": "string", + "description": "Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`." + }, + "language": { + "type": "string", + "description": "Required. Programming language of the `code`.", + "enum": [ + "LANGUAGE_UNSPECIFIED", + "PYTHON" + ] + }, + "code": { + "type": "string", + "description": "Required. The code to be executed." + } + } + }, + "CodeExecutionResult": { + "type": "object", + "description": "Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used.", + "properties": { + "id": { + "type": "string", + "description": "Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id." + }, + "outcome": { + "type": "string", + "description": "Required. Outcome of the code execution.", + "enum": [ + "OUTCOME_UNSPECIFIED", + "OUTCOME_OK", + "OUTCOME_FAILED", + "OUTCOME_DEADLINE_EXCEEDED" + ] + }, + "output": { + "type": "string", + "description": "Optional. Contains stdout when code execution is successful, stderr or other description otherwise." + } + } + }, + "ToolCall": { + "type": "object", + "description": "A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`.", + "properties": { + "id": { + "type": "string", + "description": "Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`." + }, + "toolType": { + "type": "string", + "description": "Required. The type of tool that was called.", + "enum": [ + "TOOL_TYPE_UNSPECIFIED", + "GOOGLE_SEARCH_WEB", + "GOOGLE_SEARCH_IMAGE", + "URL_CONTEXT", + "GOOGLE_MAPS", + "FILE_SEARCH" + ] + }, + "args": { + "type": "object", + "description": "Optional. The tool call arguments. Example: {\"arg1\" : \"value1\", \"arg2\" : \"value2\" , ...}", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "ToolResponse": { + "type": "object", + "description": "The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`.", + "properties": { + "id": { + "type": "string", + "description": "Optional. The identifier of the tool call this response is for." + }, + "toolType": { + "type": "string", + "description": "Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`.", + "enum": [ + "TOOL_TYPE_UNSPECIFIED", + "GOOGLE_SEARCH_WEB", + "GOOGLE_SEARCH_IMAGE", + "URL_CONTEXT", + "GOOGLE_MAPS", + "FILE_SEARCH" + ] + }, + "response": { + "type": "object", + "description": "Optional. The tool response.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "VideoMetadata": { + "type": "object", + "description": "Deprecated: Use `GenerateContentRequest.processing_options` instead. Metadata describes the input video content.", + "properties": { + "startOffset": { + "type": "string", + "format": "google-duration", + "description": "Optional. The start offset of the video." + }, + "endOffset": { + "type": "string", + "format": "google-duration", + "description": "Optional. The end offset of the video." + }, + "fps": { + "type": "number", + "format": "double", + "description": "Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]." + } + } + }, + "Tool": { + "type": "object", + "description": "Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. Next ID: 16", + "properties": { + "functionDeclarations": { + "type": "array", + "description": "Optional. A list of `FunctionDeclarations` available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for execution. The model may decide to call a subset of these functions by populating FunctionCall in the response. The next conversation turn may contain a FunctionResponse with the Content.role \"function\" generation context for the next model turn.", + "items": { + "$ref": "#/components/schemas/FunctionDeclaration" + } + }, + "googleSearchRetrieval": { + "$ref": "#/components/schemas/GoogleSearchRetrieval" + }, + "codeExecution": { + "$ref": "#/components/schemas/CodeExecution" + }, + "googleSearch": { + "$ref": "#/components/schemas/GoogleSearch" + }, + "computerUse": { + "$ref": "#/components/schemas/ComputerUse" + }, + "urlContext": { + "$ref": "#/components/schemas/UrlContext" + }, + "fileSearch": { + "$ref": "#/components/schemas/FileSearch" + }, + "mcpServers": { + "type": "array", + "description": "Optional. MCP Servers to connect to.", + "items": { + "$ref": "#/components/schemas/McpServer" + } + }, + "googleMaps": { + "$ref": "#/components/schemas/GoogleMaps" + } + } + }, + "FunctionDeclaration": { + "type": "object", + "description": "Structured representation of a function declaration as defined by the [OpenAPI 3.03 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.", + "properties": { + "name": { + "type": "string", + "description": "Required. The name of the function. Must be a-z, A-Z, 0-9, or contain underscores, colons, dots, and dashes, with a maximum length of 128." + }, + "description": { + "type": "string", + "description": "Required. A brief description of the function." + }, + "parameters": { + "$ref": "#/components/schemas/Schema" + }, + "parametersJsonSchema": { + "type": "any", + "description": "Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { \"type\": \"object\", \"properties\": { \"name\": { \"type\": \"string\" }, \"age\": { \"type\": \"integer\" } }, \"additionalProperties\": false, \"required\": [\"name\", \"age\"], \"propertyOrdering\": [\"name\", \"age\"] } ``` This field is mutually exclusive with `parameters`." + }, + "response": { + "$ref": "#/components/schemas/Schema" + }, + "responseJsonSchema": { + "type": "any", + "description": "Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`." + }, + "behavior": { + "type": "string", + "description": "Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method.", + "enum": [ + "UNSPECIFIED", + "BLOCKING", + "NON_BLOCKING" + ] + } + } + }, + "Schema": { + "type": "object", + "description": "The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema).", + "properties": { + "type": { + "type": "string", + "description": "Required. Data type.", + "enum": [ + "TYPE_UNSPECIFIED", + "STRING", + "NUMBER", + "INTEGER", + "BOOLEAN", + "ARRAY", + "OBJECT", + "NULL" + ] + }, + "format": { + "type": "string", + "description": "Optional. The format of the data. Any value is allowed, but most do not trigger any special functionality." + }, + "title": { + "type": "string", + "description": "Optional. The title of the schema." + }, + "description": { + "type": "string", + "description": "Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown." + }, + "nullable": { + "type": "boolean", + "description": "Optional. Indicates if the value may be null." + }, + "enum": { + "type": "array", + "description": "Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]}", + "items": { + "type": "string" + } + }, + "items": { + "$ref": "#/components/schemas/Schema" + }, + "maxItems": { + "type": "string", + "format": "int64", + "description": "Optional. Maximum number of the elements for Type.ARRAY." + }, + "minItems": { + "type": "string", + "format": "int64", + "description": "Optional. Minimum number of the elements for Type.ARRAY." + }, + "properties": { + "type": "object", + "description": "Optional. Properties of Type.OBJECT.", + "additionalProperties": { + "$ref": "#/components/schemas/Schema" + } + }, + "required": { + "type": "array", + "description": "Optional. Required properties of Type.OBJECT.", + "items": { + "type": "string" + } + }, + "minProperties": { + "type": "string", + "format": "int64", + "description": "Optional. Minimum number of the properties for Type.OBJECT." + }, + "maxProperties": { + "type": "string", + "format": "int64", + "description": "Optional. Maximum number of the properties for Type.OBJECT." + }, + "minimum": { + "type": "number", + "format": "double", + "description": "Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER" + }, + "maximum": { + "type": "number", + "format": "double", + "description": "Optional. Maximum value of the Type.INTEGER and Type.NUMBER" + }, + "minLength": { + "type": "string", + "format": "int64", + "description": "Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING" + }, + "maxLength": { + "type": "string", + "format": "int64", + "description": "Optional. Maximum length of the Type.STRING" + }, + "pattern": { + "type": "string", + "description": "Optional. Pattern of the Type.STRING to restrict a string to a regular expression." + }, + "example": { + "type": "any", + "description": "Optional. Example of the object. Will only populated when the object is the root." + }, + "anyOf": { + "type": "array", + "description": "Optional. The value should be validated against any (one or more) of the subschemas in the list.", + "items": { + "$ref": "#/components/schemas/Schema" + } + }, + "propertyOrdering": { + "type": "array", + "description": "Optional. The order of the properties. Not a standard field in open api spec. Used to determine the order of the properties in the response.", + "items": { + "type": "string" + } + }, + "default": { + "type": "any", + "description": "Optional. Default value of the field. Per JSON Schema, this field is intended for documentation generators and doesn't affect validation. Thus it's included here and ignored so that developers who send schemas with a `default` field don't get unknown-field errors." + } + } + }, + "GoogleSearchRetrieval": { + "type": "object", + "description": "Tool to retrieve public web data for grounding, powered by Google.", + "properties": { + "dynamicRetrievalConfig": { + "$ref": "#/components/schemas/DynamicRetrievalConfig" + } + } + }, + "DynamicRetrievalConfig": { + "type": "object", + "description": "Describes the options to customize dynamic retrieval.", + "properties": { + "mode": { + "type": "string", + "description": "The mode of the predictor to be used in dynamic retrieval.", + "enum": [ + "MODE_UNSPECIFIED", + "MODE_DYNAMIC" + ] + }, + "dynamicThreshold": { + "type": "number", + "format": "float", + "description": "The threshold to be used in dynamic retrieval. If not set, a system default value is used." + } + } + }, + "CodeExecution": { + "type": "object", + "description": "Tool that executes code generated by the model, and automatically returns the result to the model. See also `ExecutableCode` and `CodeExecutionResult` which are only generated when using this tool.", + "properties": {} + }, + "GoogleSearch": { + "type": "object", + "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.", + "properties": { + "timeRangeFilter": { + "$ref": "#/components/schemas/Interval" + }, + "searchTypes": { + "$ref": "#/components/schemas/SearchTypes" + } + } + }, + "Interval": { + "type": "object", + "description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", + "properties": { + "startTime": { + "type": "string", + "format": "google-datetime", + "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start." + }, + "endTime": { + "type": "string", + "format": "google-datetime", + "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end." + } + } + }, + "SearchTypes": { + "type": "object", + "description": "Different types of search that can be enabled on the GoogleSearch tool.", + "properties": { + "webSearch": { + "$ref": "#/components/schemas/WebSearch" + }, + "imageSearch": { + "$ref": "#/components/schemas/ImageSearch" + } + } + }, + "WebSearch": { + "type": "object", + "description": "Standard web search for grounding and related configurations.", + "properties": {} + }, + "ImageSearch": { + "type": "object", + "description": "Image search for grounding and related configurations.", + "properties": {} + }, + "ComputerUse": { + "type": "object", + "description": "Computer Use tool type.", + "properties": { + "environment": { + "type": "string", + "description": "Required. The environment being operated.", + "enum": [ + "ENVIRONMENT_UNSPECIFIED", + "ENVIRONMENT_BROWSER" + ] + }, + "excludedPredefinedFunctions": { + "type": "array", + "description": "Optional. By default, predefined functions are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.", + "items": { + "type": "string" + } + } + } + }, + "UrlContext": { + "type": "object", + "description": "Tool to support URL context retrieval.", + "properties": {} + }, + "FileSearch": { + "type": "object", + "description": "The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.", + "properties": { + "fileSearchStoreNames": { + "type": "array", + "description": "Required. The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`", + "items": { + "type": "string" + } + }, + "topK": { + "type": "integer", + "format": "int32", + "description": "Optional. The number of semantic retrieval chunks to retrieve." + }, + "metadataFilter": { + "type": "string", + "description": "Optional. Metadata filter to apply to the semantic retrieval documents and chunks." + } + } + }, + "McpServer": { + "type": "object", + "description": "A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 6", + "properties": { + "streamableHttpTransport": { + "$ref": "#/components/schemas/StreamableHttpTransport" + }, + "name": { + "type": "string", + "description": "The name of the MCPServer." + } + } + }, + "StreamableHttpTransport": { + "type": "object", + "description": "A transport that can stream HTTP requests and responses. Next ID: 6", + "properties": { + "url": { + "type": "string", + "description": "The full URL for the MCPServer endpoint. Example: \"https://api.example.com/mcp\"" + }, + "headers": { + "type": "object", + "description": "Optional: Fields for authentication headers, timeouts, etc., if needed.", + "additionalProperties": { + "type": "string" + } + }, + "timeout": { + "type": "string", + "format": "google-duration", + "description": "HTTP timeout for regular operations." + }, + "sseReadTimeout": { + "type": "string", + "format": "google-duration", + "description": "Timeout for SSE read operations." + }, + "terminateOnClose": { + "type": "boolean", + "description": "Whether to close the client session when the transport closes." + } + } + }, + "GoogleMaps": { + "type": "object", + "description": "The GoogleMaps Tool that provides geospatial context for the user's query.", + "properties": { + "enableWidget": { + "type": "boolean", + "description": "Optional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response." + } + } + }, + "ToolConfig": { + "type": "object", + "description": "The Tool configuration containing parameters for specifying `Tool` use in the request.", + "properties": { + "functionCallingConfig": { + "$ref": "#/components/schemas/FunctionCallingConfig" + }, + "retrievalConfig": { + "$ref": "#/components/schemas/RetrievalConfig" + }, + "includeServerSideToolInvocations": { + "type": "boolean", + "description": "Optional. If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool interactions." + } + } + }, + "FunctionCallingConfig": { + "type": "object", + "description": "Configuration for specifying function calling behavior.", + "properties": { + "mode": { + "type": "string", + "description": "Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO.", + "enum": [ + "MODE_UNSPECIFIED", + "AUTO", + "ANY", + "NONE", + "VALIDATED" + ] + }, + "allowedFunctionNames": { + "type": "array", + "description": "Optional. A set of function names that, when provided, limits the functions the model will call. This should only be set when the Mode is ANY or VALIDATED. Function names should match [FunctionDeclaration.name]. When set, model will predict a function call from only allowed function names.", + "items": { + "type": "string" + } + } + } + }, + "RetrievalConfig": { + "type": "object", + "description": "Retrieval config.", + "properties": { + "latLng": { + "$ref": "#/components/schemas/LatLng" + }, + "languageCode": { + "type": "string", + "description": "Optional. The language code of the user. Language code for content. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)." + } + } + }, + "LatLng": { + "type": "object", + "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", + "properties": { + "latitude": { + "type": "number", + "format": "double", + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0]." + }, + "longitude": { + "type": "number", + "format": "double", + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0]." + } + } + }, + "SafetySetting": { + "type": "object", + "description": "Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.", + "properties": { + "category": { + "type": "string", + "description": "Required. The category for this setting.", + "enum": [ + "HARM_CATEGORY_UNSPECIFIED", + "HARM_CATEGORY_DEROGATORY", + "HARM_CATEGORY_TOXICITY", + "HARM_CATEGORY_VIOLENCE", + "HARM_CATEGORY_SEXUAL", + "HARM_CATEGORY_MEDICAL", + "HARM_CATEGORY_DANGEROUS", + "HARM_CATEGORY_HARASSMENT", + "HARM_CATEGORY_HATE_SPEECH", + "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "HARM_CATEGORY_DANGEROUS_CONTENT", + "HARM_CATEGORY_CIVIC_INTEGRITY" + ] + }, + "threshold": { + "type": "string", + "description": "Required. Controls the probability threshold at which harm is blocked.", + "enum": [ + "HARM_BLOCK_THRESHOLD_UNSPECIFIED", + "BLOCK_LOW_AND_ABOVE", + "BLOCK_MEDIUM_AND_ABOVE", + "BLOCK_ONLY_HIGH", + "BLOCK_NONE", + "OFF" + ] + } + } + }, + "GenerationConfig": { + "type": "object", + "description": "Configuration options for model generation and outputs. Not all parameters are configurable for every model.", + "properties": { + "candidateCount": { + "type": "integer", + "format": "int32", + "description": "Optional. Number of generated responses to return. If unset, this will default to 1. Please note that this doesn't work for previous generation models (Gemini 1.0 family)" + }, + "stopSequences": { + "type": "array", + "description": "Optional. The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a `stop_sequence`. The stop sequence will not be included as part of the response.", + "items": { + "type": "string" + } + }, + "maxOutputTokens": { + "type": "integer", + "format": "int32", + "description": "Optional. The maximum number of tokens to include in a response candidate. Note: The default value varies by model, see the `Model.output_token_limit` attribute of the `Model` returned from the `getModel` function." + }, + "temperature": { + "type": "number", + "format": "float", + "description": "Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned from the `getModel` function. Values can range from [0.0, 2.0]." + }, + "topP": { + "type": "number", + "format": "float", + "description": "Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and Top-p (nucleus) sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits the number of tokens based on the cumulative probability. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests." + }, + "topK": { + "type": "integer", + "format": "int32", + "description": "Optional. The maximum number of tokens to consider when sampling. Gemini models use Top-p (nucleus) sampling or a combination of Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Models running with nucleus sampling don't allow top_k setting. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests." + }, + "seed": { + "type": "integer", + "format": "int32", + "description": "Optional. Seed used in decoding. If not set, the request uses a randomly generated seed." + }, + "responseMimeType": { + "type": "string", + "description": "Optional. MIME type of the generated candidate text. Supported MIME types are: `text/plain`: (default) Text output. `application/json`: JSON response in the response candidates. `text/x.enum`: ENUM as a string response in the response candidates. Refer to the [docs](https://ai.google.dev/gemini-api/docs/prompting_with_media#plain_text_formats) for a list of all supported text MIME types." + }, + "responseSchema": { + "$ref": "#/components/schemas/Schema" + }, + "_responseJsonSchema": { + "type": "any", + "description": "Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). If set, `response_schema` must be omitted, but `response_mime_type` is required. While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported: - `$id` - `$defs` - `$ref` - `$anchor` - `type` - `format` - `title` - `description` - `enum` (for strings and numbers) - `items` - `prefixItems` - `minItems` - `maxItems` - `minimum` - `maximum` - `anyOf` - `oneOf` (interpreted the same as `anyOf`) - `properties` - `additionalProperties` - `required` The non-standard `propertyOrdering` property may also be set. Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If `$ref` is set on a sub-schema, no other properties, except for than those starting as a `$`, may be set." + }, + "responseJsonSchema": { + "type": "any", + "description": "Optional. An internal detail. Use `responseJsonSchema` rather than this field." + }, + "presencePenalty": { + "type": "number", + "format": "float", + "description": "Optional. Presence penalty applied to the next token's logprobs if the token has already been seen in the response. This penalty is binary on/off and not dependant on the number of times the token is used (after the first). Use frequency_penalty for a penalty that increases with each use. A positive penalty will discourage the use of tokens that have already been used in the response, increasing the vocabulary. A negative penalty will encourage the use of tokens that have already been used in the response, decreasing the vocabulary." + }, + "frequencyPenalty": { + "type": "number", + "format": "float", + "description": "Optional. Frequency penalty applied to the next token's logprobs, multiplied by the number of times each token has been seen in the respponse so far. A positive penalty will discourage the use of tokens that have already been used, proportional to the number of times the token has been used: The more a token is used, the more difficult it is for the model to use that token again increasing the vocabulary of responses. Caution: A _negative_ penalty will encourage the model to reuse tokens proportional to the number of times the token has been used. Small negative values will reduce the vocabulary of a response. Larger negative values will cause the model to start repeating a common token until it hits the max_output_tokens limit." + }, + "responseLogprobs": { + "type": "boolean", + "description": "Optional. If true, export the logprobs results in response." + }, + "logprobs": { + "type": "integer", + "format": "int32", + "description": "Optional. Only valid if response_logprobs=True. This sets the number of top logprobs, including the chosen candidate, to return at each decoding step in the Candidate.logprobs_result. The number must be in the range of [0, 20]." + }, + "enableEnhancedCivicAnswers": { + "type": "boolean", + "description": "Optional. Enables enhanced civic answers. It may not be available for all models." + }, + "responseModalities": { + "type": "array", + "description": "Optional. The requested modalities of the response. Represents the set of modalities that the model can return, and should be expected in the response. This is an exact match to the modalities of the response. A model may have multiple combinations of supported modalities. If the requested modalities do not match any of the supported combinations, an error will be returned. An empty list is equivalent to requesting only text.", + "items": { + "type": "string", + "enum": [ + "MODALITY_UNSPECIFIED", + "TEXT", + "IMAGE", + "AUDIO" + ] + } + }, + "speechConfig": { + "$ref": "#/components/schemas/SpeechConfig" + }, + "thinkingConfig": { + "$ref": "#/components/schemas/ThinkingConfig" + }, + "imageConfig": { + "$ref": "#/components/schemas/ImageConfig" + }, + "mediaResolution": { + "type": "string", + "description": "Optional. If specified, the media resolution specified will be used.", + "enum": [ + "MEDIA_RESOLUTION_UNSPECIFIED", + "MEDIA_RESOLUTION_LOW", + "MEDIA_RESOLUTION_MEDIUM", + "MEDIA_RESOLUTION_HIGH" + ] + }, + "responseFormat": { + "$ref": "#/components/schemas/ResponseFormatConfig" + } + } + }, + "SpeechConfig": { + "type": "object", + "description": "Config for speech generation and transcription.", + "properties": { + "voiceConfig": { + "$ref": "#/components/schemas/VoiceConfig" + }, + "multiSpeakerVoiceConfig": { + "$ref": "#/components/schemas/MultiSpeakerVoiceConfig" + }, + "languageCode": { + "type": "string", + "description": "Optional. The IETF [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language code that the user configured the app to use. Used for speech recognition and synthesis. Valid values are: `de-DE`, `en-AU`, `en-GB`, `en-IN`, `en-US`, `es-US`, `fr-FR`, `hi-IN`, `pt-BR`, `ar-XA`, `es-ES`, `fr-CA`, `id-ID`, `it-IT`, `ja-JP`, `tr-TR`, `vi-VN`, `bn-IN`, `gu-IN`, `kn-IN`, `ml-IN`, `mr-IN`, `ta-IN`, `te-IN`, `nl-NL`, `ko-KR`, `cmn-CN`, `pl-PL`, `ru-RU`, and `th-TH`." + } + } + }, + "VoiceConfig": { + "type": "object", + "description": "The configuration for the voice to use.", + "properties": { + "prebuiltVoiceConfig": { + "$ref": "#/components/schemas/PrebuiltVoiceConfig" + } + } + }, + "PrebuiltVoiceConfig": { + "type": "object", + "description": "The configuration for the prebuilt speaker to use.", + "properties": { + "voiceName": { + "type": "string", + "description": "The name of the preset voice to use." + } + } + }, + "MultiSpeakerVoiceConfig": { + "type": "object", + "description": "The configuration for the multi-speaker setup.", + "properties": { + "speakerVoiceConfigs": { + "type": "array", + "description": "Required. All the enabled speaker voices.", + "items": { + "$ref": "#/components/schemas/SpeakerVoiceConfig" + } + } + } + }, + "SpeakerVoiceConfig": { + "type": "object", + "description": "The configuration for a single speaker in a multi speaker setup.", + "properties": { + "speaker": { + "type": "string", + "description": "Required. The name of the speaker to use. Should be the same as in the prompt." + }, + "voiceConfig": { + "$ref": "#/components/schemas/VoiceConfig" + } + } + }, + "ThinkingConfig": { + "type": "object", + "description": "Config for thinking features.", + "properties": { + "includeThoughts": { + "type": "boolean", + "description": "Indicates whether to include thoughts in the response. If true, thoughts are returned only when available." + }, + "thinkingBudget": { + "type": "integer", + "format": "int32", + "description": "The number of thoughts tokens that the model should generate." + }, + "thinkingLevel": { + "type": "string", + "description": "Optional. Controls the maximum depth of the model's internal reasoning process before it produces a response. The default value is model-dependent. Refer to the [Thinking levels guide](https://ai.google.dev/gemini-api/docs/thinking#thinking-levels) for more details. Recommended for Gemini 3 or later models. Use with earlier models results in an error.", + "enum": [ + "THINKING_LEVEL_UNSPECIFIED", + "MINIMAL", + "LOW", + "MEDIUM", + "HIGH" + ] + } + } + }, + "ImageConfig": { + "type": "object", + "description": "Config for image generation features.", + "properties": { + "aspectRatio": { + "type": "string", + "description": "Optional. The aspect ratio of the image to generate. Supported aspect ratios: `1:1`, `1:4`, `4:1`, `1:8`, `8:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, or `21:9`. If not specified, the model will choose a default aspect ratio based on any reference images provided." + }, + "imageSize": { + "type": "string", + "description": "Optional. Specifies the size of generated images. Supported values are `512`, `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`." + } + } + }, + "ResponseFormatConfig": { + "type": "object", + "description": "Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality.", + "properties": { + "text": { + "$ref": "#/components/schemas/TextResponseFormat" + }, + "audio": { + "$ref": "#/components/schemas/AudioResponseFormat" + }, + "image": { + "$ref": "#/components/schemas/ImageResponseFormat" + } + } + }, + "TextResponseFormat": { + "type": "object", + "description": "Configuration for text output format.", + "properties": { + "mimeType": { + "type": "string", + "description": "Optional. The MIME type of the text output.", + "enum": [ + "MIME_TYPE_UNSPECIFIED", + "APPLICATION_JSON", + "TEXT_PLAIN" + ] + }, + "schema": { + "type": "any", + "description": "Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON." + } + } + }, + "AudioResponseFormat": { + "type": "object", + "description": "Configuration for audio output format.", + "properties": { + "mimeType": { + "type": "string", + "description": "Optional. The MIME type of the audio output.", + "enum": [ + "MIME_TYPE_UNSPECIFIED", + "AUDIO_MP3", + "AUDIO_OGG_OPUS", + "AUDIO_L16", + "AUDIO_WAV", + "AUDIO_ALAW", + "AUDIO_MULAW" + ] + }, + "delivery": { + "type": "string", + "description": "Optional. The delivery mode for the audio output.", + "enum": [ + "DELIVERY_UNSPECIFIED", + "INLINE", + "URI" + ] + }, + "sampleRate": { + "type": "integer", + "format": "int32", + "description": "Optional. Sample rate in Hz." + }, + "bitRate": { + "type": "integer", + "format": "int32", + "description": "Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus)." + } + } + }, + "ImageResponseFormat": { + "type": "object", + "description": "Configuration for image output format.", + "properties": { + "mimeType": { + "type": "string", + "description": "Optional. The MIME type of the image output.", + "enum": [ + "MIME_TYPE_UNSPECIFIED", + "IMAGE_JPEG" + ] + }, + "delivery": { + "type": "string", + "description": "Optional. The delivery mode for the image output.", + "enum": [ + "DELIVERY_UNSPECIFIED", + "INLINE", + "URI" + ] + }, + "aspectRatio": { + "type": "string", + "description": "Optional. The aspect ratio for the image output.", + "enum": [ + "ASPECT_RATIO_UNSPECIFIED", + "ASPECT_RATIO_ONE_BY_ONE", + "ASPECT_RATIO_TWO_BY_THREE", + "ASPECT_RATIO_THREE_BY_TWO", + "ASPECT_RATIO_THREE_BY_FOUR", + "ASPECT_RATIO_FOUR_BY_THREE", + "ASPECT_RATIO_FOUR_BY_FIVE", + "ASPECT_RATIO_FIVE_BY_FOUR", + "ASPECT_RATIO_NINE_BY_SIXTEEN", + "ASPECT_RATIO_SIXTEEN_BY_NINE", + "ASPECT_RATIO_TWENTY_ONE_BY_NINE", + "ASPECT_RATIO_ONE_BY_EIGHT", + "ASPECT_RATIO_EIGHT_BY_ONE", + "ASPECT_RATIO_ONE_BY_FOUR", + "ASPECT_RATIO_FOUR_BY_ONE" + ] + }, + "imageSize": { + "type": "string", + "description": "Optional. The size of the image output.", + "enum": [ + "IMAGE_SIZE_UNSPECIFIED", + "IMAGE_SIZE_FIVE_TWELVE", + "IMAGE_SIZE_ONE_K", + "IMAGE_SIZE_TWO_K", + "IMAGE_SIZE_FOUR_K" + ] + } + } + }, + "GenerateContentResponse": { + "type": "object", + "description": "Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`.", + "properties": { + "candidates": { + "type": "array", + "description": "Candidate responses from the model.", + "items": { + "$ref": "#/components/schemas/Candidate" + } + }, + "promptFeedback": { + "$ref": "#/components/schemas/PromptFeedback" + }, + "usageMetadata": { + "$ref": "#/components/schemas/UsageMetadata" + }, + "modelVersion": { + "type": "string", + "description": "Output only. The model version used to generate the response." + }, + "responseId": { + "type": "string", + "description": "Output only. response_id is used to identify each response." + }, + "modelStatus": { + "$ref": "#/components/schemas/ModelStatus" + } + } + }, + "Candidate": { + "type": "object", + "description": "A response candidate generated from the model.", + "properties": { + "index": { + "type": "integer", + "format": "int32", + "description": "Output only. Index of the candidate in the list of response candidates." + }, + "content": { + "$ref": "#/components/schemas/Content" + }, + "finishReason": { + "type": "string", + "description": "Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens.", + "enum": [ + "FINISH_REASON_UNSPECIFIED", + "STOP", + "MAX_TOKENS", + "SAFETY", + "RECITATION", + "LANGUAGE", + "OTHER", + "BLOCKLIST", + "PROHIBITED_CONTENT", + "SPII", + "MALFORMED_FUNCTION_CALL", + "IMAGE_SAFETY", + "IMAGE_PROHIBITED_CONTENT", + "IMAGE_OTHER", + "NO_IMAGE", + "IMAGE_RECITATION", + "UNEXPECTED_TOOL_CALL", + "TOO_MANY_TOOL_CALLS", + "MISSING_THOUGHT_SIGNATURE", + "MALFORMED_RESPONSE" + ] + }, + "finishMessage": { + "type": "string", + "description": "Optional. Output only. Details the reason why the model stopped generating tokens. This is populated only when `finish_reason` is set." + }, + "safetyRatings": { + "type": "array", + "description": "List of ratings for the safety of a response candidate. There is at most one rating per category.", + "items": { + "$ref": "#/components/schemas/SafetyRating" + } + }, + "citationMetadata": { + "$ref": "#/components/schemas/CitationMetadata" + }, + "tokenCount": { + "type": "integer", + "format": "int32", + "description": "Output only. Token count for this candidate." + }, + "groundingAttributions": { + "type": "array", + "description": "Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for `GenerateAnswer` calls.", + "items": { + "$ref": "#/components/schemas/GroundingAttribution" + } + }, + "groundingMetadata": { + "$ref": "#/components/schemas/GroundingMetadata" + }, + "avgLogprobs": { + "type": "number", + "format": "double", + "description": "Output only. Average log probability score of the candidate." + }, + "logprobsResult": { + "$ref": "#/components/schemas/LogprobsResult" + }, + "urlContextMetadata": { + "$ref": "#/components/schemas/UrlContextMetadata" + } + } + }, + "SafetyRating": { + "type": "object", + "description": "Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.", + "properties": { + "category": { + "type": "string", + "description": "Required. The category for this rating.", + "enum": [ + "HARM_CATEGORY_UNSPECIFIED", + "HARM_CATEGORY_DEROGATORY", + "HARM_CATEGORY_TOXICITY", + "HARM_CATEGORY_VIOLENCE", + "HARM_CATEGORY_SEXUAL", + "HARM_CATEGORY_MEDICAL", + "HARM_CATEGORY_DANGEROUS", + "HARM_CATEGORY_HARASSMENT", + "HARM_CATEGORY_HATE_SPEECH", + "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "HARM_CATEGORY_DANGEROUS_CONTENT", + "HARM_CATEGORY_CIVIC_INTEGRITY" + ] + }, + "probability": { + "type": "string", + "description": "Required. The probability of harm for this content.", + "enum": [ + "HARM_PROBABILITY_UNSPECIFIED", + "NEGLIGIBLE", + "LOW", + "MEDIUM", + "HIGH" + ] + }, + "blocked": { + "type": "boolean", + "description": "Was this content blocked because of this rating?" + } + } + }, + "CitationMetadata": { + "type": "object", + "description": "A collection of source attributions for a piece of content.", + "properties": { + "citationSources": { + "type": "array", + "description": "Citations to sources for a specific response.", + "items": { + "$ref": "#/components/schemas/CitationSource" + } + } + } + }, + "CitationSource": { + "type": "object", + "description": "A citation to a source for a portion of a specific response.", + "properties": { + "startIndex": { + "type": "integer", + "format": "int32", + "description": "Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes." + }, + "endIndex": { + "type": "integer", + "format": "int32", + "description": "Optional. End of the attributed segment, exclusive." + }, + "uri": { + "type": "string", + "description": "Optional. URI that is attributed as a source for a portion of the text." + }, + "license": { + "type": "string", + "description": "Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations." + } + } + }, + "GroundingAttribution": { + "type": "object", + "description": "Attribution for a source that contributed to an answer.", + "properties": { + "sourceId": { + "$ref": "#/components/schemas/AttributionSourceId" + }, + "content": { + "$ref": "#/components/schemas/Content" + } + } + }, + "AttributionSourceId": { + "type": "object", + "description": "Identifier for the source contributing to this attribution.", + "properties": { + "groundingPassage": { + "$ref": "#/components/schemas/GroundingPassageId" + }, + "semanticRetrieverChunk": { + "$ref": "#/components/schemas/SemanticRetrieverChunk" + } + } + }, + "GroundingPassageId": { + "type": "object", + "description": "Identifier for a part within a `GroundingPassage`.", + "properties": { + "passageId": { + "type": "string", + "description": "Output only. ID of the passage matching the `GenerateAnswerRequest`'s `GroundingPassage.id`." + }, + "partIndex": { + "type": "integer", + "format": "int32", + "description": "Output only. Index of the part within the `GenerateAnswerRequest`'s `GroundingPassage.content`." + } + } + }, + "SemanticRetrieverChunk": { + "type": "object", + "description": "Identifier for a `Chunk` retrieved via Semantic Retriever specified in the `GenerateAnswerRequest` using `SemanticRetrieverConfig`.", + "properties": { + "source": { + "type": "string", + "description": "Output only. Name of the source matching the request's `SemanticRetrieverConfig.source`. Example: `corpora/123` or `corpora/123/documents/abc`" + }, + "chunk": { + "type": "string", + "description": "Output only. Name of the `Chunk` containing the attributed text. Example: `corpora/123/documents/abc/chunks/xyz`" + } + } + }, + "GroundingMetadata": { + "type": "object", + "description": "Metadata returned to client when grounding is enabled.", + "properties": { + "searchEntryPoint": { + "$ref": "#/components/schemas/SearchEntryPoint" + }, + "groundingChunks": { + "type": "array", + "description": "List of supporting references retrieved from specified grounding source. When streaming, this only contains the grounding chunks that have not been included in the grounding metadata of previous responses.", + "items": { + "$ref": "#/components/schemas/GroundingChunk" + } + }, + "groundingSupports": { + "type": "array", + "description": "List of grounding support.", + "items": { + "$ref": "#/components/schemas/GoogleAiGenerativelanguageV1betaGroundingSupport" + } + }, + "retrievalMetadata": { + "$ref": "#/components/schemas/RetrievalMetadata" + }, + "webSearchQueries": { + "type": "array", + "description": "Web search queries for the following-up web search.", + "items": { + "type": "string" + } + }, + "imageSearchQueries": { + "type": "array", + "description": "Image search queries used for grounding.", + "items": { + "type": "string" + } + }, + "googleMapsWidgetContextToken": { + "type": "string", + "description": "Optional. Resource name of the Google Maps widget context token that can be used with the PlacesContextElement widget in order to render contextual data. Only populated in the case that grounding with Google Maps is enabled." + } + } + }, + "SearchEntryPoint": { + "type": "object", + "description": "Google search entry point.", + "properties": { + "renderedContent": { + "type": "string", + "description": "Optional. Web content snippet that can be embedded in a web page or an app webview." + }, + "sdkBlob": { + "type": "string", + "format": "byte", + "description": "Optional. Base64 encoded JSON representing array of tuple." + } + } + }, + "GroundingChunk": { + "type": "object", + "description": "A `GroundingChunk` represents a segment of supporting evidence that grounds the model's response. It can be a chunk from the web, a retrieved context from a file, or information from Google Maps.", + "properties": { + "web": { + "$ref": "#/components/schemas/Web" + }, + "image": { + "$ref": "#/components/schemas/Image" + }, + "retrievedContext": { + "$ref": "#/components/schemas/RetrievedContext" + }, + "maps": { + "$ref": "#/components/schemas/Maps" + } + } + }, + "Web": { + "type": "object", + "description": "Chunk from the web.", + "properties": { + "uri": { + "type": "string", + "description": "Output only. URI reference of the chunk." + }, + "title": { + "type": "string", + "description": "Output only. Title of the chunk." + } + } + }, + "Image": { + "type": "object", + "description": "Chunk from image search.", + "properties": { + "sourceUri": { + "type": "string", + "description": "The web page URI for attribution." + }, + "imageUri": { + "type": "string", + "description": "The image asset URL." + }, + "title": { + "type": "string", + "description": "The title of the web page that the image is from." + }, + "domain": { + "type": "string", + "description": "The root domain of the web page that the image is from, e.g. \"example.com\"." + } + } + }, + "RetrievedContext": { + "type": "object", + "description": "Chunk from context retrieved by the file search tool.", + "properties": { + "uri": { + "type": "string", + "description": "Optional. URI reference of the semantic retrieval document." + }, + "title": { + "type": "string", + "description": "Optional. Title of the document." + }, + "text": { + "type": "string", + "description": "Optional. Text of the chunk." + }, + "fileSearchStore": { + "type": "string", + "description": "Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`" + }, + "customMetadata": { + "type": "array", + "description": "Optional. User-provided metadata about the retrieved context.", + "items": { + "$ref": "#/components/schemas/GroundingChunkCustomMetadata" + } + }, + "pageNumber": { + "type": "integer", + "format": "int32", + "description": "Optional. Page number of the retrieved context, if applicable." + }, + "mediaId": { + "type": "string", + "description": "Optional. The media blob resource name for multimodal file search results. Format: fileSearchStores/{file_search_store_id}/media/{blob_id}" + } + } + }, + "GroundingChunkCustomMetadata": { + "type": "object", + "description": "User provided metadata about the GroundingFact.", + "properties": { + "stringValue": { + "type": "string", + "description": "Optional. The string value of the metadata." + }, + "stringListValue": { + "$ref": "#/components/schemas/GroundingChunkStringList" + }, + "numericValue": { + "type": "number", + "format": "float", + "description": "Optional. The numeric value of the metadata. The expected range for this value depends on the specific `key` used." + }, + "key": { + "type": "string", + "description": "The key of the metadata." + } + } + }, + "GroundingChunkStringList": { + "type": "object", + "description": "A list of string values.", + "properties": { + "values": { + "type": "array", + "description": "The string values of the list.", + "items": { + "type": "string" + } + } + } + }, + "Maps": { + "type": "object", + "description": "A grounding chunk from Google Maps. A Maps chunk corresponds to a single place.", + "properties": { + "uri": { + "type": "string", + "description": "URI reference of the place." + }, + "title": { + "type": "string", + "description": "Title of the place." + }, + "text": { + "type": "string", + "description": "Text description of the place answer." + }, + "placeId": { + "type": "string", + "description": "The ID of the place, in `places/{place_id}` format. A user can use this ID to look up that place." + }, + "placeAnswerSources": { + "$ref": "#/components/schemas/PlaceAnswerSources" + } + } + }, + "PlaceAnswerSources": { + "type": "object", + "description": "Collection of sources that provide answers about the features of a given place in Google Maps. Each PlaceAnswerSources message corresponds to a specific place in Google Maps. The Google Maps tool used these sources in order to answer questions about features of the place (e.g: \"does Bar Foo have Wifi\" or \"is Foo Bar wheelchair accessible?\"). Currently we only support review snippets as sources.", + "properties": { + "reviewSnippets": { + "type": "array", + "description": "Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.", + "items": { + "$ref": "#/components/schemas/ReviewSnippet" + } + } + } + }, + "ReviewSnippet": { + "type": "object", + "description": "Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.", + "properties": { + "reviewId": { + "type": "string", + "description": "The ID of the review snippet." + }, + "googleMapsUri": { + "type": "string", + "description": "A link that corresponds to the user review on Google Maps." + }, + "title": { + "type": "string", + "description": "Title of the review." + } + } + }, + "GoogleAiGenerativelanguageV1betaGroundingSupport": { + "type": "object", + "description": "Grounding support.", + "properties": { + "segment": { + "$ref": "#/components/schemas/GoogleAiGenerativelanguageV1betaSegment" + }, + "groundingChunkIndices": { + "type": "array", + "description": "Optional. A list of indices (into 'grounding_chunk' in `response.candidate.grounding_metadata`) specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. If the response is streaming, the grounding_chunk_indices refer to the indices across all responses. It is the client's responsibility to accumulate the grounding chunks from all responses (while maintaining the same order).", + "items": { + "type": "integer", + "format": "int32" + } + }, + "confidenceScores": { + "type": "array", + "description": "Optional. Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices.", + "items": { + "type": "number", + "format": "float" + } + }, + "renderedParts": { + "type": "array", + "description": "Output only. Indices into the `parts` field of the candidate's content. These indices specify which rendered parts are associated with this support source.", + "items": { + "type": "integer", + "format": "int32" + } + } + } + }, + "GoogleAiGenerativelanguageV1betaSegment": { + "type": "object", + "description": "Segment of the content.", + "properties": { + "partIndex": { + "type": "integer", + "format": "int32", + "description": "The index of a Part object within its parent Content object." + }, + "startIndex": { + "type": "integer", + "format": "int32", + "description": "Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero." + }, + "endIndex": { + "type": "integer", + "format": "int32", + "description": "End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero." + }, + "text": { + "type": "string", + "description": "The text corresponding to the segment from the response." + } + } + }, + "RetrievalMetadata": { + "type": "object", + "description": "Metadata related to retrieval in the grounding flow.", + "properties": { + "googleSearchDynamicRetrievalScore": { + "type": "number", + "format": "float", + "description": "Optional. Score indicating how likely information from google search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when google search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger google search." + } + } + }, + "LogprobsResult": { + "type": "object", + "description": "Logprobs Result", + "properties": { + "logProbabilitySum": { + "type": "number", + "format": "float", + "description": "Sum of log probabilities for all tokens." + }, + "topCandidates": { + "type": "array", + "description": "Length = total number of decoding steps.", + "items": { + "$ref": "#/components/schemas/TopCandidates" + } + }, + "chosenCandidates": { + "type": "array", + "description": "Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates.", + "items": { + "$ref": "#/components/schemas/LogprobsResultCandidate" + } + } + } + }, + "TopCandidates": { + "type": "object", + "description": "Candidates with top log probabilities at each decoding step.", + "properties": { + "candidates": { + "type": "array", + "description": "Sorted by log probability in descending order.", + "items": { + "$ref": "#/components/schemas/LogprobsResultCandidate" + } + } + } + }, + "LogprobsResultCandidate": { + "type": "object", + "description": "Candidate for the logprobs token and score.", + "properties": { + "token": { + "type": "string", + "description": "The candidate’s token string value." + }, + "tokenId": { + "type": "integer", + "format": "int32", + "description": "The candidate’s token id value." + }, + "logProbability": { + "type": "number", + "format": "float", + "description": "The candidate's log probability." + } + } + }, + "UrlContextMetadata": { + "type": "object", + "description": "Metadata related to url context retrieval tool.", + "properties": { + "urlMetadata": { + "type": "array", + "description": "List of url context.", + "items": { + "$ref": "#/components/schemas/UrlMetadata" + } + } + } + }, + "UrlMetadata": { + "type": "object", + "description": "Context of the a single url retrieval.", + "properties": { + "retrievedUrl": { + "type": "string", + "description": "Retrieved url by the tool." + }, + "urlRetrievalStatus": { + "type": "string", + "description": "Status of the url retrieval.", + "enum": [ + "URL_RETRIEVAL_STATUS_UNSPECIFIED", + "URL_RETRIEVAL_STATUS_SUCCESS", + "URL_RETRIEVAL_STATUS_ERROR", + "URL_RETRIEVAL_STATUS_PAYWALL", + "URL_RETRIEVAL_STATUS_UNSAFE" + ] + } + } + }, + "PromptFeedback": { + "type": "object", + "description": "A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`.", + "properties": { + "blockReason": { + "type": "string", + "description": "Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt.", + "enum": [ + "BLOCK_REASON_UNSPECIFIED", + "SAFETY", + "OTHER", + "BLOCKLIST", + "PROHIBITED_CONTENT", + "IMAGE_SAFETY" + ] + }, + "safetyRatings": { + "type": "array", + "description": "Ratings for safety of the prompt. There is at most one rating per category.", + "items": { + "$ref": "#/components/schemas/SafetyRating" + } + } + } + }, + "UsageMetadata": { + "type": "object", + "description": "Metadata on the generation request's token usage.", + "properties": { + "promptTokenCount": { + "type": "integer", + "format": "int32", + "description": "Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content." + }, + "cachedContentTokenCount": { + "type": "integer", + "format": "int32", + "description": "Number of tokens in the cached part of the prompt (the cached content)" + }, + "candidatesTokenCount": { + "type": "integer", + "format": "int32", + "description": "Total number of tokens across all the generated response candidates." + }, + "toolUsePromptTokenCount": { + "type": "integer", + "format": "int32", + "description": "Output only. Number of tokens present in tool-use prompt(s)." + }, + "thoughtsTokenCount": { + "type": "integer", + "format": "int32", + "description": "Output only. Number of tokens of thoughts for thinking models." + }, + "totalTokenCount": { + "type": "integer", + "format": "int32", + "description": "Total token count for the generation request (prompt + thoughts + response candidates)." + }, + "promptTokensDetails": { + "type": "array", + "description": "Output only. List of modalities that were processed in the request input.", + "items": { + "$ref": "#/components/schemas/ModalityTokenCount" + } + }, + "cacheTokensDetails": { + "type": "array", + "description": "Output only. List of modalities of the cached content in the request input.", + "items": { + "$ref": "#/components/schemas/ModalityTokenCount" + } + }, + "candidatesTokensDetails": { + "type": "array", + "description": "Output only. List of modalities that were returned in the response.", + "items": { + "$ref": "#/components/schemas/ModalityTokenCount" + } + }, + "toolUsePromptTokensDetails": { + "type": "array", + "description": "Output only. List of modalities that were processed for tool-use request inputs.", + "items": { + "$ref": "#/components/schemas/ModalityTokenCount" + } + }, + "serviceTier": { + "type": "string", + "description": "Output only. Service tier of the request.", + "enum": [ + "unspecified", + "standard", + "flex", + "priority" + ] + } + } + }, + "ModalityTokenCount": { + "type": "object", + "description": "Represents token counting info for a single modality.", + "properties": { + "modality": { + "type": "string", + "description": "The modality associated with this token count.", + "enum": [ + "MODALITY_UNSPECIFIED", + "TEXT", + "IMAGE", + "VIDEO", + "AUDIO", + "DOCUMENT" + ] + }, + "tokenCount": { + "type": "integer", + "format": "int32", + "description": "Number of tokens." + } + } + }, + "ModelStatus": { + "type": "object", + "description": "The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable.", + "properties": { + "modelStage": { + "type": "string", + "description": "The stage of the underlying model.", + "enum": [ + "MODEL_STAGE_UNSPECIFIED", + "UNSTABLE_EXPERIMENTAL", + "EXPERIMENTAL", + "PREVIEW", + "STABLE", + "LEGACY", + "DEPRECATED", + "RETIRED" + ] + }, + "retirementTime": { + "type": "string", + "format": "google-datetime", + "description": "The time at which the model will be retired." + }, + "message": { + "type": "string", + "description": "A message explaining the model status." + } + } + }, + "GenerateAnswerRequest": { + "type": "object", + "description": "Request to generate a grounded answer from the `Model`.", + "properties": { + "inlinePassages": { + "$ref": "#/components/schemas/GroundingPassages" + }, + "semanticRetriever": { + "$ref": "#/components/schemas/SemanticRetrieverConfig" + }, + "contents": { + "type": "array", + "description": "Required. The content of the current conversation with the `Model`. For single-turn queries, this is a single question to answer. For multi-turn queries, this is a repeated field that contains conversation history and the last `Content` in the list containing the question. Note: `GenerateAnswer` only supports queries in English.", + "items": { + "$ref": "#/components/schemas/Content" + } + }, + "answerStyle": { + "type": "string", + "description": "Required. Style in which answers should be returned.", + "enum": [ + "ANSWER_STYLE_UNSPECIFIED", + "ABSTRACTIVE", + "EXTRACTIVE", + "VERBOSE" + ] + }, + "safetySettings": { + "type": "array", + "description": "Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateAnswerRequest.contents` and `GenerateAnswerResponse.candidate`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT are supported. Refer to the [guide](https://ai.google.dev/gemini-api/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications.", + "items": { + "$ref": "#/components/schemas/SafetySetting" + } + }, + "temperature": { + "type": "number", + "format": "float", + "description": "Optional. Controls the randomness of the output. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model. A low temperature (~0.2) is usually recommended for Attributed-Question-Answering use cases." + } + } + }, + "GroundingPassages": { + "type": "object", + "description": "A repeated list of passages.", + "properties": { + "passages": { + "type": "array", + "description": "List of passages.", + "items": { + "$ref": "#/components/schemas/GroundingPassage" + } + } + } + }, + "GroundingPassage": { + "type": "object", + "description": "Passage included inline with a grounding configuration.", + "properties": { + "id": { + "type": "string", + "description": "Identifier for the passage for attributing this passage in grounded answers." + }, + "content": { + "$ref": "#/components/schemas/Content" + } + } + }, + "SemanticRetrieverConfig": { + "type": "object", + "description": "Configuration for retrieving grounding content from a `Corpus` or `Document` created using the Semantic Retriever API.", + "properties": { + "source": { + "type": "string", + "description": "Required. Name of the resource for retrieval. Example: `corpora/123` or `corpora/123/documents/abc`." + }, + "query": { + "$ref": "#/components/schemas/Content" + }, + "metadataFilters": { + "type": "array", + "description": "Optional. Filters for selecting `Document`s and/or `Chunk`s from the resource.", + "items": { + "$ref": "#/components/schemas/MetadataFilter" + } + }, + "maxChunksCount": { + "type": "integer", + "format": "int32", + "description": "Optional. Maximum number of relevant `Chunk`s to retrieve." + }, + "minimumRelevanceScore": { + "type": "number", + "format": "float", + "description": "Optional. Minimum relevance score for retrieved relevant `Chunk`s." + } + } + }, + "MetadataFilter": { + "type": "object", + "description": "User provided filter to limit retrieval based on `Chunk` or `Document` level metadata values. Example (genre = drama OR genre = action): key = \"document.custom_metadata.genre\" conditions = [{string_value = \"drama\", operation = EQUAL}, {string_value = \"action\", operation = EQUAL}]", + "properties": { + "key": { + "type": "string", + "description": "Required. The key of the metadata to filter on." + }, + "conditions": { + "type": "array", + "description": "Required. The `Condition`s for the given key that will trigger this filter. Multiple `Condition`s are joined by logical ORs.", + "items": { + "$ref": "#/components/schemas/Condition" + } + } + } + }, + "Condition": { + "type": "object", + "description": "Filter condition applicable to a single key.", + "properties": { + "stringValue": { + "type": "string", + "description": "The string value to filter the metadata on." + }, + "numericValue": { + "type": "number", + "format": "float", + "description": "The numeric value to filter the metadata on." + }, + "operation": { + "type": "string", + "description": "Required. Operator applied to the given key-value pair to trigger the condition.", + "enum": [ + "OPERATOR_UNSPECIFIED", + "LESS", + "LESS_EQUAL", + "EQUAL", + "GREATER_EQUAL", + "GREATER", + "NOT_EQUAL", + "INCLUDES", + "EXCLUDES" + ] + } + } + }, + "GenerateAnswerResponse": { + "type": "object", + "description": "Response from the model for a grounded answer.", + "properties": { + "answer": { + "$ref": "#/components/schemas/Candidate" + }, + "answerableProbability": { + "type": "number", + "format": "float", + "description": "Output only. The model's estimate of the probability that its answer is correct and grounded in the input passages. A low `answerable_probability` indicates that the answer might not be grounded in the sources. When `answerable_probability` is low, you may want to: * Display a message to the effect of \"We couldn’t answer that question\" to the user. * Fall back to a general-purpose LLM that answers the question from world knowledge. The threshold and nature of such fallbacks will depend on individual use cases. `0.5` is a good starting threshold." + }, + "inputFeedback": { + "$ref": "#/components/schemas/InputFeedback" + } + } + }, + "InputFeedback": { + "type": "object", + "description": "Feedback related to the input data used to answer the question, as opposed to the model-generated response to the question.", + "properties": { + "blockReason": { + "type": "string", + "description": "Optional. If set, the input was blocked and no candidates are returned. Rephrase the input.", + "enum": [ + "BLOCK_REASON_UNSPECIFIED", + "SAFETY", + "OTHER" + ] + }, + "safetyRatings": { + "type": "array", + "description": "Ratings for safety of the input. There is at most one rating per category.", + "items": { + "$ref": "#/components/schemas/SafetyRating" + } + } + } + }, + "EmbedContentRequest": { + "type": "object", + "description": "Request containing the `Content` for the model to embed.", + "properties": { + "model": { + "type": "string", + "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`" + }, + "content": { + "$ref": "#/components/schemas/Content" + }, + "taskType": { + "type": "string", + "description": "Optional. Deprecated: Please use EmbedContentConfig.task_type instead. Optional task type for which the embeddings will be used. Not supported on earlier models (`models/embedding-001`).", + "enum": [ + "TASK_TYPE_UNSPECIFIED", + "RETRIEVAL_QUERY", + "RETRIEVAL_DOCUMENT", + "SEMANTIC_SIMILARITY", + "CLASSIFICATION", + "CLUSTERING", + "QUESTION_ANSWERING", + "FACT_VERIFICATION", + "CODE_RETRIEVAL_QUERY" + ] + }, + "title": { + "type": "string", + "description": "Optional. Deprecated: Please use EmbedContentConfig.title instead. An optional title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`. Note: Specifying a `title` for `RETRIEVAL_DOCUMENT` provides better quality embeddings for retrieval." + }, + "outputDimensionality": { + "type": "integer", + "format": "int32", + "description": "Optional. Deprecated: Please use EmbedContentConfig.output_dimensionality instead. Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. Supported by newer models since 2024 only. You cannot set this value if using the earlier model (`models/embedding-001`)." + }, + "embedContentConfig": { + "$ref": "#/components/schemas/EmbedContentConfig" + } + } + }, + "EmbedContentConfig": { + "type": "object", + "description": "Configurations for the EmbedContent request.", + "properties": { + "title": { + "type": "string", + "description": "Optional. The title for the text." + }, + "taskType": { + "type": "string", + "description": "Optional. The task type of the embedding.", + "enum": [ + "TASK_TYPE_UNSPECIFIED", + "RETRIEVAL_QUERY", + "RETRIEVAL_DOCUMENT", + "SEMANTIC_SIMILARITY", + "CLASSIFICATION", + "CLUSTERING", + "QUESTION_ANSWERING", + "FACT_VERIFICATION", + "CODE_RETRIEVAL_QUERY" + ] + }, + "autoTruncate": { + "type": "boolean", + "description": "Optional. Whether to silently truncate the input content if it's longer than the maximum sequence length." + }, + "outputDimensionality": { + "type": "integer", + "format": "int32", + "description": "Optional. Reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end." + }, + "documentOcr": { + "type": "boolean", + "description": "Optional. Whether to enable OCR for document content." + }, + "audioTrackExtraction": { + "type": "boolean", + "description": "Optional. Whether to extract audio from video content." + } + } + }, + "EmbedContentResponse": { + "type": "object", + "description": "The response to an `EmbedContentRequest`.", + "properties": { + "embedding": { + "$ref": "#/components/schemas/ContentEmbedding" + }, + "usageMetadata": { + "$ref": "#/components/schemas/EmbeddingUsageMetadata" + } + } + }, + "ContentEmbedding": { + "type": "object", + "description": "A list of floats representing an embedding.", + "properties": { + "values": { + "type": "array", + "description": "The embedding values. This is for 3P users only and will not be populated for 1P calls.", + "items": { + "type": "number", + "format": "float" + } + }, + "shape": { + "type": "array", + "description": "This field stores the soft tokens tensor frame shape (e.g. [1, 1, 256, 2048]).", + "items": { + "type": "integer", + "format": "int32" + } + } + } + }, + "EmbeddingUsageMetadata": { + "type": "object", + "description": "Metadata on the usage of the embedding request.", + "properties": { + "promptTokenCount": { + "type": "integer", + "format": "int32", + "description": "Output only. Number of tokens in the prompt." + }, + "promptTokenDetails": { + "type": "array", + "description": "Output only. List of modalities that were processed in the request input.", + "items": { + "$ref": "#/components/schemas/ModalityTokenCount" + } + } + } + }, + "BatchEmbedContentsRequest": { + "type": "object", + "description": "Batch request to get embeddings from the model for a list of prompts.", + "properties": { + "requests": { + "type": "array", + "description": "Required. Embed requests for the batch. The model in each of these requests must match the model specified `BatchEmbedContentsRequest.model`.", + "items": { + "$ref": "#/components/schemas/EmbedContentRequest" + } + } + } + }, + "BatchEmbedContentsResponse": { + "type": "object", + "description": "The response to a `BatchEmbedContentsRequest`.", + "properties": { + "embeddings": { + "type": "array", + "description": "Output only. The embeddings for each request, in the same order as provided in the batch request.", + "items": { + "$ref": "#/components/schemas/ContentEmbedding" + } + }, + "usageMetadata": { + "$ref": "#/components/schemas/EmbeddingUsageMetadata" + } + } + }, + "CountTokensRequest": { + "type": "object", + "description": "Counts the number of tokens in the `prompt` sent to a model. Models may tokenize text differently, so each model may return a different `token_count`.", + "properties": { + "contents": { + "type": "array", + "description": "Optional. The input given to the model as a prompt. This field is ignored when `generate_content_request` is set.", + "items": { + "$ref": "#/components/schemas/Content" + } + }, + "generateContentRequest": { + "$ref": "#/components/schemas/GenerateContentRequest" + } + } + }, + "CountTokensResponse": { + "type": "object", + "description": "A response from `CountTokens`. It returns the model's `token_count` for the `prompt`.", + "properties": { + "totalTokens": { + "type": "integer", + "format": "int32", + "description": "The number of tokens that the `Model` tokenizes the `prompt` into. Always non-negative." + }, + "cachedContentTokenCount": { + "type": "integer", + "format": "int32", + "description": "Number of tokens in the cached part of the prompt (the cached content)." + }, + "promptTokensDetails": { + "type": "array", + "description": "Output only. List of modalities that were processed in the request input.", + "items": { + "$ref": "#/components/schemas/ModalityTokenCount" + } + }, + "cacheTokensDetails": { + "type": "array", + "description": "Output only. List of modalities that were processed in the cached content.", + "items": { + "$ref": "#/components/schemas/ModalityTokenCount" + } + } + } + }, + "BatchGenerateContentRequest": { + "type": "object", + "description": "Request for a `BatchGenerateContent` operation.", + "properties": { + "batch": { + "$ref": "#/components/schemas/GenerateContentBatch" + } + } + }, + "GenerateContentBatch": { + "type": "object", + "description": "A resource representing a batch of `GenerateContent` requests.", + "properties": { + "model": { + "type": "string", + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + }, + "name": { + "type": "string", + "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`." + }, + "displayName": { + "type": "string", + "description": "Required. The user-defined name of this batch." + }, + "inputConfig": { + "$ref": "#/components/schemas/InputConfig" + }, + "output": { + "$ref": "#/components/schemas/GenerateContentBatchOutput" + }, + "createTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The time at which the batch was created." + }, + "endTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The time at which the batch processing completed." + }, + "updateTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The time at which the batch was last updated." + }, + "batchStats": { + "$ref": "#/components/schemas/BatchStats" + }, + "state": { + "type": "string", + "description": "Output only. The state of the batch.", + "enum": [ + "BATCH_STATE_UNSPECIFIED", + "BATCH_STATE_PENDING", + "BATCH_STATE_RUNNING", + "BATCH_STATE_SUCCEEDED", + "BATCH_STATE_FAILED", + "BATCH_STATE_CANCELLED", + "BATCH_STATE_EXPIRED" + ] + }, + "priority": { + "type": "string", + "format": "int64", + "description": "Optional. The priority of the batch. Batches with a higher priority value will be processed before batches with a lower priority value. Negative values are allowed. Default is 0." + } + } + }, + "InputConfig": { + "type": "object", + "description": "Configures the input to the batch request.", + "properties": { + "fileName": { + "type": "string", + "description": "The name of the `File` containing the input requests." + }, + "requests": { + "$ref": "#/components/schemas/InlinedRequests" + } + } + }, + "InlinedRequests": { + "type": "object", + "description": "The requests to be processed in the batch if provided as part of the batch creation request.", + "properties": { + "requests": { + "type": "array", + "description": "Required. The requests to be processed in the batch.", + "items": { + "$ref": "#/components/schemas/InlinedRequest" + } + } + } + }, + "InlinedRequest": { + "type": "object", + "description": "The request to be processed in the batch.", + "properties": { + "request": { + "$ref": "#/components/schemas/GenerateContentRequest" + }, + "metadata": { + "type": "object", + "description": "Optional. The metadata to be associated with the request.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "GenerateContentBatchOutput": { + "type": "object", + "description": "The output of a batch request. This is returned in the `BatchGenerateContentResponse` or the `GenerateContentBatch.output` field.", + "properties": { + "responsesFile": { + "type": "string", + "description": "Output only. The file ID of the file containing the responses. The file will be a JSONL file with a single response per line. The responses will be `GenerateContentResponse` messages formatted as JSON. The responses will be written in the same order as the input requests." + }, + "inlinedResponses": { + "$ref": "#/components/schemas/InlinedResponses" + } + } + }, + "InlinedResponses": { + "type": "object", + "description": "The responses to the requests in the batch.", + "properties": { + "inlinedResponses": { + "type": "array", + "description": "Output only. The responses to the requests in the batch.", + "items": { + "$ref": "#/components/schemas/InlinedResponse" + } + } + } + }, + "InlinedResponse": { + "type": "object", + "description": "The response to a single request in the batch.", + "properties": { + "error": { + "$ref": "#/components/schemas/Status" + }, + "response": { + "$ref": "#/components/schemas/GenerateContentResponse" + }, + "metadata": { + "type": "object", + "description": "Output only. The metadata associated with the request.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "BatchStats": { + "type": "object", + "description": "Stats about the batch.", + "properties": { + "requestCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of requests in the batch." + }, + "successfulRequestCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of requests that were successfully processed." + }, + "failedRequestCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of requests that failed to be processed." + }, + "pendingRequestCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of requests that are still pending processing." + } + } + }, + "AsyncBatchEmbedContentRequest": { + "type": "object", + "description": "Request for an `AsyncBatchEmbedContent` operation.", + "properties": { + "batch": { + "$ref": "#/components/schemas/EmbedContentBatch" + } + } + }, + "EmbedContentBatch": { + "type": "object", + "description": "A resource representing a batch of `EmbedContent` requests.", + "properties": { + "model": { + "type": "string", + "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`." + }, + "name": { + "type": "string", + "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`." + }, + "displayName": { + "type": "string", + "description": "Required. The user-defined name of this batch." + }, + "inputConfig": { + "$ref": "#/components/schemas/InputEmbedContentConfig" + }, + "output": { + "$ref": "#/components/schemas/EmbedContentBatchOutput" + }, + "createTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The time at which the batch was created." + }, + "endTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The time at which the batch processing completed." + }, + "updateTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The time at which the batch was last updated." + }, + "batchStats": { + "$ref": "#/components/schemas/EmbedContentBatchStats" + }, + "state": { + "type": "string", + "description": "Output only. The state of the batch.", + "enum": [ + "BATCH_STATE_UNSPECIFIED", + "BATCH_STATE_PENDING", + "BATCH_STATE_RUNNING", + "BATCH_STATE_SUCCEEDED", + "BATCH_STATE_FAILED", + "BATCH_STATE_CANCELLED", + "BATCH_STATE_EXPIRED" + ] + }, + "priority": { + "type": "string", + "format": "int64", + "description": "Optional. The priority of the batch. Batches with a higher priority value will be processed before batches with a lower priority value. Negative values are allowed. Default is 0." + } + } + }, + "InputEmbedContentConfig": { + "type": "object", + "description": "Configures the input to the batch request.", + "properties": { + "fileName": { + "type": "string", + "description": "The name of the `File` containing the input requests." + }, + "requests": { + "$ref": "#/components/schemas/InlinedEmbedContentRequests" + } + } + }, + "InlinedEmbedContentRequests": { + "type": "object", + "description": "The requests to be processed in the batch if provided as part of the batch creation request.", + "properties": { + "requests": { + "type": "array", + "description": "Required. The requests to be processed in the batch.", + "items": { + "$ref": "#/components/schemas/InlinedEmbedContentRequest" + } + } + } + }, + "InlinedEmbedContentRequest": { + "type": "object", + "description": "The request to be processed in the batch.", + "properties": { + "request": { + "$ref": "#/components/schemas/EmbedContentRequest" + }, + "metadata": { + "type": "object", + "description": "Optional. The metadata to be associated with the request.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "EmbedContentBatchOutput": { + "type": "object", + "description": "The output of a batch request. This is returned in the `AsyncBatchEmbedContentResponse` or the `EmbedContentBatch.output` field.", + "properties": { + "responsesFile": { + "type": "string", + "description": "Output only. The file ID of the file containing the responses. The file will be a JSONL file with a single response per line. The responses will be `EmbedContentResponse` messages formatted as JSON. The responses will be written in the same order as the input requests." + }, + "inlinedResponses": { + "$ref": "#/components/schemas/InlinedEmbedContentResponses" + } + } + }, + "InlinedEmbedContentResponses": { + "type": "object", + "description": "The responses to the requests in the batch.", + "properties": { + "inlinedResponses": { + "type": "array", + "description": "Output only. The responses to the requests in the batch.", + "items": { + "$ref": "#/components/schemas/InlinedEmbedContentResponse" + } + } + } + }, + "InlinedEmbedContentResponse": { + "type": "object", + "description": "The response to a single request in the batch.", + "properties": { + "error": { + "$ref": "#/components/schemas/Status" + }, + "response": { + "$ref": "#/components/schemas/EmbedContentResponse" + }, + "metadata": { + "type": "object", + "description": "Output only. The metadata associated with the request.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + } + } + } + }, + "EmbedContentBatchStats": { + "type": "object", + "description": "Stats about the batch.", + "properties": { + "requestCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of requests in the batch." + }, + "successfulRequestCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of requests that were successfully processed." + }, + "failedRequestCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of requests that failed to be processed." + }, + "pendingRequestCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of requests that are still pending processing." + } + } + }, + "ListCachedContentsResponse": { + "type": "object", + "description": "Response with CachedContents list.", + "properties": { + "cachedContents": { + "type": "array", + "description": "List of cached contents.", + "items": { + "$ref": "#/components/schemas/CachedContent" + } + }, + "nextPageToken": { + "type": "string", + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages." + } + } + }, + "CachedContent": { + "type": "object", + "description": "Content that has been preprocessed and can be used in subsequent request to GenerativeService. Cached content can be only used with model it was created for.", + "properties": { + "expireTime": { + "type": "string", + "format": "google-datetime", + "description": "Timestamp in UTC of when this resource is considered expired. This is *always* provided on output, regardless of what was sent on input." + }, + "ttl": { + "type": "string", + "format": "google-duration", + "description": "Input only. New TTL for this resource, input only." + }, + "name": { + "type": "string", + "description": "Output only. Identifier. The resource name referring to the cached content. Format: `cachedContents/{id}`" + }, + "displayName": { + "type": "string", + "description": "Optional. Immutable. The user-generated meaningful display name of the cached content. Maximum 128 Unicode characters." + }, + "model": { + "type": "string", + "description": "Required. Immutable. The name of the `Model` to use for cached content Format: `models/{model}`" + }, + "systemInstruction": { + "$ref": "#/components/schemas/Content" + }, + "contents": { + "type": "array", + "description": "Optional. Input only. Immutable. The content to cache.", + "items": { + "$ref": "#/components/schemas/Content" + } + }, + "tools": { + "type": "array", + "description": "Optional. Input only. Immutable. A list of `Tools` the model may use to generate the next response", + "items": { + "$ref": "#/components/schemas/Tool" + } + }, + "toolConfig": { + "$ref": "#/components/schemas/ToolConfig" + }, + "createTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. Creation time of the cache entry." + }, + "updateTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. When the cache entry was last updated in UTC time." + }, + "usageMetadata": { + "$ref": "#/components/schemas/CachedContentUsageMetadata" + } + } + }, + "CachedContentUsageMetadata": { + "type": "object", + "description": "Metadata on the usage of the cached content.", + "properties": { + "totalTokenCount": { + "type": "integer", + "format": "int32", + "description": "Total number of tokens that the cached content consumes." + } + } + }, + "GenerateMessageRequest": { + "type": "object", + "description": "Request to generate a message response from the model.", + "properties": { + "prompt": { + "$ref": "#/components/schemas/MessagePrompt" + }, + "temperature": { + "type": "number", + "format": "float", + "description": "Optional. Controls the randomness of the output. Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model." + }, + "candidateCount": { + "type": "integer", + "format": "int32", + "description": "Optional. The number of generated response messages to return. This value must be between `[1, 8]`, inclusive. If unset, this will default to `1`." + }, + "topP": { + "type": "number", + "format": "float", + "description": "Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`." + }, + "topK": { + "type": "integer", + "format": "int32", + "description": "Optional. The maximum number of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens." + } + } + }, + "MessagePrompt": { + "type": "object", + "description": "All of the structured input text passed to the model as a prompt. A `MessagePrompt` contains a structured set of fields that provide context for the conversation, examples of user input/model output message pairs that prime the model to respond in different ways, and the conversation history or list of messages representing the alternating turns of the conversation between the user and the model.", + "properties": { + "context": { + "type": "string", + "description": "Optional. Text that should be provided to the model first to ground the response. If not empty, this `context` will be given to the model first before the `examples` and `messages`. When using a `context` be sure to provide it with every request to maintain continuity. This field can be a description of your prompt to the model to help provide context and guide the responses. Examples: \"Translate the phrase from English to French.\" or \"Given a statement, classify the sentiment as happy, sad or neutral.\" Anything included in this field will take precedence over message history if the total input size exceeds the model's `input_token_limit` and the input request is truncated." + }, + "examples": { + "type": "array", + "description": "Optional. Examples of what the model should generate. This includes both user input and the response that the model should emulate. These `examples` are treated identically to conversation messages except that they take precedence over the history in `messages`: If the total input size exceeds the model's `input_token_limit` the input will be truncated. Items will be dropped from `messages` before `examples`.", + "items": { + "$ref": "#/components/schemas/Example" + } + }, + "messages": { + "type": "array", + "description": "Required. A snapshot of the recent conversation history sorted chronologically. Turns alternate between two authors. If the total input size exceeds the model's `input_token_limit` the input will be truncated: The oldest items will be dropped from `messages`.", + "items": { + "$ref": "#/components/schemas/Message" + } + } + } + }, + "Example": { + "type": "object", + "description": "An input/output example used to instruct the Model. It demonstrates how the model should respond or format its response.", + "properties": { + "input": { + "$ref": "#/components/schemas/Message" + }, + "output": { + "$ref": "#/components/schemas/Message" + } + } + }, + "Message": { + "type": "object", + "description": "The base unit of structured text. A `Message` includes an `author` and the `content` of the `Message`. The `author` is used to tag messages when they are fed to the model as text.", + "properties": { + "author": { + "type": "string", + "description": "Optional. The author of this Message. This serves as a key for tagging the content of this Message when it is fed to the model as text. The author can be any alphanumeric string." + }, + "content": { + "type": "string", + "description": "Required. The text content of the structured `Message`." + }, + "citationMetadata": { + "$ref": "#/components/schemas/CitationMetadata" + } + } + }, + "GenerateMessageResponse": { + "type": "object", + "description": "The response from the model. This includes candidate messages and conversation history in the form of chronologically-ordered messages.", + "properties": { + "candidates": { + "type": "array", + "description": "Candidate response messages from the model.", + "items": { + "$ref": "#/components/schemas/Message" + } + }, + "messages": { + "type": "array", + "description": "The conversation history used by the model.", + "items": { + "$ref": "#/components/schemas/Message" + } + }, + "filters": { + "type": "array", + "description": "A set of content filtering metadata for the prompt and response text. This indicates which `SafetyCategory`(s) blocked a candidate from this response, the lowest `HarmProbability` that triggered a block, and the HarmThreshold setting for that category.", + "items": { + "$ref": "#/components/schemas/ContentFilter" + } + } + } + }, + "ContentFilter": { + "type": "object", + "description": "Content filtering metadata associated with processing a single request. ContentFilter contains a reason and an optional supporting string. The reason may be unspecified.", + "properties": { + "reason": { + "type": "string", + "description": "The reason content was blocked during request processing.", + "enum": [ + "BLOCKED_REASON_UNSPECIFIED", + "SAFETY", + "OTHER" + ] + }, + "message": { + "type": "string", + "description": "A string that describes the filtering behavior in more detail." + } + } + }, + "CountMessageTokensRequest": { + "type": "object", + "description": "Counts the number of tokens in the `prompt` sent to a model. Models may tokenize text differently, so each model may return a different `token_count`.", + "properties": { + "prompt": { + "$ref": "#/components/schemas/MessagePrompt" + } + } + }, + "CountMessageTokensResponse": { + "type": "object", + "description": "A response from `CountMessageTokens`. It returns the model's `token_count` for the `prompt`.", + "properties": { + "tokenCount": { + "type": "integer", + "format": "int32", + "description": "The number of tokens that the `model` tokenizes the `prompt` into. Always non-negative." + } + } + }, + "CreateFileRequest": { + "type": "object", + "description": "Request for `CreateFile`.", + "properties": { + "file": { + "$ref": "#/components/schemas/File" + } + } + }, + "File": { + "type": "object", + "description": "A file uploaded to the API. Next ID: 15", + "properties": { + "videoMetadata": { + "$ref": "#/components/schemas/VideoFileMetadata" + }, + "name": { + "type": "string", + "description": "Immutable. Identifier. The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456`" + }, + "displayName": { + "type": "string", + "description": "Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: \"Welcome Image\"" + }, + "mimeType": { + "type": "string", + "description": "Output only. MIME type of the file." + }, + "sizeBytes": { + "type": "string", + "format": "int64", + "description": "Output only. Size of the file in bytes." + }, + "createTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The timestamp of when the `File` was created." + }, + "updateTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The timestamp of when the `File` was last updated." + }, + "expirationTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire." + }, + "sha256Hash": { + "type": "string", + "format": "byte", + "description": "Output only. SHA-256 hash of the uploaded bytes." + }, + "uri": { + "type": "string", + "description": "Output only. The uri of the `File`." + }, + "downloadUri": { + "type": "string", + "description": "Output only. The download uri of the `File`." + }, + "state": { + "type": "string", + "description": "Output only. Processing state of the File.", + "enum": [ + "STATE_UNSPECIFIED", + "PROCESSING", + "ACTIVE", + "FAILED" + ] + }, + "source": { + "type": "string", + "description": "Source of the File.", + "enum": [ + "SOURCE_UNSPECIFIED", + "UPLOADED", + "GENERATED", + "REGISTERED" + ] + }, + "error": { + "$ref": "#/components/schemas/Status" + } + } + }, + "VideoFileMetadata": { + "type": "object", + "description": "Metadata for a video `File`.", + "properties": { + "videoDuration": { + "type": "string", + "format": "google-duration", + "description": "Duration of the video." + } + } + }, + "CreateFileResponse": { + "type": "object", + "description": "Response for `CreateFile`.", + "properties": { + "file": { + "$ref": "#/components/schemas/File" + } + } + }, + "RegisterFilesRequest": { + "type": "object", + "description": "Request for `RegisterFiles`.", + "properties": { + "uris": { + "type": "array", + "description": "Required. The Google Cloud Storage URIs to register. Example: `gs://bucket/object`.", + "items": { + "type": "string" + } + } + } + }, + "RegisterFilesResponse": { + "type": "object", + "description": "Response for `RegisterFiles`.", + "properties": { + "files": { + "type": "array", + "description": "The registered files to be used when calling GenerateContent.", + "items": { + "$ref": "#/components/schemas/File" + } + } + } + }, + "ListFilesResponse": { + "type": "object", + "description": "Response for `ListFiles`.", + "properties": { + "files": { + "type": "array", + "description": "The list of `File`s.", + "items": { + "$ref": "#/components/schemas/File" + } + }, + "nextPageToken": { + "type": "string", + "description": "A token that can be sent as a `page_token` into a subsequent `ListFiles` call." + } + } + }, + "DownloadFileResponse": { + "type": "object", + "description": "Response for `DownloadFile`.", + "properties": {} + }, + "GeneratedFile": { + "type": "object", + "description": "A file generated on behalf of a user.", + "properties": { + "name": { + "type": "string", + "description": "Identifier. The name of the generated file. Example: `generatedFiles/abc-123`" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the generatedFile." + }, + "state": { + "type": "string", + "description": "Output only. The state of the GeneratedFile.", + "enum": [ + "STATE_UNSPECIFIED", + "GENERATING", + "GENERATED", + "FAILED" + ] + }, + "error": { + "$ref": "#/components/schemas/Status" + } + } + }, + "ListGeneratedFilesResponse": { + "type": "object", + "description": "Response for `ListGeneratedFiles`.", + "properties": { + "generatedFiles": { + "type": "array", + "description": "The list of `GeneratedFile`s.", + "items": { + "$ref": "#/components/schemas/GeneratedFile" + } + }, + "nextPageToken": { + "type": "string", + "description": "A token that can be sent as a `page_token` into a subsequent `ListGeneratedFiles` call." + } + } + }, + "Model": { + "type": "object", + "description": "Information about a Generative Language Model.", + "properties": { + "name": { + "type": "string", + "description": "Required. The resource name of the `Model`. Refer to [Model variants](https://ai.google.dev/gemini-api/docs/models/gemini#model-variations) for all allowed values. Format: `models/{model}` with a `{model}` naming convention of: * \"{base_model_id}-{version}\" Examples: * `models/gemini-1.5-flash-001`" + }, + "baseModelId": { + "type": "string", + "description": "Required. The name of the base model, pass this to the generation request. Examples: * `gemini-1.5-flash`" + }, + "version": { + "type": "string", + "description": "Required. The version number of the model. This represents the major version (`1.0` or `1.5`)" + }, + "displayName": { + "type": "string", + "description": "The human-readable name of the model. E.g. \"Gemini 1.5 Flash\". The name can be up to 128 characters long and can consist of any UTF-8 characters." + }, + "description": { + "type": "string", + "description": "A short description of the model." + }, + "inputTokenLimit": { + "type": "integer", + "format": "int32", + "description": "Maximum number of input tokens allowed for this model." + }, + "outputTokenLimit": { + "type": "integer", + "format": "int32", + "description": "Maximum number of output tokens available for this model." + }, + "supportedGenerationMethods": { + "type": "array", + "description": "The model's supported generation methods. The corresponding API method names are defined as Pascal case strings, such as `generateMessage` and `generateContent`.", + "items": { + "type": "string" + } + }, + "temperature": { + "type": "number", + "format": "float", + "description": "Controls the randomness of the output. Values can range over `[0.0,max_temperature]`, inclusive. A higher value will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model. This value specifies default to be used by the backend while making the call to the model." + }, + "maxTemperature": { + "type": "number", + "format": "float", + "description": "The maximum temperature this model can use." + }, + "topP": { + "type": "number", + "format": "float", + "description": "For [Nucleus sampling](https://ai.google.dev/gemini-api/docs/prompting-strategies#top-p). Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`. This value specifies default to be used by the backend while making the call to the model." + }, + "topK": { + "type": "integer", + "format": "int32", + "description": "For Top-k sampling. Top-k sampling considers the set of `top_k` most probable tokens. This value specifies default to be used by the backend while making the call to the model. If empty, indicates the model doesn't use top-k sampling, and `top_k` isn't allowed as a generation parameter." + }, + "thinking": { + "type": "boolean", + "description": "Whether the model supports thinking." + } + } + }, + "ListModelsResponse": { + "type": "object", + "description": "Response from `ListModel` containing a paginated list of Models.", + "properties": { + "models": { + "type": "array", + "description": "The returned Models.", + "items": { + "$ref": "#/components/schemas/Model" + } + }, + "nextPageToken": { + "type": "string", + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages." + } + } + }, + "TunedModel": { + "type": "object", + "description": "A fine-tuned model created using ModelService.CreateTunedModel.", + "properties": { + "tunedModelSource": { + "$ref": "#/components/schemas/TunedModelSource" + }, + "baseModel": { + "type": "string", + "description": "Immutable. The name of the `Model` to tune. Example: `models/gemini-1.5-flash-001`" + }, + "name": { + "type": "string", + "description": "Output only. The tuned model name. A unique name will be generated on create. Example: `tunedModels/az2mb0bpw6i` If display_name is set on create, the id portion of the name will be set by concatenating the words of the display_name with hyphens and adding a random portion for uniqueness. Example: * display_name = `Sentence Translator` * name = `tunedModels/sentence-translator-u3b7m`" + }, + "displayName": { + "type": "string", + "description": "Optional. The name to display for this model in user interfaces. The display name must be up to 40 characters including spaces." + }, + "description": { + "type": "string", + "description": "Optional. A short description of this model." + }, + "temperature": { + "type": "number", + "format": "float", + "description": "Optional. Controls the randomness of the output. Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model. This value specifies default to be the one used by the base model while creating the model." + }, + "topP": { + "type": "number", + "format": "float", + "description": "Optional. For Nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`. This value specifies default to be the one used by the base model while creating the model." + }, + "topK": { + "type": "integer", + "format": "int32", + "description": "Optional. For Top-k sampling. Top-k sampling considers the set of `top_k` most probable tokens. This value specifies default to be used by the backend while making the call to the model. This value specifies default to be the one used by the base model while creating the model." + }, + "state": { + "type": "string", + "description": "Output only. The state of the tuned model.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "FAILED" + ] + }, + "createTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The timestamp when this model was created." + }, + "updateTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The timestamp when this model was updated." + }, + "tuningTask": { + "$ref": "#/components/schemas/TuningTask" + }, + "readerProjectNumbers": { + "type": "array", + "description": "Optional. List of project numbers that have read access to the tuned model.", + "items": { + "type": "string", + "format": "int64" + } + } + } + }, + "TunedModelSource": { + "type": "object", + "description": "Tuned model as a source for training a new model.", + "properties": { + "tunedModel": { + "type": "string", + "description": "Immutable. The name of the `TunedModel` to use as the starting point for training the new model. Example: `tunedModels/my-tuned-model`" + }, + "baseModel": { + "type": "string", + "description": "Output only. The name of the base `Model` this `TunedModel` was tuned from. Example: `models/gemini-1.5-flash-001`" + } + } + }, + "TuningTask": { + "type": "object", + "description": "Tuning tasks that create tuned models.", + "properties": { + "startTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The timestamp when tuning this model started." + }, + "completeTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The timestamp when tuning this model completed." + }, + "snapshots": { + "type": "array", + "description": "Output only. Metrics collected during tuning.", + "items": { + "$ref": "#/components/schemas/TuningSnapshot" + } + }, + "trainingData": { + "$ref": "#/components/schemas/Dataset" + }, + "hyperparameters": { + "$ref": "#/components/schemas/Hyperparameters" + } + } + }, + "TuningSnapshot": { + "type": "object", + "description": "Record for a single tuning step.", + "properties": { + "step": { + "type": "integer", + "format": "int32", + "description": "Output only. The tuning step." + }, + "epoch": { + "type": "integer", + "format": "int32", + "description": "Output only. The epoch this step was part of." + }, + "meanLoss": { + "type": "number", + "format": "float", + "description": "Output only. The mean loss of the training examples for this step." + }, + "computeTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The timestamp when this metric was computed." + } + } + }, + "Dataset": { + "type": "object", + "description": "Dataset for training or validation.", + "properties": { + "examples": { + "$ref": "#/components/schemas/TuningExamples" + } + } + }, + "TuningExamples": { + "type": "object", + "description": "A set of tuning examples. Can be training or validation data.", + "properties": { + "examples": { + "type": "array", + "description": "The examples. Example input can be for text or discuss, but all examples in a set must be of the same type.", + "items": { + "$ref": "#/components/schemas/TuningExample" + } + } + } + }, + "TuningExample": { + "type": "object", + "description": "A single example for tuning.", + "properties": { + "textInput": { + "type": "string", + "description": "Optional. Text model input." + }, + "output": { + "type": "string", + "description": "Required. The expected model output." + } + } + }, + "Hyperparameters": { + "type": "object", + "description": "Hyperparameters controlling the tuning process. Read more at https://ai.google.dev/docs/model_tuning_guidance", + "properties": { + "learningRate": { + "type": "number", + "format": "float", + "description": "Optional. Immutable. The learning rate hyperparameter for tuning. If not set, a default of 0.001 or 0.0002 will be calculated based on the number of training examples." + }, + "learningRateMultiplier": { + "type": "number", + "format": "float", + "description": "Optional. Immutable. The learning rate multiplier is used to calculate a final learning_rate based on the default (recommended) value. Actual learning rate := learning_rate_multiplier * default learning rate Default learning rate is dependent on base model and dataset size. If not set, a default of 1.0 will be used." + }, + "epochCount": { + "type": "integer", + "format": "int32", + "description": "Immutable. The number of training epochs. An epoch is one pass through the training data. If not set, a default of 5 will be used." + }, + "batchSize": { + "type": "integer", + "format": "int32", + "description": "Immutable. The batch size hyperparameter for tuning. If not set, a default of 4 or 16 will be used based on the number of training examples." + } + } + }, + "ListTunedModelsResponse": { + "type": "object", + "description": "Response from `ListTunedModels` containing a paginated list of Models.", + "properties": { + "tunedModels": { + "type": "array", + "description": "The returned Models.", + "items": { + "$ref": "#/components/schemas/TunedModel" + } + }, + "nextPageToken": { + "type": "string", + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages." + } + } + }, + "Permission": { + "type": "object", + "description": "Permission resource grants user, group or the rest of the world access to the PaLM API resource (e.g. a tuned model, corpus). A role is a collection of permitted operations that allows users to perform specific actions on PaLM API resources. To make them available to users, groups, or service accounts, you assign roles. When you assign a role, you grant permissions that the role contains. There are three concentric roles. Each role is a superset of the previous role's permitted operations: - reader can use the resource (e.g. tuned model, corpus) for inference - writer has reader's permissions and additionally can edit and share - owner has writer's permissions and additionally can delete", + "properties": { + "name": { + "type": "string", + "description": "Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only." + }, + "granteeType": { + "type": "string", + "description": "Optional. Immutable. The type of the grantee.", + "enum": [ + "GRANTEE_TYPE_UNSPECIFIED", + "USER", + "GROUP", + "EVERYONE" + ] + }, + "emailAddress": { + "type": "string", + "description": "Optional. Immutable. The email address of the user of group which this permission refers. Field is not set when permission's grantee type is EVERYONE." + }, + "role": { + "type": "string", + "description": "Required. The role granted by this permission.", + "enum": [ + "ROLE_UNSPECIFIED", + "OWNER", + "WRITER", + "READER" + ] + } + } + }, + "ListPermissionsResponse": { + "type": "object", + "description": "Response from `ListPermissions` containing a paginated list of permissions.", + "properties": { + "permissions": { + "type": "array", + "description": "Returned permissions.", + "items": { + "$ref": "#/components/schemas/Permission" + } + }, + "nextPageToken": { + "type": "string", + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages." + } + } + }, + "TransferOwnershipRequest": { + "type": "object", + "description": "Request to transfer the ownership of the tuned model.", + "properties": { + "emailAddress": { + "type": "string", + "description": "Required. The email address of the user to whom the tuned model is being transferred to." + } + } + }, + "TransferOwnershipResponse": { + "type": "object", + "description": "Response from `TransferOwnership`.", + "properties": {} + }, + "PredictRequest": { + "type": "object", + "description": "Request message for PredictionService.Predict.", + "properties": { + "instances": { + "type": "array", + "description": "Required. The instances that are the input to the prediction call.", + "items": { + "type": "any" + } + }, + "parameters": { + "type": "any", + "description": "Optional. The parameters that govern the prediction call." + } + } + }, + "PredictResponse": { + "type": "object", + "description": "Response message for [PredictionService.Predict].", + "properties": { + "predictions": { + "type": "array", + "description": "The outputs of the prediction call.", + "items": { + "type": "any" + } + } + } + }, + "PredictLongRunningRequest": { + "type": "object", + "description": "Request message for [PredictionService.PredictLongRunning].", + "properties": { + "instances": { + "type": "array", + "description": "Required. The instances that are the input to the prediction call.", + "items": { + "type": "any" + } + }, + "parameters": { + "type": "any", + "description": "Optional. The parameters that govern the prediction call." + } + } + }, + "FileSearchStore": { + "type": "object", + "description": "A `FileSearchStore` is a collection of `Document`s.", + "properties": { + "name": { + "type": "string", + "description": "Output only. Immutable. Identifier. The `FileSearchStore` resource name. It is an ID (name excluding the \"fileSearchStores/\" prefix) that can contain up to 40 characters that are lowercase alphanumeric or dashes (-). It is output only. The unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/my-awesome-file-search-store-123a456b789c` If `display_name` is not provided, the name will be randomly generated." + }, + "displayName": { + "type": "string", + "description": "Optional. The human-readable display name for the `FileSearchStore`. The display name must be no more than 512 characters in length, including spaces. Example: \"Docs on Semantic Retriever\"" + }, + "createTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The Timestamp of when the `FileSearchStore` was created." + }, + "updateTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The Timestamp of when the `FileSearchStore` was last updated." + }, + "activeDocumentsCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of documents in the `FileSearchStore` that are active and ready for retrieval." + }, + "pendingDocumentsCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of documents in the `FileSearchStore` that are being processed." + }, + "failedDocumentsCount": { + "type": "string", + "format": "int64", + "description": "Output only. The number of documents in the `FileSearchStore` that have failed processing." + }, + "sizeBytes": { + "type": "string", + "format": "int64", + "description": "Output only. The size of raw bytes ingested into the `FileSearchStore`. This is the total size of all the documents in the `FileSearchStore`." + }, + "embeddingModel": { + "type": "string", + "description": "Optional. The embedding model to use for the `FileSearchStore`. The model's resource name. This serves as an ID for the Model to use. Format: `models/{model}`. If not specified, the default embedding model will be used." + } + } + }, + "Corpus": { + "type": "object", + "description": "A `Corpus` is a collection of `Document`s. A project can create up to 10 corpora.", + "properties": { + "name": { + "type": "string", + "description": "Output only. Immutable. Identifier. The `Corpus` resource name. The ID (name excluding the \"corpora/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `corpora/my-awesome-corpora-123a456b789c`" + }, + "displayName": { + "type": "string", + "description": "Optional. The human-readable display name for the `Corpus`. The display name must be no more than 512 characters in length, including spaces. Example: \"Docs on Semantic Retriever\"" + }, + "createTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The Timestamp of when the `Corpus` was created." + }, + "updateTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The Timestamp of when the `Corpus` was last updated." + } + } + }, + "ListFileSearchStoresResponse": { + "type": "object", + "description": "Response from `ListFileSearchStores` containing a paginated list of `FileSearchStores`. The results are sorted by ascending `file_search_store.create_time`.", + "properties": { + "fileSearchStores": { + "type": "array", + "description": "The returned rag_stores.", + "items": { + "$ref": "#/components/schemas/FileSearchStore" + } + }, + "nextPageToken": { + "type": "string", + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages." + } + } + }, + "ListCorporaResponse": { + "type": "object", + "description": "Response from `ListCorpora` containing a paginated list of `Corpora`. The results are sorted by ascending `corpus.create_time`.", + "properties": { + "corpora": { + "type": "array", + "description": "The returned corpora.", + "items": { + "$ref": "#/components/schemas/Corpus" + } + }, + "nextPageToken": { + "type": "string", + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages." + } + } + }, + "Document": { + "type": "object", + "description": "A `Document` is a collection of `Chunk`s.", + "properties": { + "name": { + "type": "string", + "description": "Immutable. Identifier. The `Document` resource name. The ID (name excluding the \"fileSearchStores/*/documents/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/{file_search_store_id}/documents/my-awesome-doc-123a456b789c`" + }, + "displayName": { + "type": "string", + "description": "Optional. The human-readable display name for the `Document`. The display name must be no more than 512 characters in length, including spaces. Example: \"Semantic Retriever Documentation\"" + }, + "customMetadata": { + "type": "array", + "description": "Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`.", + "items": { + "$ref": "#/components/schemas/CustomMetadata" + } + }, + "updateTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The Timestamp of when the `Document` was last updated." + }, + "createTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The Timestamp of when the `Document` was created." + }, + "state": { + "type": "string", + "description": "Output only. Current state of the `Document`.", + "enum": [ + "STATE_UNSPECIFIED", + "STATE_PENDING", + "STATE_ACTIVE", + "STATE_FAILED" + ] + }, + "sizeBytes": { + "type": "string", + "format": "int64", + "description": "Output only. The size of raw bytes ingested into the Document." + }, + "mimeType": { + "type": "string", + "description": "Output only. The mime type of the Document." + } + } + }, + "CustomMetadata": { + "type": "object", + "description": "User provided metadata stored as key-value pairs.", + "properties": { + "stringValue": { + "type": "string", + "description": "The string value of the metadata to store." + }, + "stringListValue": { + "$ref": "#/components/schemas/StringList" + }, + "numericValue": { + "type": "number", + "format": "float", + "description": "The numeric value of the metadata to store." + }, + "key": { + "type": "string", + "description": "Required. The key of the metadata to store." + } + } + }, + "StringList": { + "type": "object", + "description": "User provided string values assigned to a single metadata key.", + "properties": { + "values": { + "type": "array", + "description": "The string values of the metadata to store.", + "items": { + "type": "string" + } + } + } + }, + "ListDocumentsResponse": { + "type": "object", + "description": "Response from `ListDocuments` containing a paginated list of `Document`s. The `Document`s are sorted by ascending `document.create_time`.", + "properties": { + "documents": { + "type": "array", + "description": "The returned `Document`s.", + "items": { + "$ref": "#/components/schemas/Document" + } + }, + "nextPageToken": { + "type": "string", + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages." + } + } + }, + "ImportFileRequest": { + "type": "object", + "description": "Request for `ImportFile` to import a File API file with a `FileSearchStore`.", + "properties": { + "fileName": { + "type": "string", + "description": "Required. The name of the `File` to import. Example: `files/abc-123`" + }, + "customMetadata": { + "type": "array", + "description": "Custom metadata to be associated with the file.", + "items": { + "$ref": "#/components/schemas/CustomMetadata" + } + }, + "chunkingConfig": { + "$ref": "#/components/schemas/ChunkingConfig" + } + } + }, + "ChunkingConfig": { + "type": "object", + "description": "Parameters for telling the service how to chunk the file. inspired by google3/cloud/ai/platform/extension/lib/retrieval/config/chunker_config.proto", + "properties": { + "whiteSpaceConfig": { + "$ref": "#/components/schemas/WhiteSpaceConfig" + } + } + }, + "WhiteSpaceConfig": { + "type": "object", + "description": "Configuration for a white space chunking algorithm [white space delimited].", + "properties": { + "maxTokensPerChunk": { + "type": "integer", + "format": "int32", + "description": "Maximum number of tokens per chunk. Tokens are defined as words for this chunking algorithm. Note: we are defining tokens as words split by whitespace as opposed to the output of a tokenizer. The context window of the latest gemini embedding model as of 2025-04-17 is currently 8192 tokens. We assume that the average word is 5 characters. Therefore, we set the upper limit to 2**9, which is 512 words, or 2560 tokens, assuming worst case a character per token. This is a conservative estimate meant to prevent context window overflow." + }, + "maxOverlapTokens": { + "type": "integer", + "format": "int32", + "description": "Maximum number of overlapping tokens between two adjacent chunks." + } + } + }, + "UploadToFileSearchStoreRequest": { + "type": "object", + "description": "Request for `UploadToFileSearchStore`.", + "properties": { + "displayName": { + "type": "string", + "description": "Optional. Display name of the created document." + }, + "customMetadata": { + "type": "array", + "description": "Custom metadata to be associated with the data.", + "items": { + "$ref": "#/components/schemas/CustomMetadata" + } + }, + "chunkingConfig": { + "$ref": "#/components/schemas/ChunkingConfig" + }, + "mimeType": { + "type": "string", + "description": "Optional. MIME type of the data. If not provided, it will be inferred from the uploaded content." + } + } + }, + "CustomLongRunningOperation": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/Status" + }, + "response": { + "type": "object", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + }, + "name": { + "type": "string", + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`." + }, + "metadata": { + "type": "object", + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + }, + "done": { + "type": "boolean", + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available." + } + } + }, + "DownloadMediaResponse": { + "type": "object", + "description": "Response for DownloadMedia.", + "properties": { + "blob": { + "$ref": "#/components/schemas/GdataMedia" + } + } + }, + "GdataMedia": { + "type": "object", + "description": "A reference to data stored on the filesystem, on GFS or in blobstore.", + "properties": { + "contentType": { + "type": "string", + "description": "MIME type of the data" + }, + "timestamp": { + "type": "string", + "format": "uint64", + "description": "Time at which the media data was last updated, in milliseconds since UNIX epoch" + }, + "token": { + "type": "string", + "description": "A unique fingerprint/version id for the media data" + }, + "length": { + "type": "string", + "format": "int64", + "description": "Size of the data, in bytes" + }, + "filename": { + "type": "string", + "description": "Original file name" + }, + "referenceType": { + "type": "string", + "description": "Describes what the field reference contains.", + "enum": [ + "PATH", + "BLOB_REF", + "INLINE", + "GET_MEDIA", + "COMPOSITE_MEDIA", + "BIGSTORE_REF", + "DIFF_VERSION_RESPONSE", + "DIFF_CHECKSUMS_RESPONSE", + "DIFF_DOWNLOAD_RESPONSE", + "DIFF_UPLOAD_REQUEST", + "DIFF_UPLOAD_RESPONSE", + "COSMO_BINARY_REFERENCE", + "ARBITRARY_BYTES" + ] + }, + "path": { + "type": "string", + "description": "Path to the data, set if reference_type is PATH" + }, + "blobRef": { + "type": "string", + "format": "byte", + "description": "Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte representation of a blobstore.BlobRef. Since Blobstore is deprecating v1, use blobstore2_info instead. For now, any v2 blob will also be represented in this field as v1 BlobRef." + }, + "inline": { + "type": "string", + "format": "byte", + "description": "Media data, set if reference_type is INLINE" + }, + "mediaId": { + "type": "string", + "format": "byte", + "description": "Media id to forward to the operation GetMedia. Can be set if reference_type is GET_MEDIA." + }, + "hash": { + "type": "string", + "description": "Deprecated, use one of explicit hash type fields instead. These two hash related fields will only be populated on Scotty based media uploads and will contain the content of the hash group in the NotificationRequest: http://cs/#google3/blobstore2/api/scotty/service/proto/upload_listener.proto&q=class:Hash Hex encoded hash value of the uploaded media." + }, + "algorithm": { + "type": "string", + "description": "Deprecated, use one of explicit hash type fields instead. Algorithm used for calculating the hash. As of 2011/01/21, \"MD5\" is the only possible value for this field. New values may be added at any time." + }, + "compositeMedia": { + "type": "array", + "description": "A composite media composed of one or more media objects, set if reference_type is COMPOSITE_MEDIA. The media length field must be set to the sum of the lengths of all composite media objects. Note: All composite media must have length specified.", + "items": { + "$ref": "#/components/schemas/CompositeMedia" + } + }, + "bigstoreObjectRef": { + "type": "string", + "format": "byte", + "description": "Use object_id instead." + }, + "objectId": { + "$ref": "#/components/schemas/ObjectId" + }, + "blobstore2Info": { + "$ref": "#/components/schemas/Blobstore2Info" + }, + "diffVersionResponse": { + "$ref": "#/components/schemas/DiffVersionResponse" + }, + "diffChecksumsResponse": { + "$ref": "#/components/schemas/DiffChecksumsResponse" + }, + "diffDownloadResponse": { + "$ref": "#/components/schemas/DiffDownloadResponse" + }, + "diffUploadRequest": { + "$ref": "#/components/schemas/DiffUploadRequest" + }, + "diffUploadResponse": { + "$ref": "#/components/schemas/DiffUploadResponse" + }, + "contentTypeInfo": { + "$ref": "#/components/schemas/ContentTypeInfo" + }, + "downloadParameters": { + "$ref": "#/components/schemas/DownloadParameters" + }, + "crc32cHash": { + "type": "integer", + "format": "uint32", + "description": "For Scotty Uploads: Scotty-provided hashes for uploads For Scotty Downloads: (WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.) A Hash provided by the agent to be used to verify the data being downloaded. Currently only supported for inline payloads. Further, only crc32c_hash is currently supported." + }, + "md5Hash": { + "type": "string", + "format": "byte", + "description": "Scotty-provided MD5 hash for an upload." + }, + "sha1Hash": { + "type": "string", + "format": "byte", + "description": "Scotty-provided SHA1 hash for an upload." + }, + "sha256Hash": { + "type": "string", + "format": "byte", + "description": "Scotty-provided SHA256 hash for an upload." + }, + "sha512Hash": { + "type": "string", + "format": "byte", + "description": "Scotty-provided SHA512 hash for an upload." + }, + "isPotentialRetry": { + "type": "boolean", + "description": "|is_potential_retry| is set false only when Scotty is certain that it has not sent the request before. When a client resumes an upload, this field must be set true in agent calls, because Scotty cannot be certain that it has never sent the request before due to potential failure in the session state persistence." + }, + "cosmoBinaryReference": { + "type": "string", + "format": "byte", + "description": "A binary data reference for a media download. Serves as a technology-agnostic binary reference in some Google infrastructure. This value is a serialized storage_cosmo.BinaryReference proto. Storing it as bytes is a hack to get around the fact that the cosmo proto (as well as others it includes) doesn't support JavaScript. This prevents us from including the actual type of this field." + }, + "hashVerified": { + "type": "boolean", + "description": "For Scotty uploads only. If a user sends a hash code and the backend has requested that Scotty verify the upload against the client hash, Scotty will perform the check on behalf of the backend and will reject it if the hashes don't match. This is set to true if Scotty performed this verification." + } + } + }, + "CompositeMedia": { + "type": "object", + "description": "A sequence of media data references representing composite data. Introduced to support Bigstore composite objects. For details, visit http://go/bigstore-composites.", + "properties": { + "length": { + "type": "string", + "format": "int64", + "description": "Size of the data, in bytes" + }, + "referenceType": { + "type": "string", + "description": "Describes what the field reference contains.", + "enum": [ + "PATH", + "BLOB_REF", + "INLINE", + "BIGSTORE_REF", + "COSMO_BINARY_REFERENCE" + ] + }, + "path": { + "type": "string", + "description": "Path to the data, set if reference_type is PATH" + }, + "blobRef": { + "type": "string", + "format": "byte", + "description": "Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte representation of a blobstore.BlobRef. Since Blobstore is deprecating v1, use blobstore2_info instead. For now, any v2 blob will also be represented in this field as v1 BlobRef." + }, + "inline": { + "type": "string", + "format": "byte", + "description": "Media data, set if reference_type is INLINE" + }, + "objectId": { + "$ref": "#/components/schemas/ObjectId" + }, + "blobstore2Info": { + "$ref": "#/components/schemas/Blobstore2Info" + }, + "cosmoBinaryReference": { + "type": "string", + "format": "byte", + "description": "A binary data reference for a media download. Serves as a technology-agnostic binary reference in some Google infrastructure. This value is a serialized storage_cosmo.BinaryReference proto. Storing it as bytes is a hack to get around the fact that the cosmo proto (as well as others it includes) doesn't support JavaScript. This prevents us from including the actual type of this field." + }, + "crc32cHash": { + "type": "integer", + "format": "uint32", + "description": "crc32.c hash for the payload." + }, + "md5Hash": { + "type": "string", + "format": "byte", + "description": "MD5 hash for the payload." + }, + "sha1Hash": { + "type": "string", + "format": "byte", + "description": "SHA-1 hash for the payload." + } + } + }, + "ObjectId": { + "type": "object", + "description": "This is a copy of the tech.blob.ObjectId proto, which could not be used directly here due to transitive closure issues with JavaScript support; see http://b/8801763.", + "properties": { + "bucketName": { + "type": "string", + "description": "The name of the bucket to which this object belongs." + }, + "objectName": { + "type": "string", + "description": "The name of the object." + }, + "generation": { + "type": "string", + "format": "int64", + "description": "Generation of the object. Generations are monotonically increasing across writes, allowing them to be be compared to determine which generation is newer. If this is omitted in a request, then you are requesting the live object. See http://go/bigstore-versions" + } + } + }, + "Blobstore2Info": { + "type": "object", + "description": "Information to read/write to blobstore2.", + "properties": { + "blobId": { + "type": "string", + "description": "The blob id, e.g., /blobstore/prod/playground/scotty" + }, + "blobGeneration": { + "type": "string", + "format": "int64", + "description": "The blob generation id." + }, + "readToken": { + "type": "string", + "description": "The blob read token. Needed to read blobs that have not been replicated. Might not be available until the final call." + }, + "uploadMetadataContainer": { + "type": "string", + "format": "byte", + "description": "Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a signed, serialized blobstore2.BlobMetadataContainer proto which must never be consumed outside of Bigstore, and is not applicable to non-GCS media uploads." + }, + "downloadReadHandle": { + "type": "string", + "format": "byte", + "description": "Read handle passed from Bigstore -> Scotty for a GCS download. This is a signed, serialized blobstore2.ReadHandle proto which must never be set outside of Bigstore, and is not applicable to non-GCS media downloads." + }, + "downloadExternalReadToken": { + "type": "string", + "format": "byte", + "description": "A serialized External Read Token passed from Bigstore -> Scotty for a GCS download. This field must never be consumed outside of Bigstore, and is not applicable to non-GCS media uploads." + }, + "uploadFragmentListCreationInfo": { + "type": "string", + "format": "byte", + "description": "A serialized Object Fragment List Creation Info passed from Bigstore -> Scotty for a GCS upload. This field must never be consumed outside of Bigstore, and is not applicable to non-GCS media uploads." + } + } + }, + "DiffVersionResponse": { + "type": "object", + "description": "Backend response for a Diff get version response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", + "properties": { + "objectVersion": { + "type": "string", + "description": "The version of the object stored at the server." + }, + "objectSizeBytes": { + "type": "string", + "format": "int64", + "description": "The total size of the server object." + } + } + }, + "DiffChecksumsResponse": { + "type": "object", + "description": "Backend response for a Diff get checksums response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", + "properties": { + "objectVersion": { + "type": "string", + "description": "The object version of the object the checksums are being returned for." + }, + "objectSizeBytes": { + "type": "string", + "format": "int64", + "description": "The total size of the server object." + }, + "chunkSizeBytes": { + "type": "string", + "format": "int64", + "description": "The chunk size of checksums. Must be a multiple of 256KB." + }, + "checksumsLocation": { + "$ref": "#/components/schemas/CompositeMedia" + }, + "objectLocation": { + "$ref": "#/components/schemas/CompositeMedia" + } + } + }, + "DiffDownloadResponse": { + "type": "object", + "description": "Backend response for a Diff download response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", + "properties": { + "objectLocation": { + "$ref": "#/components/schemas/CompositeMedia" + } + } + }, + "DiffUploadRequest": { + "type": "object", + "description": "A Diff upload request. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", + "properties": { + "objectVersion": { + "type": "string", + "description": "The object version of the object that is the base version the incoming diff script will be applied to. This field will always be filled in." + }, + "objectInfo": { + "$ref": "#/components/schemas/CompositeMedia" + }, + "checksumsInfo": { + "$ref": "#/components/schemas/CompositeMedia" + } + } + }, + "DiffUploadResponse": { + "type": "object", + "description": "Backend response for a Diff upload request. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", + "properties": { + "objectVersion": { + "type": "string", + "description": "The object version of the object at the server. Must be included in the end notification response. The version in the end notification response must correspond to the new version of the object that is now stored at the server, after the upload." + }, + "originalObject": { + "$ref": "#/components/schemas/CompositeMedia" + } + } + }, + "ContentTypeInfo": { + "type": "object", + "description": "Detailed Content-Type information from Scotty. The Content-Type of the media will typically be filled in by the header or Scotty's best_guess, but this extended information provides the backend with more information so that it can make a better decision if needed. This is only used on media upload requests from Scotty.", + "properties": { + "bestGuess": { + "type": "string", + "description": "Scotty's best guess of what the content type of the file is." + }, + "fromHeader": { + "type": "string", + "description": "The content type of the file as specified in the request headers, multipart headers, or RUPIO start request." + }, + "fromFileName": { + "type": "string", + "description": "The content type of the file derived from the file extension of the original file name used by the client." + }, + "fromUrlPath": { + "type": "string", + "description": "The content type of the file derived from the file extension of the URL path. The URL path is assumed to represent a file name (which is typically only true for agents that are providing a REST API)." + }, + "fromBytes": { + "type": "string", + "description": "The content type of the file derived by looking at specific bytes (i.e. \"magic bytes\") of the actual file." + }, + "fromFusionId": { + "type": "string", + "description": "The content type of the file detected by Fusion ID. go/fusionid" + }, + "fusionIdDetectionMetadata": { + "type": "string", + "format": "byte", + "description": "Metadata information from Fusion ID detection. Serialized FusionIdDetectionMetadata proto. Only set if from_fusion_id is set." + } + } + }, + "DownloadParameters": { + "type": "object", + "description": "Parameters specific to media downloads.", + "properties": { + "allowGzipCompression": { + "type": "boolean", + "description": "A boolean to be returned in the response to Scotty. Allows/disallows gzip encoding of the payload content when the server thinks it's advantageous (hence, does not guarantee compression) which allows Scotty to GZip the response to the client." + }, + "ignoreRange": { + "type": "boolean", + "description": "Determining whether or not Apiary should skip the inclusion of any Content-Range header on its response to Scotty." + } + } + }, + "GenerateTextRequest": { + "type": "object", + "description": "Request to generate a text completion response from the model.", + "properties": { + "prompt": { + "$ref": "#/components/schemas/TextPrompt" + }, + "temperature": { + "type": "number", + "format": "float", + "description": "Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned the `getModel` function. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model." + }, + "candidateCount": { + "type": "integer", + "format": "int32", + "description": "Optional. Number of generated responses to return. This value must be between [1, 8], inclusive. If unset, this will default to 1." + }, + "maxOutputTokens": { + "type": "integer", + "format": "int32", + "description": "Optional. The maximum number of tokens to include in a candidate. If unset, this will default to output_token_limit specified in the `Model` specification." + }, + "topP": { + "type": "number", + "format": "float", + "description": "Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits number of tokens based on the cumulative probability. Note: The default value varies by model, see the `Model.top_p` attribute of the `Model` returned the `getModel` function." + }, + "topK": { + "type": "integer", + "format": "int32", + "description": "Optional. The maximum number of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Defaults to 40. Note: The default value varies by model, see the `Model.top_k` attribute of the `Model` returned the `getModel` function." + }, + "safetySettings": { + "type": "array", + "description": "Optional. A list of unique `SafetySetting` instances for blocking unsafe content. that will be enforced on the `GenerateTextRequest.prompt` and `GenerateTextResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any prompts and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_DEROGATORY, HARM_CATEGORY_TOXICITY, HARM_CATEGORY_VIOLENCE, HARM_CATEGORY_SEXUAL, HARM_CATEGORY_MEDICAL, HARM_CATEGORY_DANGEROUS are supported in text service.", + "items": { + "$ref": "#/components/schemas/SafetySetting" + } + }, + "stopSequences": { + "type": "array", + "description": "The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a stop sequence. The stop sequence will not be included as part of the response.", + "items": { + "type": "string" + } + } + } + }, + "TextPrompt": { + "type": "object", + "description": "Text given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion.", + "properties": { + "text": { + "type": "string", + "description": "Required. The prompt text." + } + } + }, + "GenerateTextResponse": { + "type": "object", + "description": "The response from the model, including candidate completions.", + "properties": { + "candidates": { + "type": "array", + "description": "Candidate responses from the model.", + "items": { + "$ref": "#/components/schemas/TextCompletion" + } + }, + "filters": { + "type": "array", + "description": "A set of content filtering metadata for the prompt and response text. This indicates which `SafetyCategory`(s) blocked a candidate from this response, the lowest `HarmProbability` that triggered a block, and the HarmThreshold setting for that category. This indicates the smallest change to the `SafetySettings` that would be necessary to unblock at least 1 response. The blocking is configured by the `SafetySettings` in the request (or the default `SafetySettings` of the API).", + "items": { + "$ref": "#/components/schemas/ContentFilter" + } + }, + "safetyFeedback": { + "type": "array", + "description": "Returns any safety feedback related to content filtering.", + "items": { + "$ref": "#/components/schemas/SafetyFeedback" + } + } + } + }, + "TextCompletion": { + "type": "object", + "description": "Output text returned from a model.", + "properties": { + "output": { + "type": "string", + "description": "Output only. The generated text returned from the model." + }, + "safetyRatings": { + "type": "array", + "description": "Ratings for the safety of a response. There is at most one rating per category.", + "items": { + "$ref": "#/components/schemas/SafetyRating" + } + }, + "citationMetadata": { + "$ref": "#/components/schemas/CitationMetadata" + } + } + }, + "SafetyFeedback": { + "type": "object", + "description": "Safety feedback for an entire request. This field is populated if content in the input and/or response is blocked due to safety settings. SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback will return the safety settings used by the request as well as the lowest HarmProbability that should be allowed in order to return a result.", + "properties": { + "rating": { + "$ref": "#/components/schemas/SafetyRating" + }, + "setting": { + "$ref": "#/components/schemas/SafetySetting" + } + } + }, + "EmbedTextRequest": { + "type": "object", + "description": "Request to get a text embedding from the model.", + "properties": { + "model": { + "type": "string", + "description": "Required. The model name to use with the format model=models/{model}." + }, + "text": { + "type": "string", + "description": "Optional. The free-form input text that the model will turn into an embedding." + } + } + }, + "EmbedTextResponse": { + "type": "object", + "description": "The response to a EmbedTextRequest.", + "properties": { + "embedding": { + "$ref": "#/components/schemas/Embedding" + } + } + }, + "Embedding": { + "type": "object", + "description": "A list of floats representing the embedding.", + "properties": { + "value": { + "type": "array", + "description": "The embedding values.", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "BatchEmbedTextRequest": { + "type": "object", + "description": "Batch request to get a text embedding from the model.", + "properties": { + "texts": { + "type": "array", + "description": "Optional. The free-form input texts that the model will turn into an embedding. The current limit is 100 texts, over which an error will be thrown.", + "items": { + "type": "string" + } + }, + "requests": { + "type": "array", + "description": "Optional. Embed requests for the batch. Only one of `texts` or `requests` can be set.", + "items": { + "$ref": "#/components/schemas/EmbedTextRequest" + } + } + } + }, + "BatchEmbedTextResponse": { + "type": "object", + "description": "The response to a EmbedTextRequest.", + "properties": { + "embeddings": { + "type": "array", + "description": "Output only. The embeddings generated from the input text.", + "items": { + "$ref": "#/components/schemas/Embedding" + } + } + } + }, + "CountTextTokensRequest": { + "type": "object", + "description": "Counts the number of tokens in the `prompt` sent to a model. Models may tokenize text differently, so each model may return a different `token_count`.", + "properties": { + "prompt": { + "$ref": "#/components/schemas/TextPrompt" + } + } + }, + "CountTextTokensResponse": { + "type": "object", + "description": "A response from `CountTextTokens`. It returns the model's `token_count` for the `prompt`.", + "properties": { + "tokenCount": { + "type": "integer", + "format": "int32", + "description": "The number of tokens that the `model` tokenizes the `prompt` into. Always non-negative." + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/typescript/ai-schemas/scripts/specs/openai/openai.openapi.json b/packages/typescript/ai-schemas/scripts/specs/openai/openai.openapi.json new file mode 100644 index 000000000..fa4774034 --- /dev/null +++ b/packages/typescript/ai-schemas/scripts/specs/openai/openai.openapi.json @@ -0,0 +1,61723 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "OpenAI API", + "description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", + "version": "2.3.0", + "termsOfService": "https://openai.com/policies/terms-of-use", + "contact": { + "name": "OpenAI Support", + "url": "https://help.openai.com/" + }, + "license": { + "name": "MIT", + "url": "https://github.com/openai/openai-openapi/blob/master/LICENSE" + } + }, + "servers": [ + { + "url": "https://api.openai.com/v1" + } + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "tags": [ + { + "name": "Assistants", + "description": "Build Assistants that can call models and use tools." + }, + { + "name": "Audio", + "description": "Turn audio into text or text into audio." + }, + { + "name": "Chat", + "description": "Given a list of messages comprising a conversation, the model will return a response." + }, + { + "name": "Conversations", + "description": "Manage conversations and conversation items." + }, + { + "name": "Completions", + "description": "Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position." + }, + { + "name": "Embeddings", + "description": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms." + }, + { + "name": "Evals", + "description": "Manage and run evals in the OpenAI platform." + }, + { + "name": "Fine-tuning", + "description": "Manage fine-tuning jobs to tailor a model to your specific training data." + }, + { + "name": "Graders", + "description": "Manage and run graders in the OpenAI platform." + }, + { + "name": "Batch", + "description": "Create large batches of API requests to run asynchronously." + }, + { + "name": "Files", + "description": "Files are used to upload documents that can be used with features like Assistants and Fine-tuning." + }, + { + "name": "Uploads", + "description": "Use Uploads to upload large files in multiple parts." + }, + { + "name": "Images", + "description": "Given a prompt and/or an input image, the model will generate a new image." + }, + { + "name": "Models", + "description": "List and describe the various models available in the API." + }, + { + "name": "Moderations", + "description": "Given text and/or image inputs, classifies if those inputs are potentially harmful." + }, + { + "name": "Audit Logs", + "description": "List user actions and configuration changes within this organization." + } + ], + "paths": { + "/assistants": { + "get": { + "operationId": "listAssistants", + "tags": [ + "Assistants" + ], + "summary": "Returns a list of assistants.", + "deprecated": true, + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListAssistantsResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List assistants", + "group": "assistants", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/assistants?order=desc&limit=20\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.beta.assistants.list()\npage = page.data[0]\nprint(page.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistants = await openai.beta.assistants.list({\n order: \"desc\",\n limit: \"20\",\n });\n\n console.log(myAssistants.data);\n}\n\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const assistant of client.beta.assistants.list()) {\n console.log(assistant.id);\n}", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Beta.Assistants.List(context.TODO(), openai.BetaAssistantListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.assistants.AssistantListPage;\nimport com.openai.models.beta.assistants.AssistantListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AssistantListPage page = client.beta().assistants().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.beta.assistants.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698982736,\n \"name\": \"Coding Tutor\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n \"tools\": [],\n \"tool_resources\": {},\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n },\n {\n \"id\": \"asst_abc456\",\n \"object\": \"assistant\",\n \"created_at\": 1698982718,\n \"name\": \"My Assistant\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n \"tools\": [],\n \"tool_resources\": {},\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n },\n {\n \"id\": \"asst_abc789\",\n \"object\": \"assistant\",\n \"created_at\": 1698982643,\n \"name\": null,\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": null,\n \"tools\": [],\n \"tool_resources\": {},\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n }\n ],\n \"first_id\": \"asst_abc123\",\n \"last_id\": \"asst_abc789\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "operationId": "createAssistant", + "tags": [ + "Assistants" + ], + "summary": "Create an assistant with a model and instructions.", + "deprecated": true, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAssistantRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssistantObject" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create assistant", + "group": "assistants", + "examples": [ + { + "title": "Code Interpreter", + "request": { + "curl": "curl \"https://api.openai.com/v1/assistants\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n \"name\": \"Math Tutor\",\n \"tools\": [{\"type\": \"code_interpreter\"}],\n \"model\": \"gpt-4o\"\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nassistant = client.beta.assistants.create(\n model=\"gpt-4o\",\n)\nprint(assistant.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistant = await openai.beta.assistants.create({\n instructions:\n \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n name: \"Math Tutor\",\n tools: [{ type: \"code_interpreter\" }],\n model: \"gpt-4o\",\n });\n\n console.log(myAssistant);\n}\n\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst assistant = await client.beta.assistants.create({ model: 'gpt-4o' });\n\nconsole.log(assistant.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tassistant, err := client.Beta.Assistants.New(context.TODO(), openai.BetaAssistantNewParams{\n\t\tModel: shared.ChatModelGPT4o,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistant.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.beta.assistants.Assistant;\nimport com.openai.models.beta.assistants.AssistantCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AssistantCreateParams params = AssistantCreateParams.builder()\n .model(ChatModel.GPT_4O)\n .build();\n Assistant assistant = client.beta().assistants().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant = openai.beta.assistants.create(model: :\"gpt-4o\")\n\nputs(assistant)" + }, + "response": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698984975,\n \"name\": \"Math Tutor\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n}\n" + }, + { + "title": "Files", + "request": { + "curl": "curl https://api.openai.com/v1/assistants \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n \"tools\": [{\"type\": \"file_search\"}],\n \"tool_resources\": {\"file_search\": {\"vector_store_ids\": [\"vs_123\"]}},\n \"model\": \"gpt-4o\"\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nassistant = client.beta.assistants.create(\n model=\"gpt-4o\",\n)\nprint(assistant.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistant = await openai.beta.assistants.create({\n instructions:\n \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n name: \"HR Helper\",\n tools: [{ type: \"file_search\" }],\n tool_resources: {\n file_search: {\n vector_store_ids: [\"vs_123\"]\n }\n },\n model: \"gpt-4o\"\n });\n\n console.log(myAssistant);\n}\n\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst assistant = await client.beta.assistants.create({ model: 'gpt-4o' });\n\nconsole.log(assistant.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tassistant, err := client.Beta.Assistants.New(context.TODO(), openai.BetaAssistantNewParams{\n\t\tModel: shared.ChatModelGPT4o,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistant.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.beta.assistants.Assistant;\nimport com.openai.models.beta.assistants.AssistantCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AssistantCreateParams params = AssistantCreateParams.builder()\n .model(ChatModel.GPT_4O)\n .build();\n Assistant assistant = client.beta().assistants().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant = openai.beta.assistants.create(model: :\"gpt-4o\")\n\nputs(assistant)" + }, + "response": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1699009403,\n \"name\": \"HR Helper\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n \"tools\": [\n {\n \"type\": \"file_search\"\n }\n ],\n \"tool_resources\": {\n \"file_search\": {\n \"vector_store_ids\": [\"vs_123\"]\n }\n },\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n}\n" + } + ] + } + } + }, + "/assistants/{assistant_id}": { + "get": { + "operationId": "getAssistant", + "tags": [ + "Assistants" + ], + "summary": "Retrieves an assistant.", + "deprecated": true, + "parameters": [ + { + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the assistant to retrieve." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssistantObject" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve assistant", + "group": "assistants", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/assistants/asst_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nassistant = client.beta.assistants.retrieve(\n \"assistant_id\",\n)\nprint(assistant.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistant = await openai.beta.assistants.retrieve(\n \"asst_abc123\"\n );\n\n console.log(myAssistant);\n}\n\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst assistant = await client.beta.assistants.retrieve('assistant_id');\n\nconsole.log(assistant.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tassistant, err := client.Beta.Assistants.Get(context.TODO(), \"assistant_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistant.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.assistants.Assistant;\nimport com.openai.models.beta.assistants.AssistantRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Assistant assistant = client.beta().assistants().retrieve(\"assistant_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant = openai.beta.assistants.retrieve(\"assistant_id\")\n\nputs(assistant)" + }, + "response": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1699009709,\n \"name\": \"HR Helper\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n \"tools\": [\n {\n \"type\": \"file_search\"\n }\n ],\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n}\n" + } + } + }, + "post": { + "operationId": "modifyAssistant", + "tags": [ + "Assistants" + ], + "summary": "Modifies an assistant.", + "deprecated": true, + "parameters": [ + { + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the assistant to modify." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModifyAssistantRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssistantObject" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Modify assistant", + "group": "assistants", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/assistants/asst_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n \"tools\": [{\"type\": \"file_search\"}],\n \"model\": \"gpt-4o\"\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nassistant = client.beta.assistants.update(\n assistant_id=\"assistant_id\",\n)\nprint(assistant.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myUpdatedAssistant = await openai.beta.assistants.update(\n \"asst_abc123\",\n {\n instructions:\n \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n name: \"HR Helper\",\n tools: [{ type: \"file_search\" }],\n model: \"gpt-4o\"\n }\n );\n\n console.log(myUpdatedAssistant);\n}\n\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst assistant = await client.beta.assistants.update('assistant_id');\n\nconsole.log(assistant.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tassistant, err := client.Beta.Assistants.Update(\n\t\tcontext.TODO(),\n\t\t\"assistant_id\",\n\t\topenai.BetaAssistantUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistant.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.assistants.Assistant;\nimport com.openai.models.beta.assistants.AssistantUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Assistant assistant = client.beta().assistants().update(\"assistant_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant = openai.beta.assistants.update(\"assistant_id\")\n\nputs(assistant)" + }, + "response": "{\n \"id\": \"asst_123\",\n \"object\": \"assistant\",\n \"created_at\": 1699009709,\n \"name\": \"HR Helper\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n \"tools\": [\n {\n \"type\": \"file_search\"\n }\n ],\n \"tool_resources\": {\n \"file_search\": {\n \"vector_store_ids\": []\n }\n },\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n}\n" + } + } + }, + "delete": { + "operationId": "deleteAssistant", + "tags": [ + "Assistants" + ], + "summary": "Delete an assistant.", + "deprecated": true, + "parameters": [ + { + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the assistant to delete." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAssistantResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete assistant", + "group": "assistants", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/assistants/asst_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -X DELETE\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nassistant_deleted = client.beta.assistants.delete(\n \"assistant_id\",\n)\nprint(assistant_deleted.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const response = await openai.beta.assistants.delete(\"asst_abc123\");\n\n console.log(response);\n}\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst assistantDeleted = await client.beta.assistants.delete('assistant_id');\n\nconsole.log(assistantDeleted.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tassistantDeleted, err := client.Beta.Assistants.Delete(context.TODO(), \"assistant_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistantDeleted.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.assistants.AssistantDeleteParams;\nimport com.openai.models.beta.assistants.AssistantDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AssistantDeleted assistantDeleted = client.beta().assistants().delete(\"assistant_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant_deleted = openai.beta.assistants.delete(\"assistant_id\")\n\nputs(assistant_deleted)" + }, + "response": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant.deleted\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/audio/speech": { + "post": { + "operationId": "createSpeech", + "tags": [ + "Audio" + ], + "summary": "Generates audio from the input text.\n\nReturns the audio file content, or a stream of audio events.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSpeechRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "Transfer-Encoding": { + "schema": { + "type": "string" + }, + "description": "chunked" + } + }, + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/CreateSpeechResponseStreamEvent" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create speech", + "group": "audio", + "examples": [ + { + "title": "Default", + "request": { + "curl": "curl https://api.openai.com/v1/audio/speech \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"gpt-4o-mini-tts\",\n \"input\": \"The quick brown fox jumped over the lazy dog.\",\n \"voice\": \"alloy\"\n }' \\\n --output speech.mp3\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nspeech = client.audio.speech.create(\n input=\"input\",\n model=\"tts-1\",\n voice=\"alloy\",\n)\nprint(speech)\ncontent = speech.read()\nprint(content)", + "javascript": "import fs from \"fs\";\nimport path from \"path\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst speechFile = path.resolve(\"./speech.mp3\");\n\nasync function main() {\n const mp3 = await openai.audio.speech.create({\n model: \"gpt-4o-mini-tts\",\n voice: \"alloy\",\n input: \"Today is a wonderful day to build something people love!\",\n });\n console.log(speechFile);\n const buffer = Buffer.from(await mp3.arrayBuffer());\n await fs.promises.writeFile(speechFile, buffer);\n}\nmain();\n", + "csharp": "using System;\nusing System.IO;\n\nusing OpenAI.Audio;\n\nAudioClient client = new(\n model: \"gpt-4o-mini-tts\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nBinaryData speech = client.GenerateSpeech(\n text: \"The quick brown fox jumped over the lazy dog.\",\n voice: GeneratedSpeechVoice.Alloy\n);\n\nusing FileStream stream = File.OpenWrite(\"speech.mp3\");\nspeech.ToStream().CopyTo(stream);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst speech = await client.audio.speech.create({\n input: 'input',\n model: 'tts-1',\n voice: 'alloy',\n});\n\nconsole.log(speech);\n\nconst content = await speech.blob();\nconsole.log(content);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tspeech, err := client.Audio.Speech.New(context.TODO(), openai.AudioSpeechNewParams{\n\t\tInput: \"input\",\n\t\tModel: openai.SpeechModelTTS1,\n\t\tVoice: openai.AudioSpeechNewParamsVoiceUnion{\n\t\t\tOfAudioSpeechNewsVoiceString2: openai.String(\"alloy\"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", speech)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.audio.speech.SpeechCreateParams;\nimport com.openai.models.audio.speech.SpeechModel;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n SpeechCreateParams params = SpeechCreateParams.builder()\n .input(\"input\")\n .model(SpeechModel.TTS_1)\n .voice(SpeechCreateParams.Voice.UnionMember1.ALLOY)\n .build();\n HttpResponse speech = client.audio().speech().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nspeech = openai.audio.speech.create(input: \"input\", model: :\"tts-1\", voice: :alloy)\n\nputs(speech)" + } + }, + { + "title": "SSE Stream Format", + "request": { + "curl": "curl https://api.openai.com/v1/audio/speech \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"gpt-4o-mini-tts\",\n \"input\": \"The quick brown fox jumped over the lazy dog.\",\n \"voice\": \"alloy\",\n \"stream_format\": \"sse\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst speech = await client.audio.speech.create({\n input: 'input',\n model: 'tts-1',\n voice: 'alloy',\n});\n\nconsole.log(speech);\n\nconst content = await speech.blob();\nconsole.log(content);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nspeech = client.audio.speech.create(\n input=\"input\",\n model=\"tts-1\",\n voice=\"alloy\",\n)\nprint(speech)\ncontent = speech.read()\nprint(content)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tspeech, err := client.Audio.Speech.New(context.TODO(), openai.AudioSpeechNewParams{\n\t\tInput: \"input\",\n\t\tModel: openai.SpeechModelTTS1,\n\t\tVoice: openai.AudioSpeechNewParamsVoiceUnion{\n\t\t\tOfAudioSpeechNewsVoiceString2: openai.String(\"alloy\"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", speech)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.audio.speech.SpeechCreateParams;\nimport com.openai.models.audio.speech.SpeechModel;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n SpeechCreateParams params = SpeechCreateParams.builder()\n .input(\"input\")\n .model(SpeechModel.TTS_1)\n .voice(SpeechCreateParams.Voice.UnionMember1.ALLOY)\n .build();\n HttpResponse speech = client.audio().speech().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nspeech = openai.audio.speech.create(input: \"input\", model: :\"tts-1\", voice: :alloy)\n\nputs(speech)" + } + } + ] + } + } + }, + "/audio/transcriptions": { + "post": { + "operationId": "createTranscription", + "tags": [ + "Audio" + ], + "summary": "Transcribes audio into the input language.\n\nReturns a transcription object in `json`, `diarized_json`, or `verbose_json`\nformat, or a stream of transcript events.\n", + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateTranscriptionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreateTranscriptionResponseJson" + }, + { + "$ref": "#/components/schemas/CreateTranscriptionResponseDiarizedJson" + }, + { + "$ref": "#/components/schemas/CreateTranscriptionResponseVerboseJson" + } + ] + } + }, + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/CreateTranscriptionResponseStreamEvent" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create transcription", + "group": "audio", + "examples": [ + { + "title": "Default", + "request": { + "curl": "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F model=\"gpt-4o-transcribe\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)", + "javascript": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const transcription = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"gpt-4o-transcribe\",\n });\n\n console.log(transcription.text);\n}\nmain();\n", + "csharp": "using System;\n\nusing OpenAI.Audio;\nstring audioFilePath = \"audio.mp3\";\n\nAudioClient client = new(\n model: \"gpt-4o-transcribe\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nAudioTranscription transcription = client.TranscribeAudio(audioFilePath);\n\nConsole.WriteLine($\"{transcription.Text}\");\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(new ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + }, + "response": "{\n \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\",\n \"usage\": {\n \"type\": \"tokens\",\n \"input_tokens\": 14,\n \"input_token_details\": {\n \"text_tokens\": 0,\n \"audio_tokens\": 14\n },\n \"output_tokens\": 45,\n \"total_tokens\": 59\n }\n}\n" + }, + { + "title": "Diarization", + "request": { + "curl": "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/meeting.wav\" \\\n -F model=\"gpt-4o-transcribe-diarize\" \\\n -F response_format=\"diarized_json\" \\\n -F chunking_strategy=auto \\\n -F 'known_speaker_names[]=agent' \\\n -F 'known_speaker_references[]=data:audio/wav;base64,AAA...'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)", + "javascript": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst speakerRef = fs.readFileSync(\"agent.wav\").toString(\"base64\");\n\nconst transcript = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"meeting.wav\"),\n model: \"gpt-4o-transcribe-diarize\",\n response_format: \"diarized_json\",\n chunking_strategy: \"auto\",\n extra_body: {\n known_speaker_names: [\"agent\"],\n known_speaker_references: [`data:audio/wav;base64,${speakerRef}`],\n },\n});\n\nconsole.log(transcript.segments);\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(new ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + }, + "response": "{\n \"task\": \"transcribe\",\n \"duration\": 27.4,\n \"text\": \"Agent: Thanks for calling OpenAI support.\\nA: Hi, I'm trying to enable diarization.\\nAgent: Happy to walk you through the steps.\",\n \"segments\": [\n {\n \"type\": \"transcript.text.segment\",\n \"id\": \"seg_001\",\n \"start\": 0.0,\n \"end\": 4.7,\n \"text\": \"Thanks for calling OpenAI support.\",\n \"speaker\": \"agent\"\n },\n {\n \"type\": \"transcript.text.segment\",\n \"id\": \"seg_002\",\n \"start\": 4.7,\n \"end\": 11.8,\n \"text\": \"Hi, I'm trying to enable diarization.\",\n \"speaker\": \"A\"\n },\n {\n \"type\": \"transcript.text.segment\",\n \"id\": \"seg_003\",\n \"start\": 12.1,\n \"end\": 18.5,\n \"text\": \"Happy to walk you through the steps.\",\n \"speaker\": \"agent\"\n }\n ],\n \"usage\": {\n \"type\": \"duration\",\n \"seconds\": 27\n }\n}\n" + }, + { + "title": "Streaming", + "request": { + "curl": "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F model=\"gpt-4o-mini-transcribe\" \\\n -F stream=true\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)", + "javascript": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst stream = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"gpt-4o-mini-transcribe\",\n stream: true,\n});\n\nfor await (const event of stream) {\n console.log(event);\n}\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(new ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + }, + "response": "data: {\"type\":\"transcript.text.delta\",\"delta\":\"I\",\"logprobs\":[{\"token\":\"I\",\"logprob\":-0.00007588794,\"bytes\":[73]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" see\",\"logprobs\":[{\"token\":\" see\",\"logprob\":-3.1281633e-7,\"bytes\":[32,115,101,101]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" skies\",\"logprobs\":[{\"token\":\" skies\",\"logprob\":-2.3392786e-6,\"bytes\":[32,115,107,105,101,115]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" of\",\"logprobs\":[{\"token\":\" of\",\"logprob\":-3.1281633e-7,\"bytes\":[32,111,102]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" blue\",\"logprobs\":[{\"token\":\" blue\",\"logprob\":-1.0280384e-6,\"bytes\":[32,98,108,117,101]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" and\",\"logprobs\":[{\"token\":\" and\",\"logprob\":-0.0005108566,\"bytes\":[32,97,110,100]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" clouds\",\"logprobs\":[{\"token\":\" clouds\",\"logprob\":-1.9361265e-7,\"bytes\":[32,99,108,111,117,100,115]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" of\",\"logprobs\":[{\"token\":\" of\",\"logprob\":-1.9361265e-7,\"bytes\":[32,111,102]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" white\",\"logprobs\":[{\"token\":\" white\",\"logprob\":-7.89631e-7,\"bytes\":[32,119,104,105,116,101]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.0014890312,\"bytes\":[44]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" the\",\"logprobs\":[{\"token\":\" the\",\"logprob\":-0.0110956915,\"bytes\":[32,116,104,101]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" bright\",\"logprobs\":[{\"token\":\" bright\",\"logprob\":0.0,\"bytes\":[32,98,114,105,103,104,116]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" blessed\",\"logprobs\":[{\"token\":\" blessed\",\"logprob\":-0.000045848617,\"bytes\":[32,98,108,101,115,115,101,100]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" days\",\"logprobs\":[{\"token\":\" days\",\"logprob\":-0.000010802739,\"bytes\":[32,100,97,121,115]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.00001700133,\"bytes\":[44]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" the\",\"logprobs\":[{\"token\":\" the\",\"logprob\":-0.0000118755715,\"bytes\":[32,116,104,101]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" dark\",\"logprobs\":[{\"token\":\" dark\",\"logprob\":-5.5122365e-7,\"bytes\":[32,100,97,114,107]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" sacred\",\"logprobs\":[{\"token\":\" sacred\",\"logprob\":-5.4385737e-6,\"bytes\":[32,115,97,99,114,101,100]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" nights\",\"logprobs\":[{\"token\":\" nights\",\"logprob\":-4.00813e-6,\"bytes\":[32,110,105,103,104,116,115]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.0036910512,\"bytes\":[44]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" and\",\"logprobs\":[{\"token\":\" and\",\"logprob\":-0.0031903093,\"bytes\":[32,97,110,100]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" I\",\"logprobs\":[{\"token\":\" I\",\"logprob\":-1.504853e-6,\"bytes\":[32,73]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" think\",\"logprobs\":[{\"token\":\" think\",\"logprob\":-4.3202e-7,\"bytes\":[32,116,104,105,110,107]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" to\",\"logprobs\":[{\"token\":\" to\",\"logprob\":-1.9361265e-7,\"bytes\":[32,116,111]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" myself\",\"logprobs\":[{\"token\":\" myself\",\"logprob\":-1.7432603e-6,\"bytes\":[32,109,121,115,101,108,102]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.29254505,\"bytes\":[44]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" what\",\"logprobs\":[{\"token\":\" what\",\"logprob\":-0.016815351,\"bytes\":[32,119,104,97,116]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" a\",\"logprobs\":[{\"token\":\" a\",\"logprob\":-3.1281633e-7,\"bytes\":[32,97]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" wonderful\",\"logprobs\":[{\"token\":\" wonderful\",\"logprob\":-2.1008714e-6,\"bytes\":[32,119,111,110,100,101,114,102,117,108]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" world\",\"logprobs\":[{\"token\":\" world\",\"logprob\":-8.180258e-6,\"bytes\":[32,119,111,114,108,100]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\".\",\"logprobs\":[{\"token\":\".\",\"logprob\":-0.014231676,\"bytes\":[46]}]}\n\ndata: {\"type\":\"transcript.text.done\",\"text\":\"I see skies of blue and clouds of white, the bright blessed days, the dark sacred nights, and I think to myself, what a wonderful world.\",\"logprobs\":[{\"token\":\"I\",\"logprob\":-0.00007588794,\"bytes\":[73]},{\"token\":\" see\",\"logprob\":-3.1281633e-7,\"bytes\":[32,115,101,101]},{\"token\":\" skies\",\"logprob\":-2.3392786e-6,\"bytes\":[32,115,107,105,101,115]},{\"token\":\" of\",\"logprob\":-3.1281633e-7,\"bytes\":[32,111,102]},{\"token\":\" blue\",\"logprob\":-1.0280384e-6,\"bytes\":[32,98,108,117,101]},{\"token\":\" and\",\"logprob\":-0.0005108566,\"bytes\":[32,97,110,100]},{\"token\":\" clouds\",\"logprob\":-1.9361265e-7,\"bytes\":[32,99,108,111,117,100,115]},{\"token\":\" of\",\"logprob\":-1.9361265e-7,\"bytes\":[32,111,102]},{\"token\":\" white\",\"logprob\":-7.89631e-7,\"bytes\":[32,119,104,105,116,101]},{\"token\":\",\",\"logprob\":-0.0014890312,\"bytes\":[44]},{\"token\":\" the\",\"logprob\":-0.0110956915,\"bytes\":[32,116,104,101]},{\"token\":\" bright\",\"logprob\":0.0,\"bytes\":[32,98,114,105,103,104,116]},{\"token\":\" blessed\",\"logprob\":-0.000045848617,\"bytes\":[32,98,108,101,115,115,101,100]},{\"token\":\" days\",\"logprob\":-0.000010802739,\"bytes\":[32,100,97,121,115]},{\"token\":\",\",\"logprob\":-0.00001700133,\"bytes\":[44]},{\"token\":\" the\",\"logprob\":-0.0000118755715,\"bytes\":[32,116,104,101]},{\"token\":\" dark\",\"logprob\":-5.5122365e-7,\"bytes\":[32,100,97,114,107]},{\"token\":\" sacred\",\"logprob\":-5.4385737e-6,\"bytes\":[32,115,97,99,114,101,100]},{\"token\":\" nights\",\"logprob\":-4.00813e-6,\"bytes\":[32,110,105,103,104,116,115]},{\"token\":\",\",\"logprob\":-0.0036910512,\"bytes\":[44]},{\"token\":\" and\",\"logprob\":-0.0031903093,\"bytes\":[32,97,110,100]},{\"token\":\" I\",\"logprob\":-1.504853e-6,\"bytes\":[32,73]},{\"token\":\" think\",\"logprob\":-4.3202e-7,\"bytes\":[32,116,104,105,110,107]},{\"token\":\" to\",\"logprob\":-1.9361265e-7,\"bytes\":[32,116,111]},{\"token\":\" myself\",\"logprob\":-1.7432603e-6,\"bytes\":[32,109,121,115,101,108,102]},{\"token\":\",\",\"logprob\":-0.29254505,\"bytes\":[44]},{\"token\":\" what\",\"logprob\":-0.016815351,\"bytes\":[32,119,104,97,116]},{\"token\":\" a\",\"logprob\":-3.1281633e-7,\"bytes\":[32,97]},{\"token\":\" wonderful\",\"logprob\":-2.1008714e-6,\"bytes\":[32,119,111,110,100,101,114,102,117,108]},{\"token\":\" world\",\"logprob\":-8.180258e-6,\"bytes\":[32,119,111,114,108,100]},{\"token\":\".\",\"logprob\":-0.014231676,\"bytes\":[46]}],\"usage\":{\"input_tokens\":14,\"input_token_details\":{\"text_tokens\":0,\"audio_tokens\":14},\"output_tokens\":45,\"total_tokens\":59}}\n" + }, + { + "title": "Logprobs", + "request": { + "curl": "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F \"include[]=logprobs\" \\\n -F model=\"gpt-4o-transcribe\" \\\n -F response_format=\"json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)", + "javascript": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const transcription = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"gpt-4o-transcribe\",\n response_format: \"json\",\n include: [\"logprobs\"]\n });\n\n console.log(transcription);\n}\nmain();\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(new ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + }, + "response": "{\n \"text\": \"Hey, my knee is hurting and I want to see the doctor tomorrow ideally.\",\n \"logprobs\": [\n { \"token\": \"Hey\", \"logprob\": -1.0415299, \"bytes\": [72, 101, 121] },\n { \"token\": \",\", \"logprob\": -9.805982e-5, \"bytes\": [44] },\n { \"token\": \" my\", \"logprob\": -0.00229799, \"bytes\": [32, 109, 121] },\n {\n \"token\": \" knee\",\n \"logprob\": -4.7159858e-5,\n \"bytes\": [32, 107, 110, 101, 101]\n },\n { \"token\": \" is\", \"logprob\": -0.043909557, \"bytes\": [32, 105, 115] },\n {\n \"token\": \" hurting\",\n \"logprob\": -1.1041146e-5,\n \"bytes\": [32, 104, 117, 114, 116, 105, 110, 103]\n },\n { \"token\": \" and\", \"logprob\": -0.011076359, \"bytes\": [32, 97, 110, 100] },\n { \"token\": \" I\", \"logprob\": -5.3193703e-6, \"bytes\": [32, 73] },\n {\n \"token\": \" want\",\n \"logprob\": -0.0017156356,\n \"bytes\": [32, 119, 97, 110, 116]\n },\n { \"token\": \" to\", \"logprob\": -7.89631e-7, \"bytes\": [32, 116, 111] },\n { \"token\": \" see\", \"logprob\": -5.5122365e-7, \"bytes\": [32, 115, 101, 101] },\n { \"token\": \" the\", \"logprob\": -0.0040786397, \"bytes\": [32, 116, 104, 101] },\n {\n \"token\": \" doctor\",\n \"logprob\": -2.3392786e-6,\n \"bytes\": [32, 100, 111, 99, 116, 111, 114]\n },\n {\n \"token\": \" tomorrow\",\n \"logprob\": -7.89631e-7,\n \"bytes\": [32, 116, 111, 109, 111, 114, 114, 111, 119]\n },\n {\n \"token\": \" ideally\",\n \"logprob\": -0.5800861,\n \"bytes\": [32, 105, 100, 101, 97, 108, 108, 121]\n },\n { \"token\": \".\", \"logprob\": -0.00011093382, \"bytes\": [46] }\n ],\n \"usage\": {\n \"type\": \"tokens\",\n \"input_tokens\": 14,\n \"input_token_details\": {\n \"text_tokens\": 0,\n \"audio_tokens\": 14\n },\n \"output_tokens\": 45,\n \"total_tokens\": 59\n }\n}\n" + }, + { + "title": "Word timestamps", + "request": { + "curl": "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F \"timestamp_granularities[]=word\" \\\n -F model=\"whisper-1\" \\\n -F response_format=\"verbose_json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)", + "javascript": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const transcription = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"whisper-1\",\n response_format: \"verbose_json\",\n timestamp_granularities: [\"word\"]\n });\n\n console.log(transcription.text);\n}\nmain();\n", + "csharp": "using System;\n\nusing OpenAI.Audio;\n\nstring audioFilePath = \"audio.mp3\";\n\nAudioClient client = new(\n model: \"whisper-1\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nAudioTranscriptionOptions options = new()\n{\n ResponseFormat = AudioTranscriptionFormat.Verbose,\n TimestampGranularities = AudioTimestampGranularities.Word,\n};\n\nAudioTranscription transcription = client.TranscribeAudio(audioFilePath, options);\n\nConsole.WriteLine($\"{transcription.Text}\");\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(new ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + }, + "response": "{\n \"task\": \"transcribe\",\n \"language\": \"english\",\n \"duration\": 8.470000267028809,\n \"text\": \"The beach was a popular spot on a hot summer day. People were swimming in the ocean, building sandcastles, and playing beach volleyball.\",\n \"words\": [\n {\n \"word\": \"The\",\n \"start\": 0.0,\n \"end\": 0.23999999463558197\n },\n ...\n {\n \"word\": \"volleyball\",\n \"start\": 7.400000095367432,\n \"end\": 7.900000095367432\n }\n ],\n \"usage\": {\n \"type\": \"duration\",\n \"seconds\": 9\n }\n}\n" + }, + { + "title": "Segment timestamps", + "request": { + "curl": "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F \"timestamp_granularities[]=segment\" \\\n -F model=\"whisper-1\" \\\n -F response_format=\"verbose_json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)", + "javascript": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const transcription = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"whisper-1\",\n response_format: \"verbose_json\",\n timestamp_granularities: [\"segment\"]\n });\n\n console.log(transcription.text);\n}\nmain();\n", + "csharp": "using System;\n\nusing OpenAI.Audio;\n\nstring audioFilePath = \"audio.mp3\";\n\nAudioClient client = new(\n model: \"whisper-1\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nAudioTranscriptionOptions options = new()\n{\n ResponseFormat = AudioTranscriptionFormat.Verbose,\n TimestampGranularities = AudioTimestampGranularities.Segment,\n};\n\nAudioTranscription transcription = client.TranscribeAudio(audioFilePath, options);\n\nConsole.WriteLine($\"{transcription.Text}\");\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(new ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + }, + "response": "{\n \"task\": \"transcribe\",\n \"language\": \"english\",\n \"duration\": 8.470000267028809,\n \"text\": \"The beach was a popular spot on a hot summer day. People were swimming in the ocean, building sandcastles, and playing beach volleyball.\",\n \"segments\": [\n {\n \"id\": 0,\n \"seek\": 0,\n \"start\": 0.0,\n \"end\": 3.319999933242798,\n \"text\": \" The beach was a popular spot on a hot summer day.\",\n \"tokens\": [\n 50364, 440, 7534, 390, 257, 3743, 4008, 322, 257, 2368, 4266, 786, 13, 50530\n ],\n \"temperature\": 0.0,\n \"avg_logprob\": -0.2860786020755768,\n \"compression_ratio\": 1.2363636493682861,\n \"no_speech_prob\": 0.00985979475080967\n },\n ...\n ],\n \"usage\": {\n \"type\": \"duration\",\n \"seconds\": 9\n }\n}\n" + } + ] + } + } + }, + "/audio/translations": { + "post": { + "operationId": "createTranslation", + "tags": [ + "Audio" + ], + "summary": "Translates audio into English.", + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateTranslationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreateTranslationResponseJson" + }, + { + "$ref": "#/components/schemas/CreateTranslationResponseVerboseJson" + } + ] + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create translation", + "group": "audio", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/audio/translations \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/german.m4a\" \\\n -F model=\"whisper-1\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ntranslation = client.audio.translations.create(\n file=b\"Example data\",\n model=\"whisper-1\",\n)\nprint(translation)", + "javascript": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const translation = await openai.audio.translations.create({\n file: fs.createReadStream(\"speech.mp3\"),\n model: \"whisper-1\",\n });\n\n console.log(translation.text);\n}\nmain();\n", + "csharp": "using System;\n\nusing OpenAI.Audio;\n\nstring audioFilePath = \"audio.mp3\";\n\nAudioClient client = new(\n model: \"whisper-1\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nAudioTranscription transcription = client.TranscribeAudio(audioFilePath);\n\nConsole.WriteLine($\"{transcription.Text}\");\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst translation = await client.audio.translations.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'whisper-1',\n});\n\nconsole.log(translation);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranslation, err := client.Audio.Translations.New(context.TODO(), openai.AudioTranslationNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelWhisper1,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", translation)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.translations.TranslationCreateParams;\nimport com.openai.models.audio.translations.TranslationCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranslationCreateParams params = TranslationCreateParams.builder()\n .file(new ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.WHISPER_1)\n .build();\n TranslationCreateResponse translation = client.audio().translations().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranslation = openai.audio.translations.create(file: StringIO.new(\"Example data\"), model: :\"whisper-1\")\n\nputs(translation)" + }, + "response": "{\n \"text\": \"Hello, my name is Wolfgang and I come from Germany. Where are you heading today?\"\n}\n" + } + } + } + }, + "/audio/voice_consents": { + "post": { + "operationId": "createVoiceConsent", + "tags": [ + "Audio" + ], + "summary": "Upload a voice consent recording.", + "description": "Upload a consent recording that authorizes creation of a custom voice.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers.\n", + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateVoiceConsentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceConsentResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create voice consent", + "group": "audio", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/audio/voice_consents \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"name=John Doe\" \\\n -F \"language=en-US\" \\\n -F \"recording=@$HOME/consent_recording.wav;type=audio/x-wav\"\n" + }, + "response": "" + } + } + }, + "get": { + "operationId": "listVoiceConsents", + "tags": [ + "Audio" + ], + "summary": "Returns a list of voice consent recordings.", + "description": "List consent recordings available to your organization for creating custom voices.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers.\n", + "parameters": [ + { + "in": "query", + "name": "after", + "required": false, + "schema": { + "type": "string" + }, + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceConsentListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List voice consents", + "group": "audio", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/audio/voice_consents?limit=20 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + }, + "response": "" + } + } + } + }, + "/audio/voice_consents/{consent_id}": { + "get": { + "operationId": "getVoiceConsent", + "tags": [ + "Audio" + ], + "summary": "Retrieves a voice consent recording.", + "description": "Retrieve consent recording metadata used for creating custom voices.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers.\n", + "parameters": [ + { + "in": "path", + "name": "consent_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the consent recording to retrieve." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceConsentResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve voice consent", + "group": "audio", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + }, + "response": "" + } + } + }, + "post": { + "operationId": "updateVoiceConsent", + "tags": [ + "Audio" + ], + "summary": "Updates a voice consent recording (metadata only).", + "description": "Update consent recording metadata used for creating custom voices. This endpoint updates metadata only and does not replace the underlying audio.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers.\n", + "parameters": [ + { + "in": "path", + "name": "consent_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the consent recording to update." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVoiceConsentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceConsentResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Update voice consent", + "group": "audio", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"John Doe\"\n }'\n" + }, + "response": "" + } + } + }, + "delete": { + "operationId": "deleteVoiceConsent", + "tags": [ + "Audio" + ], + "summary": "Deletes a voice consent recording.", + "description": "Delete a consent recording that was uploaded for creating custom voices.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers.\n", + "parameters": [ + { + "in": "path", + "name": "consent_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the consent recording to delete." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceConsentDeletedResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete voice consent", + "group": "audio", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + }, + "response": "" + } + } + } + }, + "/audio/voices": { + "post": { + "operationId": "createVoice", + "tags": [ + "Audio" + ], + "summary": "Creates a custom voice.", + "description": "Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). This requires an audio sample and a previously uploaded consent recording.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers.\n", + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateVoiceRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create voice", + "group": "audio", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/audio/voices \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"name=My new voice\" \\\n -F \"consent=cons_1234\" \\\n -F \"audio_sample=@$HOME/audio_sample.wav;type=audio/x-wav\"\n" + }, + "response": "" + } + } + } + }, + "/batches": { + "post": { + "summary": "Creates and executes a batch from an uploaded file of requests", + "operationId": "createBatch", + "tags": [ + "Batch" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "input_file_id", + "endpoint", + "completion_window" + ], + "properties": { + "input_file_id": { + "type": "string", + "description": "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.\n" + }, + "endpoint": { + "type": "string", + "enum": [ + "/v1/responses", + "/v1/chat/completions", + "/v1/embeddings", + "/v1/completions", + "/v1/moderations", + "/v1/images/generations", + "/v1/images/edits", + "/v1/videos" + ], + "description": "The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, `/v1/images/edits`, and `/v1/videos` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch." + }, + "completion_window": { + "type": "string", + "enum": [ + "24h" + ], + "description": "The time frame within which the batch should be processed. Currently only `24h` is supported." + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "output_expires_after": { + "$ref": "#/components/schemas/BatchFileExpirationAfter" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Batch created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Batch" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create batch", + "group": "batch", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/batches \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"input_file_id\": \"file-abc123\",\n \"endpoint\": \"/v1/chat/completions\",\n \"completion_window\": \"24h\"\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nbatch = client.batches.create(\n completion_window=\"24h\",\n endpoint=\"/v1/responses\",\n input_file_id=\"input_file_id\",\n)\nprint(batch.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const batch = await openai.batches.create({\n input_file_id: \"file-abc123\",\n endpoint: \"/v1/chat/completions\",\n completion_window: \"24h\"\n });\n\n console.log(batch);\n}\n\nmain();\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst batch = await client.batches.create({\n completion_window: '24h',\n endpoint: '/v1/responses',\n input_file_id: 'input_file_id',\n});\n\nconsole.log(batch.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tbatch, err := client.Batches.New(context.TODO(), openai.BatchNewParams{\n\t\tCompletionWindow: openai.BatchNewParamsCompletionWindow24h,\n\t\tEndpoint: openai.BatchNewParamsEndpointV1Responses,\n\t\tInputFileID: \"input_file_id\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", batch.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.batches.Batch;\nimport com.openai.models.batches.BatchCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n BatchCreateParams params = BatchCreateParams.builder()\n .completionWindow(BatchCreateParams.CompletionWindow._24H)\n .endpoint(BatchCreateParams.Endpoint.V1_RESPONSES)\n .inputFileId(\"input_file_id\")\n .build();\n Batch batch = client.batches().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nbatch = openai.batches.create(\n completion_window: :\"24h\",\n endpoint: :\"/v1/responses\",\n input_file_id: \"input_file_id\"\n)\n\nputs(batch)" + }, + "response": "{\n \"id\": \"batch_abc123\",\n \"object\": \"batch\",\n \"endpoint\": \"/v1/chat/completions\",\n \"errors\": null,\n \"input_file_id\": \"file-abc123\",\n \"completion_window\": \"24h\",\n \"status\": \"validating\",\n \"output_file_id\": null,\n \"error_file_id\": null,\n \"created_at\": 1711471533,\n \"in_progress_at\": null,\n \"expires_at\": null,\n \"finalizing_at\": null,\n \"completed_at\": null,\n \"failed_at\": null,\n \"expired_at\": null,\n \"cancelling_at\": null,\n \"cancelled_at\": null,\n \"request_counts\": {\n \"total\": 0,\n \"completed\": 0,\n \"failed\": 0\n },\n \"metadata\": {\n \"customer_id\": \"user_123456789\",\n \"batch_description\": \"Nightly eval job\",\n }\n}\n" + } + } + }, + "get": { + "operationId": "listBatches", + "tags": [ + "Batch" + ], + "summary": "List your organization's batches.", + "parameters": [ + { + "in": "query", + "name": "after", + "required": false, + "schema": { + "type": "string" + }, + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + } + ], + "responses": { + "200": { + "description": "Batch listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListBatchesResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List batches", + "group": "batch", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/batches?limit=2 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.batches.list()\npage = page.data[0]\nprint(page.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.batches.list();\n\n for await (const batch of list) {\n console.log(batch);\n }\n}\n\nmain();\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const batch of client.batches.list()) {\n console.log(batch.id);\n}", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Batches.List(context.TODO(), openai.BatchListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.batches.BatchListPage;\nimport com.openai.models.batches.BatchListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n BatchListPage page = client.batches().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.batches.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"batch_abc123\",\n \"object\": \"batch\",\n \"endpoint\": \"/v1/chat/completions\",\n \"errors\": null,\n \"input_file_id\": \"file-abc123\",\n \"completion_window\": \"24h\",\n \"status\": \"completed\",\n \"output_file_id\": \"file-cvaTdG\",\n \"error_file_id\": \"file-HOWS94\",\n \"created_at\": 1711471533,\n \"in_progress_at\": 1711471538,\n \"expires_at\": 1711557933,\n \"finalizing_at\": 1711493133,\n \"completed_at\": 1711493163,\n \"failed_at\": null,\n \"expired_at\": null,\n \"cancelling_at\": null,\n \"cancelled_at\": null,\n \"request_counts\": {\n \"total\": 100,\n \"completed\": 95,\n \"failed\": 5\n },\n \"metadata\": {\n \"customer_id\": \"user_123456789\",\n \"batch_description\": \"Nightly job\",\n }\n },\n { ... },\n ],\n \"first_id\": \"batch_abc123\",\n \"last_id\": \"batch_abc456\",\n \"has_more\": true\n}\n" + } + } + } + }, + "/batches/{batch_id}": { + "get": { + "operationId": "retrieveBatch", + "tags": [ + "Batch" + ], + "summary": "Retrieves a batch.", + "parameters": [ + { + "in": "path", + "name": "batch_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the batch to retrieve." + } + ], + "responses": { + "200": { + "description": "Batch retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Batch" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve batch", + "group": "batch", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/batches/batch_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nbatch = client.batches.retrieve(\n \"batch_id\",\n)\nprint(batch.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const batch = await openai.batches.retrieve(\"batch_abc123\");\n\n console.log(batch);\n}\n\nmain();\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst batch = await client.batches.retrieve('batch_id');\n\nconsole.log(batch.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tbatch, err := client.Batches.Get(context.TODO(), \"batch_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", batch.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.batches.Batch;\nimport com.openai.models.batches.BatchRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Batch batch = client.batches().retrieve(\"batch_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nbatch = openai.batches.retrieve(\"batch_id\")\n\nputs(batch)" + }, + "response": "{\n \"id\": \"batch_abc123\",\n \"object\": \"batch\",\n \"endpoint\": \"/v1/completions\",\n \"errors\": null,\n \"input_file_id\": \"file-abc123\",\n \"completion_window\": \"24h\",\n \"status\": \"completed\",\n \"output_file_id\": \"file-cvaTdG\",\n \"error_file_id\": \"file-HOWS94\",\n \"created_at\": 1711471533,\n \"in_progress_at\": 1711471538,\n \"expires_at\": 1711557933,\n \"finalizing_at\": 1711493133,\n \"completed_at\": 1711493163,\n \"failed_at\": null,\n \"expired_at\": null,\n \"cancelling_at\": null,\n \"cancelled_at\": null,\n \"request_counts\": {\n \"total\": 100,\n \"completed\": 95,\n \"failed\": 5\n },\n \"metadata\": {\n \"customer_id\": \"user_123456789\",\n \"batch_description\": \"Nightly eval job\",\n }\n}\n" + } + } + } + }, + "/batches/{batch_id}/cancel": { + "post": { + "operationId": "cancelBatch", + "tags": [ + "Batch" + ], + "summary": "Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before changing to `cancelled`, where it will have partial results (if any) available in the output file.", + "parameters": [ + { + "in": "path", + "name": "batch_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the batch to cancel." + } + ], + "responses": { + "200": { + "description": "Batch is cancelling. Returns the cancelling batch's details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Batch" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Cancel batch", + "group": "batch", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/batches/batch_abc123/cancel \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -X POST\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nbatch = client.batches.cancel(\n \"batch_id\",\n)\nprint(batch.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const batch = await openai.batches.cancel(\"batch_abc123\");\n\n console.log(batch);\n}\n\nmain();\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst batch = await client.batches.cancel('batch_id');\n\nconsole.log(batch.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tbatch, err := client.Batches.Cancel(context.TODO(), \"batch_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", batch.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.batches.Batch;\nimport com.openai.models.batches.BatchCancelParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Batch batch = client.batches().cancel(\"batch_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nbatch = openai.batches.cancel(\"batch_id\")\n\nputs(batch)" + }, + "response": "{\n \"id\": \"batch_abc123\",\n \"object\": \"batch\",\n \"endpoint\": \"/v1/chat/completions\",\n \"errors\": null,\n \"input_file_id\": \"file-abc123\",\n \"completion_window\": \"24h\",\n \"status\": \"cancelling\",\n \"output_file_id\": null,\n \"error_file_id\": null,\n \"created_at\": 1711471533,\n \"in_progress_at\": 1711471538,\n \"expires_at\": 1711557933,\n \"finalizing_at\": null,\n \"completed_at\": null,\n \"failed_at\": null,\n \"expired_at\": null,\n \"cancelling_at\": 1711475133,\n \"cancelled_at\": null,\n \"request_counts\": {\n \"total\": 100,\n \"completed\": 23,\n \"failed\": 1\n },\n \"metadata\": {\n \"customer_id\": \"user_123456789\",\n \"batch_description\": \"Nightly eval job\",\n }\n}\n" + } + } + } + }, + "/chat/completions": { + "get": { + "operationId": "listChatCompletions", + "tags": [ + "Chat" + ], + "summary": "List stored Chat Completions. Only Chat Completions that have been stored\nwith the `store` parameter set to `true` will be returned.\n", + "parameters": [ + { + "name": "model", + "in": "query", + "description": "The model used to generate the Chat Completions.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "metadata", + "in": "query", + "description": "A list of metadata keys to filter the Chat Completions by. Example:\n\n`metadata[key1]=value1&metadata[key2]=value2`\n", + "required": false, + "schema": { + "$ref": "#/components/schemas/Metadata" + } + }, + { + "name": "after", + "in": "query", + "description": "Identifier for the last chat completion from the previous pagination request.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of Chat Completions to retrieve.", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for Chat Completions by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + } + ], + "responses": { + "200": { + "description": "A list of Chat Completions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatCompletionList" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List Chat Completions", + "group": "chat", + "path": "list", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.chat.completions.list()\npage = page.data[0]\nprint(page.id)", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatCompletion of client.chat.completions.list()) {\n console.log(chatCompletion.id);\n}", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Chat.Completions.List(context.TODO(), openai.ChatCompletionListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletionListPage;\nimport com.openai.models.chat.completions.ChatCompletionListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionListPage page = client.chat().completions().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.chat.completions.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"chat.completion\",\n \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"model\": \"gpt-5.4\",\n \"created\": 1738960610,\n \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n \"tool_choice\": null,\n \"usage\": {\n \"total_tokens\": 31,\n \"completion_tokens\": 18,\n \"prompt_tokens\": 13\n },\n \"seed\": 4944116822809979520,\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"presence_penalty\": 0.0,\n \"frequency_penalty\": 0.0,\n \"system_fingerprint\": \"fp_50cad350e4\",\n \"input_user\": null,\n \"service_tier\": \"default\",\n \"tools\": null,\n \"metadata\": {},\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"content\": \"Mind of circuits hum, \\nLearning patterns in silence— \\nFuture's quiet spark.\",\n \"role\": \"assistant\",\n \"tool_calls\": null,\n \"function_call\": null\n },\n \"finish_reason\": \"stop\",\n \"logprobs\": null\n }\n ],\n \"response_format\": null\n }\n ],\n \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "operationId": "createChatCompletion", + "tags": [ + "Chat" + ], + "summary": "**Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses)\nto take advantage of the latest OpenAI platform features. Compare\n[Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses).\n\n---\n\nCreates a model response for the given chat conversation. Learn more in the\n[text generation](/docs/guides/text-generation), [vision](/docs/guides/vision),\nand [audio](/docs/guides/audio) guides.\n\nParameter support can differ depending on the model used to generate the\nresponse, particularly for newer reasoning models. Parameters that are only\nsupported for reasoning models are noted below. For the current state of\nunsupported parameters in reasoning models,\n[refer to the reasoning guide](/docs/guides/reasoning).\n\nReturns a chat completion object, or a streamed sequence of chat completion\nchunk objects if the request is streamed.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateChatCompletionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateChatCompletionResponse" + } + }, + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/CreateChatCompletionStreamResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create chat completion", + "group": "chat", + "path": "create", + "examples": [ + { + "title": "Default", + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_chat_model_id\",\n \"messages\": [\n {\n \"role\": \"developer\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-5.4\",\n):\n print(completion)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n messages: [{ role: \"developer\", content: \"You are a helpful assistant.\" }],\n model: \"VAR_chat_model_id\",\n store: true,\n });\n\n console.log(completion.choices[0]);\n}\n\nmain();\n", + "csharp": "using System;\nusing System.Collections.Generic;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-5.4\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nList messages =\n[\n new SystemChatMessage(\"You are a helpful assistant.\"),\n new UserChatMessage(\"Hello!\")\n];\n\nChatCompletion completion = client.CompleteChat(messages);\n\nConsole.WriteLine(completion.Content[0].Text);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-5.4',\n});\n\nconsole.log(chatCompletion);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{{\n\t\t\tOfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n\t\t\t\tContent: openai.ChatCompletionDeveloperMessageParamContentUnion{\n\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\tModel: shared.ChatModelGPT5_4,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5_4)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5.4\")\n\nputs(chat_completion)" + }, + "response": "{\n \"id\": \"chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT\",\n \"object\": \"chat.completion\",\n \"created\": 1741569952,\n \"model\": \"gpt-5.4\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 19,\n \"completion_tokens\": 10,\n \"total_tokens\": 29,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\"\n}\n" + }, + { + "title": "Image input", + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"gpt-5.4\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"What is in this image?\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"\n }\n }\n ]\n }\n ],\n \"max_tokens\": 300\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-5.4\",\n):\n print(completion)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const response = await openai.chat.completions.create({\n model: \"gpt-5.4\",\n messages: [\n {\n role: \"user\",\n content: [\n { type: \"text\", text: \"What's in this image?\" },\n {\n type: \"image_url\",\n image_url: {\n \"url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\",\n },\n }\n ],\n },\n ],\n });\n console.log(response.choices[0]);\n}\nmain();\n", + "csharp": "using System;\nusing System.Collections.Generic;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-5.4\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nList messages =\n[\n new UserChatMessage(\n [\n ChatMessageContentPart.CreateTextPart(\"What's in this image?\"),\n ChatMessageContentPart.CreateImagePart(new Uri(\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"))\n ])\n];\n\nChatCompletion completion = client.CompleteChat(messages);\n\nConsole.WriteLine(completion.Content[0].Text);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-5.4',\n});\n\nconsole.log(chatCompletion);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{{\n\t\t\tOfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n\t\t\t\tContent: openai.ChatCompletionDeveloperMessageParamContentUnion{\n\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\tModel: shared.ChatModelGPT5_4,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5_4)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5.4\")\n\nputs(chat_completion)" + }, + "response": "{\n \"id\": \"chatcmpl-B9MHDbslfkBeAs8l4bebGdFOJ6PeG\",\n \"object\": \"chat.completion\",\n \"created\": 1741570283,\n \"model\": \"gpt-5.4\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The image shows a wooden boardwalk path running through a lush green field or meadow. The sky is bright blue with some scattered clouds, giving the scene a serene and peaceful atmosphere. Trees and shrubs are visible in the background.\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1117,\n \"completion_tokens\": 46,\n \"total_tokens\": 1163,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\"\n}\n" + }, + { + "title": "Streaming", + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_chat_model_id\",\n \"messages\": [\n {\n \"role\": \"developer\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"stream\": true\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-5.4\",\n):\n print(completion)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n model: \"VAR_chat_model_id\",\n messages: [\n {\"role\": \"developer\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ],\n stream: true,\n });\n\n for await (const chunk of completion) {\n console.log(chunk.choices[0].delta.content);\n }\n}\n\nmain();\n", + "csharp": "using System;\nusing System.ClientModel;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-5.4\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nList messages =\n[\n new SystemChatMessage(\"You are a helpful assistant.\"),\n new UserChatMessage(\"Hello!\")\n];\n\nAsyncCollectionResult completionUpdates = client.CompleteChatStreamingAsync(messages);\n\nawait foreach (StreamingChatCompletionUpdate completionUpdate in completionUpdates)\n{\n if (completionUpdate.ContentUpdate.Count > 0)\n {\n Console.Write(completionUpdate.ContentUpdate[0].Text);\n }\n}\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-5.4',\n});\n\nconsole.log(chatCompletion);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{{\n\t\t\tOfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n\t\t\t\tContent: openai.ChatCompletionDeveloperMessageParamContentUnion{\n\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\tModel: shared.ChatModelGPT5_4,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5_4)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5.4\")\n\nputs(chat_completion)" + }, + "response": "{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n....\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n" + }, + { + "title": "Functions", + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n-d '{\n \"model\": \"gpt-5.4\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What is the weather like in Boston today?\"\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [\"celsius\", \"fahrenheit\"]\n }\n },\n \"required\": [\"location\"]\n }\n }\n }\n ],\n \"tool_choice\": \"auto\"\n}'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-5.4\",\n):\n print(completion)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const messages = [{\"role\": \"user\", \"content\": \"What's the weather like in Boston today?\"}];\n const tools = [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\",\n },\n \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]},\n },\n \"required\": [\"location\"],\n },\n }\n }\n ];\n\n const response = await openai.chat.completions.create({\n model: \"gpt-5.4\",\n messages: messages,\n tools: tools,\n tool_choice: \"auto\",\n });\n\n console.log(response);\n}\n\nmain();\n", + "csharp": "using System;\nusing System.Collections.Generic;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-5.4\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nChatTool getCurrentWeatherTool = ChatTool.CreateFunctionTool(\n functionName: \"get_current_weather\",\n functionDescription: \"Get the current weather in a given location\",\n functionParameters: BinaryData.FromString(\"\"\"\n {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [ \"celsius\", \"fahrenheit\" ]\n }\n },\n \"required\": [ \"location\" ]\n }\n \"\"\")\n);\n\nList messages =\n[\n new UserChatMessage(\"What's the weather like in Boston today?\"),\n];\n\nChatCompletionOptions options = new()\n{\n Tools =\n {\n getCurrentWeatherTool\n },\n ToolChoice = ChatToolChoice.CreateAutoChoice(),\n};\n\nChatCompletion completion = client.CompleteChat(messages, options);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-5.4',\n});\n\nconsole.log(chatCompletion);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{{\n\t\t\tOfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n\t\t\t\tContent: openai.ChatCompletionDeveloperMessageParamContentUnion{\n\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\tModel: shared.ChatModelGPT5_4,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5_4)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5.4\")\n\nputs(chat_completion)" + }, + "response": "{\n \"id\": \"chatcmpl-abc123\",\n \"object\": \"chat.completion\",\n \"created\": 1699896916,\n \"model\": \"gpt-4o-mini\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_abc123\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"arguments\": \"{\\n\\\"location\\\": \\\"Boston, MA\\\"\\n}\"\n }\n }\n ]\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 82,\n \"completion_tokens\": 17,\n \"total_tokens\": 99,\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n }\n}\n" + }, + { + "title": "Logprobs", + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_chat_model_id\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"logprobs\": true,\n \"top_logprobs\": 2\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-5.4\",\n):\n print(completion)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n messages: [{ role: \"user\", content: \"Hello!\" }],\n model: \"VAR_chat_model_id\",\n logprobs: true,\n top_logprobs: 2,\n });\n\n console.log(completion.choices[0]);\n}\n\nmain();\n", + "csharp": "using System;\nusing System.Collections.Generic;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-5.4\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nList messages =\n[\n new UserChatMessage(\"Hello!\")\n];\n\nChatCompletionOptions options = new()\n{\n IncludeLogProbabilities = true,\n TopLogProbabilityCount = 2\n};\n\nChatCompletion completion = client.CompleteChat(messages, options);\n\nConsole.WriteLine(completion.Content[0].Text);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-5.4',\n});\n\nconsole.log(chatCompletion);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{{\n\t\t\tOfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n\t\t\t\tContent: openai.ChatCompletionDeveloperMessageParamContentUnion{\n\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\tModel: shared.ChatModelGPT5_4,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5_4)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5.4\")\n\nputs(chat_completion)" + }, + "response": "{\n \"id\": \"chatcmpl-123\",\n \"object\": \"chat.completion\",\n \"created\": 1702685778,\n \"model\": \"gpt-4o-mini\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\"\n },\n \"logprobs\": {\n \"content\": [\n {\n \"token\": \"Hello\",\n \"logprob\": -0.31725305,\n \"bytes\": [72, 101, 108, 108, 111],\n \"top_logprobs\": [\n {\n \"token\": \"Hello\",\n \"logprob\": -0.31725305,\n \"bytes\": [72, 101, 108, 108, 111]\n },\n {\n \"token\": \"Hi\",\n \"logprob\": -1.3190403,\n \"bytes\": [72, 105]\n }\n ]\n },\n {\n \"token\": \"!\",\n \"logprob\": -0.02380986,\n \"bytes\": [\n 33\n ],\n \"top_logprobs\": [\n {\n \"token\": \"!\",\n \"logprob\": -0.02380986,\n \"bytes\": [33]\n },\n {\n \"token\": \" there\",\n \"logprob\": -3.787621,\n \"bytes\": [32, 116, 104, 101, 114, 101]\n }\n ]\n },\n {\n \"token\": \" How\",\n \"logprob\": -0.000054669687,\n \"bytes\": [32, 72, 111, 119],\n \"top_logprobs\": [\n {\n \"token\": \" How\",\n \"logprob\": -0.000054669687,\n \"bytes\": [32, 72, 111, 119]\n },\n {\n \"token\": \"<|end|>\",\n \"logprob\": -10.953937,\n \"bytes\": null\n }\n ]\n },\n {\n \"token\": \" can\",\n \"logprob\": -0.015801601,\n \"bytes\": [32, 99, 97, 110],\n \"top_logprobs\": [\n {\n \"token\": \" can\",\n \"logprob\": -0.015801601,\n \"bytes\": [32, 99, 97, 110]\n },\n {\n \"token\": \" may\",\n \"logprob\": -4.161023,\n \"bytes\": [32, 109, 97, 121]\n }\n ]\n },\n {\n \"token\": \" I\",\n \"logprob\": -3.7697225e-6,\n \"bytes\": [\n 32,\n 73\n ],\n \"top_logprobs\": [\n {\n \"token\": \" I\",\n \"logprob\": -3.7697225e-6,\n \"bytes\": [32, 73]\n },\n {\n \"token\": \" assist\",\n \"logprob\": -13.596657,\n \"bytes\": [32, 97, 115, 115, 105, 115, 116]\n }\n ]\n },\n {\n \"token\": \" assist\",\n \"logprob\": -0.04571125,\n \"bytes\": [32, 97, 115, 115, 105, 115, 116],\n \"top_logprobs\": [\n {\n \"token\": \" assist\",\n \"logprob\": -0.04571125,\n \"bytes\": [32, 97, 115, 115, 105, 115, 116]\n },\n {\n \"token\": \" help\",\n \"logprob\": -3.1089056,\n \"bytes\": [32, 104, 101, 108, 112]\n }\n ]\n },\n {\n \"token\": \" you\",\n \"logprob\": -5.4385737e-6,\n \"bytes\": [32, 121, 111, 117],\n \"top_logprobs\": [\n {\n \"token\": \" you\",\n \"logprob\": -5.4385737e-6,\n \"bytes\": [32, 121, 111, 117]\n },\n {\n \"token\": \" today\",\n \"logprob\": -12.807695,\n \"bytes\": [32, 116, 111, 100, 97, 121]\n }\n ]\n },\n {\n \"token\": \" today\",\n \"logprob\": -0.0040071653,\n \"bytes\": [32, 116, 111, 100, 97, 121],\n \"top_logprobs\": [\n {\n \"token\": \" today\",\n \"logprob\": -0.0040071653,\n \"bytes\": [32, 116, 111, 100, 97, 121]\n },\n {\n \"token\": \"?\",\n \"logprob\": -5.5247097,\n \"bytes\": [63]\n }\n ]\n },\n {\n \"token\": \"?\",\n \"logprob\": -0.0008108172,\n \"bytes\": [63],\n \"top_logprobs\": [\n {\n \"token\": \"?\",\n \"logprob\": -0.0008108172,\n \"bytes\": [63]\n },\n {\n \"token\": \"?\\n\",\n \"logprob\": -7.184561,\n \"bytes\": [63, 10]\n }\n ]\n }\n ]\n },\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 9,\n \"completion_tokens\": 9,\n \"total_tokens\": 18,\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": null\n}\n" + } + ] + } + } + }, + "/chat/completions/{completion_id}": { + "get": { + "operationId": "getChatCompletion", + "tags": [ + "Chat" + ], + "summary": "Get a stored chat completion. Only Chat Completions that have been created\nwith the `store` parameter set to `true` will be returned.\n", + "parameters": [ + { + "in": "path", + "name": "completion_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the chat completion to retrieve." + } + ], + "responses": { + "200": { + "description": "A chat completion", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateChatCompletionResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Get chat completion", + "group": "chat", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions/chatcmpl-abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nchat_completion = client.chat.completions.retrieve(\n \"completion_id\",\n)\nprint(chat_completion.id)", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.retrieve('completion_id');\n\nconsole.log(chatCompletion.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.Get(context.TODO(), \"completion_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletion chatCompletion = client.chat().completions().retrieve(\"completion_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.retrieve(\"completion_id\")\n\nputs(chat_completion)" + }, + "response": "{\n \"object\": \"chat.completion\",\n \"id\": \"chatcmpl-abc123\",\n \"model\": \"gpt-4o-2024-08-06\",\n \"created\": 1738960610,\n \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n \"tool_choice\": null,\n \"usage\": {\n \"total_tokens\": 31,\n \"completion_tokens\": 18,\n \"prompt_tokens\": 13\n },\n \"seed\": 4944116822809979520,\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"presence_penalty\": 0.0,\n \"frequency_penalty\": 0.0,\n \"system_fingerprint\": \"fp_50cad350e4\",\n \"input_user\": null,\n \"service_tier\": \"default\",\n \"tools\": null,\n \"metadata\": {},\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"content\": \"Mind of circuits hum, \\nLearning patterns in silence— \\nFuture's quiet spark.\",\n \"role\": \"assistant\",\n \"tool_calls\": null,\n \"function_call\": null\n },\n \"finish_reason\": \"stop\",\n \"logprobs\": null\n }\n ],\n \"response_format\": null\n}\n" + } + } + }, + "post": { + "operationId": "updateChatCompletion", + "tags": [ + "Chat" + ], + "summary": "Modify a stored chat completion. Only Chat Completions that have been\ncreated with the `store` parameter set to `true` can be modified. Currently,\nthe only supported modification is to update the `metadata` field.\n", + "parameters": [ + { + "in": "path", + "name": "completion_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the chat completion to update." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "metadata" + ], + "properties": { + "metadata": { + "$ref": "#/components/schemas/Metadata" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "A chat completion", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateChatCompletionResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Update chat completion", + "group": "chat", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/chat/completions/chat_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"metadata\": {\"foo\": \"bar\"}}'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nchat_completion = client.chat.completions.update(\n completion_id=\"completion_id\",\n metadata={\n \"foo\": \"string\"\n },\n)\nprint(chat_completion.id)", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.update('completion_id', {\n metadata: { foo: 'string' },\n});\n\nconsole.log(chatCompletion.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.Update(\n\t\tcontext.TODO(),\n\t\t\"completion_id\",\n\t\topenai.ChatCompletionUpdateParams{\n\t\t\tMetadata: shared.Metadata{\n\t\t\t\t\"foo\": \"string\",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.JsonValue;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionUpdateParams params = ChatCompletionUpdateParams.builder()\n .completionId(\"completion_id\")\n .metadata(ChatCompletionUpdateParams.Metadata.builder()\n .putAdditionalProperty(\"foo\", JsonValue.from(\"string\"))\n .build())\n .build();\n ChatCompletion chatCompletion = client.chat().completions().update(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.update(\"completion_id\", metadata: {foo: \"string\"})\n\nputs(chat_completion)" + }, + "response": "{\n \"object\": \"chat.completion\",\n \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"model\": \"gpt-4o-2024-08-06\",\n \"created\": 1738960610,\n \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n \"tool_choice\": null,\n \"usage\": {\n \"total_tokens\": 31,\n \"completion_tokens\": 18,\n \"prompt_tokens\": 13\n },\n \"seed\": 4944116822809979520,\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"presence_penalty\": 0.0,\n \"frequency_penalty\": 0.0,\n \"system_fingerprint\": \"fp_50cad350e4\",\n \"input_user\": null,\n \"service_tier\": \"default\",\n \"tools\": null,\n \"metadata\": {\n \"foo\": \"bar\"\n },\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"content\": \"Mind of circuits hum, \\nLearning patterns in silence— \\nFuture's quiet spark.\",\n \"role\": \"assistant\",\n \"tool_calls\": null,\n \"function_call\": null\n },\n \"finish_reason\": \"stop\",\n \"logprobs\": null\n }\n ],\n \"response_format\": null\n}\n" + } + } + }, + "delete": { + "operationId": "deleteChatCompletion", + "tags": [ + "Chat" + ], + "summary": "Delete a stored chat completion. Only Chat Completions that have been\ncreated with the `store` parameter set to `true` can be deleted.\n", + "parameters": [ + { + "in": "path", + "name": "completion_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the chat completion to delete." + } + ], + "responses": { + "200": { + "description": "The chat completion was deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatCompletionDeleted" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete chat completion", + "group": "chat", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/chat/completions/chat_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nchat_completion_deleted = client.chat.completions.delete(\n \"completion_id\",\n)\nprint(chat_completion_deleted.id)", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletionDeleted = await client.chat.completions.delete('completion_id');\n\nconsole.log(chatCompletionDeleted.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletionDeleted, err := client.Chat.Completions.Delete(context.TODO(), \"completion_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletionDeleted.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletionDeleteParams;\nimport com.openai.models.chat.completions.ChatCompletionDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionDeleted chatCompletionDeleted = client.chat().completions().delete(\"completion_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion_deleted = openai.chat.completions.delete(\"completion_id\")\n\nputs(chat_completion_deleted)" + }, + "response": "{\n \"object\": \"chat.completion.deleted\",\n \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/chat/completions/{completion_id}/messages": { + "get": { + "operationId": "getChatCompletionMessages", + "tags": [ + "Chat" + ], + "summary": "Get the messages in a stored chat completion. Only Chat Completions that\nhave been created with the `store` parameter set to `true` will be\nreturned.\n", + "parameters": [ + { + "in": "path", + "name": "completion_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the chat completion to retrieve messages from." + }, + { + "name": "after", + "in": "query", + "description": "Identifier for the last message from the previous pagination request.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of messages to retrieve.", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for messages by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + } + ], + "responses": { + "200": { + "description": "A list of messages", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatCompletionMessageList" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Get chat messages", + "group": "chat", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions/chat_abc123/messages \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.chat.completions.messages.list(\n completion_id=\"completion_id\",\n)\npage = page.data[0]\nprint(page)", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatCompletionStoreMessage of client.chat.completions.messages.list(\n 'completion_id',\n)) {\n console.log(chatCompletionStoreMessage);\n}", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Chat.Completions.Messages.List(\n\t\tcontext.TODO(),\n\t\t\"completion_id\",\n\t\topenai.ChatCompletionMessageListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.messages.MessageListPage;\nimport com.openai.models.chat.completions.messages.MessageListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n MessageListPage page = client.chat().completions().messages().list(\"completion_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.chat.completions.messages.list(\"completion_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n \"role\": \"user\",\n \"content\": \"write a haiku about ai\",\n \"name\": null,\n \"content_parts\": null\n }\n ],\n \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n \"has_more\": false\n}\n" + } + } + } + }, + "/completions": { + "post": { + "operationId": "createCompletion", + "tags": [ + "Completions" + ], + "summary": "Creates a completion for the provided prompt and parameters.\n\nReturns a completion object, or a sequence of completion objects if the request is streamed.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCompletionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCompletionResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create completion", + "group": "completions", + "legacy": true, + "examples": [ + { + "title": "No streaming", + "request": { + "curl": "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_completion_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.completions.create(\n model=\"gpt-3.5-turbo-instruct\",\n prompt=\"This is a test.\",\n):\n print(completion)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.completions.create({\n model: \"VAR_completion_model_id\",\n prompt: \"Say this is a test.\",\n max_tokens: 7,\n temperature: 0,\n });\n\n console.log(completion);\n}\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst completion = await client.completions.create({\n model: 'gpt-3.5-turbo-instruct',\n prompt: 'This is a test.',\n});\n\nconsole.log(completion);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcompletion, err := client.Completions.New(context.TODO(), openai.CompletionNewParams{\n\t\tModel: openai.CompletionNewParamsModelGPT3_5TurboInstruct,\n\t\tPrompt: openai.CompletionNewParamsPromptUnion{\n\t\t\tOfString: openai.String(\"This is a test.\"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", completion)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.completions.Completion;\nimport com.openai.models.completions.CompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CompletionCreateParams params = CompletionCreateParams.builder()\n .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)\n .prompt(\"This is a test.\")\n .build();\n Completion completion = client.completions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncompletion = openai.completions.create(model: :\"gpt-3.5-turbo-instruct\", prompt: \"This is a test.\")\n\nputs(completion)" + }, + "response": "{\n \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\",\n \"object\": \"text_completion\",\n \"created\": 1589478378,\n \"model\": \"VAR_completion_model_id\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [\n {\n \"text\": \"\\n\\nThis is indeed a test\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": \"length\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 5,\n \"completion_tokens\": 7,\n \"total_tokens\": 12\n }\n}\n" + }, + { + "title": "Streaming", + "request": { + "curl": "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_completion_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0,\n \"stream\": true\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.completions.create(\n model=\"gpt-3.5-turbo-instruct\",\n prompt=\"This is a test.\",\n):\n print(completion)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const stream = await openai.completions.create({\n model: \"VAR_completion_model_id\",\n prompt: \"Say this is a test.\",\n stream: true,\n });\n\n for await (const chunk of stream) {\n console.log(chunk.choices[0].text)\n }\n}\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst completion = await client.completions.create({\n model: 'gpt-3.5-turbo-instruct',\n prompt: 'This is a test.',\n});\n\nconsole.log(completion);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcompletion, err := client.Completions.New(context.TODO(), openai.CompletionNewParams{\n\t\tModel: openai.CompletionNewParamsModelGPT3_5TurboInstruct,\n\t\tPrompt: openai.CompletionNewParamsPromptUnion{\n\t\t\tOfString: openai.String(\"This is a test.\"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", completion)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.completions.Completion;\nimport com.openai.models.completions.CompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CompletionCreateParams params = CompletionCreateParams.builder()\n .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)\n .prompt(\"This is a test.\")\n .build();\n Completion completion = client.completions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncompletion = openai.completions.create(model: :\"gpt-3.5-turbo-instruct\", prompt: \"This is a test.\")\n\nputs(completion)" + }, + "response": "{\n \"id\": \"cmpl-7iA7iJjj8V2zOkCGvWF2hAkDWBQZe\",\n \"object\": \"text_completion\",\n \"created\": 1690759702,\n \"choices\": [\n {\n \"text\": \"This\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": null\n }\n ],\n \"model\": \"gpt-3.5-turbo-instruct\"\n \"system_fingerprint\": \"fp_44709d6fcb\",\n}\n" + } + ] + } + } + }, + "/containers": { + "get": { + "summary": "List Containers", + "description": "Lists containers.", + "operationId": "ListContainers", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "Filter results by container name.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContainerListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List containers", + "group": "containers", + "path": "get", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/containers \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const containerListResponse of client.containers.list()) {\n console.log(containerListResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.containers.list()\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Containers.List(context.TODO(), openai.ContainerListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.ContainerListPage;\nimport com.openai.models.containers.ContainerListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ContainerListPage page = client.containers().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.containers.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n \"object\": \"container\",\n \"created_at\": 1747844794,\n \"status\": \"running\",\n \"expires_after\": {\n \"anchor\": \"last_active_at\",\n \"minutes\": 20\n },\n \"last_active_at\": 1747844794,\n \"memory_limit\": \"4g\",\n \"name\": \"My Container\"\n }\n ],\n \"first_id\": \"container_123\",\n \"last_id\": \"container_123\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "summary": "Create Container", + "description": "Creates a container.", + "operationId": "CreateContainer", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateContainerBody" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContainerResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create container", + "group": "containers", + "path": "post", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/containers \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"My Container\",\n \"memory_limit\": \"4g\",\n \"skills\": [\n {\n \"type\": \"skill_reference\",\n \"skill_id\": \"skill_4db6f1a2c9e73508b41f9da06e2c7b5f\"\n },\n {\n \"type\": \"skill_reference\",\n \"skill_id\": \"openai-spreadsheets\",\n \"version\": \"latest\"\n }\n ],\n \"network_policy\": {\n \"type\": \"allowlist\",\n \"allowed_domains\": [\"api.buildkite.com\"]\n }\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst container = await client.containers.create({ name: 'name' });\n\nconsole.log(container.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ncontainer = client.containers.create(\n name=\"name\",\n)\nprint(container.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcontainer, err := client.Containers.New(context.TODO(), openai.ContainerNewParams{\n\t\tName: \"name\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", container.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.ContainerCreateParams;\nimport com.openai.models.containers.ContainerCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ContainerCreateParams params = ContainerCreateParams.builder()\n .name(\"name\")\n .build();\n ContainerCreateResponse container = client.containers().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncontainer = openai.containers.create(name: \"name\")\n\nputs(container)" + }, + "response": "{\n \"id\": \"cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591\",\n \"object\": \"container\",\n \"created_at\": 1747857508,\n \"status\": \"running\",\n \"expires_after\": {\n \"anchor\": \"last_active_at\",\n \"minutes\": 20\n },\n \"last_active_at\": 1747857508,\n \"network_policy\": {\n \"type\": \"allowlist\",\n \"allowed_domains\": [\"api.buildkite.com\"]\n },\n \"memory_limit\": \"4g\",\n \"name\": \"My Container\"\n}\n" + } + } + } + }, + "/containers/{container_id}": { + "get": { + "summary": "Retrieve Container", + "description": "Retrieves a container.", + "operationId": "RetrieveContainer", + "parameters": [ + { + "name": "container_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContainerResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve container", + "group": "containers", + "path": "get", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst container = await client.containers.retrieve('container_id');\n\nconsole.log(container.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ncontainer = client.containers.retrieve(\n \"container_id\",\n)\nprint(container.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcontainer, err := client.Containers.Get(context.TODO(), \"container_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", container.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.ContainerRetrieveParams;\nimport com.openai.models.containers.ContainerRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ContainerRetrieveResponse container = client.containers().retrieve(\"container_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncontainer = openai.containers.retrieve(\"container_id\")\n\nputs(container)" + }, + "response": "{\n \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n \"object\": \"container\",\n \"created_at\": 1747844794,\n \"status\": \"running\",\n \"expires_after\": {\n \"anchor\": \"last_active_at\",\n \"minutes\": 20\n },\n \"last_active_at\": 1747844794,\n \"memory_limit\": \"4g\",\n \"name\": \"My Container\"\n}\n" + } + } + }, + "delete": { + "operationId": "DeleteContainer", + "summary": "Delete Container", + "description": "Delete a container.", + "parameters": [ + { + "name": "container_id", + "in": "path", + "description": "The ID of the container to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-oaiMeta": { + "name": "Delete a container", + "group": "containers", + "path": "delete", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.containers.delete('container_id');", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nclient.containers.delete(\n \"container_id\",\n)", + "go": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Containers.Delete(context.TODO(), \"container_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.ContainerDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n client.containers().delete(\"container_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresult = openai.containers.delete(\"container_id\")\n\nputs(result)" + }, + "response": "{\n \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n \"object\": \"container.deleted\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/containers/{container_id}/files": { + "post": { + "summary": "Create a Container File\n\nYou can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.\n", + "description": "Creates a container file.\n", + "operationId": "CreateContainerFile", + "parameters": [ + { + "name": "container_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateContainerFileBody" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateContainerFileBody" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContainerFileResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create container file", + "group": "containers", + "path": "post", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F file=\"@example.txt\"\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.containers.files.create('container_id');\n\nconsole.log(file.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfile = client.containers.files.create(\n container_id=\"container_id\",\n)\nprint(file.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfile, err := client.Containers.Files.New(\n\t\tcontext.TODO(),\n\t\t\"container_id\",\n\t\topenai.ContainerFileNewParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", file.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.files.FileCreateParams;\nimport com.openai.models.containers.files.FileCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileCreateResponse file = client.containers().files().create(\"container_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile = openai.containers.files.create(\"container_id\")\n\nputs(file)" + }, + "response": "{\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file\",\n \"created_at\": 1747848842,\n \"bytes\": 880,\n \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n \"source\": \"user\"\n}\n" + } + } + }, + "get": { + "summary": "List Container files", + "description": "Lists container files.", + "operationId": "ListContainerFiles", + "parameters": [ + { + "name": "container_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContainerFileListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List container files", + "group": "containers", + "path": "get", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fileListResponse of client.containers.files.list('container_id')) {\n console.log(fileListResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.containers.files.list(\n container_id=\"container_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Containers.Files.List(\n\t\tcontext.TODO(),\n\t\t\"container_id\",\n\t\topenai.ContainerFileListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.files.FileListPage;\nimport com.openai.models.containers.files.FileListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileListPage page = client.containers().files().list(\"container_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.containers.files.list(\"container_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file\",\n \"created_at\": 1747848842,\n \"bytes\": 880,\n \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n \"source\": \"user\"\n }\n ],\n \"first_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"has_more\": false,\n \"last_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\"\n}\n" + } + } + } + }, + "/containers/{container_id}/files/{file_id}": { + "get": { + "summary": "Retrieve Container File", + "description": "Retrieves a container file.", + "operationId": "RetrieveContainerFile", + "parameters": [ + { + "name": "container_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "file_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContainerFileResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve container file", + "group": "containers", + "path": "get", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/containers/container_123/files/file_456 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.containers.files.retrieve('file_id', { container_id: 'container_id' });\n\nconsole.log(file.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfile = client.containers.files.retrieve(\n file_id=\"file_id\",\n container_id=\"container_id\",\n)\nprint(file.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfile, err := client.Containers.Files.Get(\n\t\tcontext.TODO(),\n\t\t\"container_id\",\n\t\t\"file_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", file.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.files.FileRetrieveParams;\nimport com.openai.models.containers.files.FileRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileRetrieveParams params = FileRetrieveParams.builder()\n .containerId(\"container_id\")\n .fileId(\"file_id\")\n .build();\n FileRetrieveResponse file = client.containers().files().retrieve(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile = openai.containers.files.retrieve(\"file_id\", container_id: \"container_id\")\n\nputs(file)" + }, + "response": "{\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file\",\n \"created_at\": 1747848842,\n \"bytes\": 880,\n \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n \"source\": \"user\"\n}\n" + } + } + }, + "delete": { + "operationId": "DeleteContainerFile", + "summary": "Delete Container File", + "description": "Delete a container file.", + "parameters": [ + { + "name": "container_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "file_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-oaiMeta": { + "name": "Delete a container file", + "group": "containers", + "path": "delete", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863/files/cfile_682e0e8a43c88191a7978f477a09bdf5 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.containers.files.delete('file_id', { container_id: 'container_id' });", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nclient.containers.files.delete(\n file_id=\"file_id\",\n container_id=\"container_id\",\n)", + "go": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Containers.Files.Delete(\n\t\tcontext.TODO(),\n\t\t\"container_id\",\n\t\t\"file_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.files.FileDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileDeleteParams params = FileDeleteParams.builder()\n .containerId(\"container_id\")\n .fileId(\"file_id\")\n .build();\n client.containers().files().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresult = openai.containers.files.delete(\"file_id\", container_id: \"container_id\")\n\nputs(result)" + }, + "response": "{\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file.deleted\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/containers/{container_id}/files/{file_id}/content": { + "get": { + "summary": "Retrieve Container File Content", + "description": "Retrieves a container file content.", + "operationId": "RetrieveContainerFileContent", + "parameters": [ + { + "name": "container_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "file_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "x-oaiMeta": { + "name": "Retrieve container file content", + "group": "containers", + "path": "get", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/containers/container_123/files/cfile_456/content \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst content = await client.containers.files.content.retrieve('file_id', {\n container_id: 'container_id',\n});\n\nconsole.log(content);\n\nconst data = await content.blob();\nconsole.log(data);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ncontent = client.containers.files.content.retrieve(\n file_id=\"file_id\",\n container_id=\"container_id\",\n)\nprint(content)\ndata = content.read()\nprint(data)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcontent, err := client.Containers.Files.Content.Get(\n\t\tcontext.TODO(),\n\t\t\"container_id\",\n\t\t\"file_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", content)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.containers.files.content.ContentRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ContentRetrieveParams params = ContentRetrieveParams.builder()\n .containerId(\"container_id\")\n .fileId(\"file_id\")\n .build();\n HttpResponse content = client.containers().files().content().retrieve(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncontent = openai.containers.files.content.retrieve(\"file_id\", container_id: \"container_id\")\n\nputs(content)" + }, + "response": "\n" + } + } + } + }, + "/conversations/{conversation_id}/items": { + "post": { + "operationId": "createConversationItems", + "tags": [ + "Conversations" + ], + "summary": "Create items in a conversation with the given ID.", + "parameters": [ + { + "in": "path", + "name": "conversation_id", + "required": true, + "schema": { + "type": "string", + "example": "conv_123" + }, + "description": "The ID of the conversation to add the item to." + }, + { + "name": "include", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncludeEnum" + } + }, + "description": "Additional fields to include in the response. See the `include`\nparameter for [listing Conversation items above](/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information.\n" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "items": { + "type": "array", + "description": "The items to add to the conversation. You may add up to 20 items at a time.\n", + "items": { + "$ref": "#/components/schemas/InputItem" + }, + "maxItems": 20 + } + }, + "required": [ + "items" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationItemList" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create items", + "group": "conversations", + "path": "create-item", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/conversations/conv_123/items \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"items\": [\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"How are you?\"}\n ]\n }\n ]\n }'\n", + "javascript": "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst items = await client.conversations.items.create(\n \"conv_123\",\n {\n items: [\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"Hello!\" }],\n },\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"How are you?\" }],\n },\n ],\n }\n);\nconsole.log(items.data);\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n \"type\": \"message\",\n }],\n)\nprint(conversation_item_list.first_id)", + "csharp": "using System;\nusing System.Collections.Generic;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItemList created = client.ConversationItems.Create(\n conversationId: \"conv_123\",\n new CreateConversationItemsOptions\n {\n Items = new List\n {\n new ConversationMessage\n {\n Role = \"user\",\n Content =\n {\n new ConversationInputText { Text = \"Hello!\" }\n }\n },\n new ConversationMessage\n {\n Role = \"user\",\n Content =\n {\n new ConversationInputText { Text = \"How are you?\" }\n }\n }\n }\n }\n);\nConsole.WriteLine(created.Data.Count);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [\n {\n content: 'string',\n role: 'user',\n type: 'message',\n },\n ],\n});\n\nconsole.log(conversationItemList.first_id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversationItemList, err := client.Conversations.Items.New(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\tconversations.ItemNewParams{\n\t\t\tItems: []responses.ResponseInputItemUnionParam{{\n\t\t\t\tOfMessage: &responses.EasyInputMessageParam{\n\t\t\t\t\tContent: responses.EasyInputMessageContentUnionParam{\n\t\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t\t},\n\t\t\t\t\tRole: responses.EasyInputMessageRoleUser,\n\t\t\t\t\tType: responses.EasyInputMessageTypeMessage,\n\t\t\t\t},\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversationItemList.FirstID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItemList;\nimport com.openai.models.conversations.items.ItemCreateParams;\nimport com.openai.models.responses.EasyInputMessage;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemCreateParams params = ItemCreateParams.builder()\n .conversationId(\"conv_123\")\n .addItem(EasyInputMessage.builder()\n .content(\"string\")\n .role(EasyInputMessage.Role.USER)\n .type(EasyInputMessage.Type.MESSAGE)\n .build())\n .build();\n ConversationItemList conversationItemList = client.conversations().items().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\"conv_123\", items: [{content: \"string\", role: :user, type: :message}])\n\nputs(conversation_item_list)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n },\n {\n \"type\": \"message\",\n \"id\": \"msg_def\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"How are you?\"}\n ]\n }\n ],\n \"first_id\": \"msg_abc\",\n \"last_id\": \"msg_def\",\n \"has_more\": false\n}\n" + } + } + }, + "get": { + "operationId": "listConversationItems", + "tags": [ + "Conversations" + ], + "summary": "List all items for a conversation with the given ID.", + "parameters": [ + { + "in": "path", + "name": "conversation_id", + "required": true, + "schema": { + "type": "string", + "example": "conv_123" + }, + "description": "The ID of the conversation to list items for." + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between\n1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "in": "query", + "name": "order", + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "description": "The order to return the input items in. Default is `desc`.\n- `asc`: Return the input items in ascending order.\n- `desc`: Return the input items in descending order.\n" + }, + { + "in": "query", + "name": "after", + "schema": { + "type": "string" + }, + "description": "An item ID to list items after, used in pagination.\n" + }, + { + "name": "include", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncludeEnum" + } + }, + "description": "Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationItemList" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List items", + "group": "conversations", + "path": "list-items", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/conversations/conv_123/items?limit=10\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "javascript": "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst items = await client.conversations.items.list(\"conv_123\", { limit: 10 });\nconsole.log(items.data);\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.conversations.items.list(\n conversation_id=\"conv_123\",\n)\npage = page.data[0]\nprint(page)", + "csharp": "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItemList items = client.ConversationItems.List(\n conversationId: \"conv_123\",\n new ListConversationItemsOptions { Limit = 10 }\n);\nConsole.WriteLine(items.Data.Count);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const conversationItem of client.conversations.items.list('conv_123')) {\n console.log(conversationItem);\n}", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Conversations.Items.List(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\tconversations.ItemListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ItemListPage;\nimport com.openai.models.conversations.items.ItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemListPage page = client.conversations().items().list(\"conv_123\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.conversations.items.list(\"conv_123\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n }\n ],\n \"first_id\": \"msg_abc\",\n \"last_id\": \"msg_abc\",\n \"has_more\": false\n}\n" + } + } + } + }, + "/conversations/{conversation_id}/items/{item_id}": { + "get": { + "operationId": "getConversationItem", + "tags": [ + "Conversations" + ], + "summary": "Get a single item from a conversation with the given IDs.", + "parameters": [ + { + "in": "path", + "name": "conversation_id", + "required": true, + "schema": { + "type": "string", + "example": "conv_123" + }, + "description": "The ID of the conversation that contains the item." + }, + { + "in": "path", + "name": "item_id", + "required": true, + "schema": { + "type": "string", + "example": "msg_abc" + }, + "description": "The ID of the item to retrieve." + }, + { + "name": "include", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncludeEnum" + } + }, + "description": "Additional fields to include in the response. See the `include`\nparameter for [listing Conversation items above](/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information.\n" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationItem" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve an item", + "group": "conversations", + "path": "get-item", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/conversations/conv_123/items/msg_abc \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "javascript": "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst item = await client.conversations.items.retrieve(\n \"conv_123\",\n \"msg_abc\"\n);\nconsole.log(item);\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation_item = client.conversations.items.retrieve(\n item_id=\"msg_abc\",\n conversation_id=\"conv_123\",\n)\nprint(conversation_item)", + "csharp": "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItem item = client.ConversationItems.Get(\n conversationId: \"conv_123\",\n itemId: \"msg_abc\"\n);\nConsole.WriteLine(item.Id);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationItem = await client.conversations.items.retrieve('msg_abc', {\n conversation_id: 'conv_123',\n});\n\nconsole.log(conversationItem);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversationItem, err := client.Conversations.Items.Get(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\t\"msg_abc\",\n\t\tconversations.ItemGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversationItem)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItem;\nimport com.openai.models.conversations.items.ItemRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemRetrieveParams params = ItemRetrieveParams.builder()\n .conversationId(\"conv_123\")\n .itemId(\"msg_abc\")\n .build();\n ConversationItem conversationItem = client.conversations().items().retrieve(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item = openai.conversations.items.retrieve(\"msg_abc\", conversation_id: \"conv_123\")\n\nputs(conversation_item)" + }, + "response": "{\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n}\n" + } + } + }, + "delete": { + "operationId": "deleteConversationItem", + "tags": [ + "Conversations" + ], + "summary": "Delete an item from a conversation with the given IDs.", + "parameters": [ + { + "in": "path", + "name": "conversation_id", + "required": true, + "schema": { + "type": "string", + "example": "conv_123" + }, + "description": "The ID of the conversation that contains the item." + }, + { + "in": "path", + "name": "item_id", + "required": true, + "schema": { + "type": "string", + "example": "msg_abc" + }, + "description": "The ID of the item to delete." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete an item", + "group": "conversations", + "path": "delete-item", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/conversations/conv_123/items/msg_abc \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "javascript": "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst conversation = await client.conversations.items.delete(\n \"conv_123\",\n \"msg_abc\"\n);\nconsole.log(conversation);\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation = client.conversations.items.delete(\n item_id=\"msg_abc\",\n conversation_id=\"conv_123\",\n)\nprint(conversation.id)", + "csharp": "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation conversation = client.ConversationItems.Delete(\n conversationId: \"conv_123\",\n itemId: \"msg_abc\"\n);\nConsole.WriteLine(conversation.Id);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversation = await client.conversations.items.delete('msg_abc', {\n conversation_id: 'conv_123',\n});\n\nconsole.log(conversation.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversation, err := client.Conversations.Items.Delete(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\t\"msg_abc\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversation.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.items.ItemDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemDeleteParams params = ItemDeleteParams.builder()\n .conversationId(\"conv_123\")\n .itemId(\"msg_abc\")\n .build();\n Conversation conversation = client.conversations().items().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation = openai.conversations.items.delete(\"msg_abc\", conversation_id: \"conv_123\")\n\nputs(conversation)" + }, + "response": "{\n \"id\": \"conv_123\",\n \"object\": \"conversation\",\n \"created_at\": 1741900000,\n \"metadata\": {\"topic\": \"demo\"}\n}\n" + } + } + } + }, + "/embeddings": { + "post": { + "operationId": "createEmbedding", + "tags": [ + "Embeddings" + ], + "summary": "Creates an embedding vector representing the input text.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEmbeddingRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEmbeddingResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create embeddings", + "group": "embeddings", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/embeddings \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"input\": \"The food was delicious and the waiter...\",\n \"model\": \"text-embedding-ada-002\",\n \"encoding_format\": \"float\"\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ncreate_embedding_response = client.embeddings.create(\n input=\"The quick brown fox jumped over the lazy dog\",\n model=\"text-embedding-3-small\",\n)\nprint(create_embedding_response.data)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const embedding = await openai.embeddings.create({\n model: \"text-embedding-ada-002\",\n input: \"The quick brown fox jumped over the lazy dog\",\n encoding_format: \"float\",\n });\n\n console.log(embedding);\n}\n\nmain();\n", + "csharp": "using System;\n\nusing OpenAI.Embeddings;\n\nEmbeddingClient client = new(\n model: \"text-embedding-3-small\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nOpenAIEmbedding embedding = client.GenerateEmbedding(input: \"The quick brown fox jumped over the lazy dog\");\nReadOnlyMemory vector = embedding.ToFloats();\n\nfor (int i = 0; i < vector.Length; i++)\n{\n Console.WriteLine($\" [{i,4}] = {vector.Span[i]}\");\n}\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst createEmbeddingResponse = await client.embeddings.create({\n input: 'The quick brown fox jumped over the lazy dog',\n model: 'text-embedding-3-small',\n});\n\nconsole.log(createEmbeddingResponse.data);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcreateEmbeddingResponse, err := client.Embeddings.New(context.TODO(), openai.EmbeddingNewParams{\n\t\tInput: openai.EmbeddingNewParamsInputUnion{\n\t\t\tOfString: openai.String(\"The quick brown fox jumped over the lazy dog\"),\n\t\t},\n\t\tModel: openai.EmbeddingModelTextEmbedding3Small,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", createEmbeddingResponse.Data)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.embeddings.CreateEmbeddingResponse;\nimport com.openai.models.embeddings.EmbeddingCreateParams;\nimport com.openai.models.embeddings.EmbeddingModel;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EmbeddingCreateParams params = EmbeddingCreateParams.builder()\n .input(\"The quick brown fox jumped over the lazy dog\")\n .model(EmbeddingModel.TEXT_EMBEDDING_3_SMALL)\n .build();\n CreateEmbeddingResponse createEmbeddingResponse = client.embeddings().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncreate_embedding_response = openai.embeddings.create(\n input: \"The quick brown fox jumped over the lazy dog\",\n model: :\"text-embedding-3-small\"\n)\n\nputs(create_embedding_response)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"embedding\",\n \"embedding\": [\n 0.0023064255,\n -0.009327292,\n .... (1536 floats total for ada-002)\n -0.0028842222,\n ],\n \"index\": 0\n }\n ],\n \"model\": \"text-embedding-ada-002\",\n \"usage\": {\n \"prompt_tokens\": 8,\n \"total_tokens\": 8\n }\n}\n" + } + } + } + }, + "/evals": { + "get": { + "operationId": "listEvals", + "tags": [ + "Evals" + ], + "summary": "List evaluations for a project.\n", + "parameters": [ + { + "name": "after", + "in": "query", + "description": "Identifier for the last eval from the previous pagination request.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of evals to retrieve.", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for evals by timestamp. Use `asc` for ascending order or `desc` for descending order.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + }, + { + "name": "order_by", + "in": "query", + "description": "Evals can be ordered by creation time or last updated time. Use\n`created_at` for creation time or `updated_at` for last updated time.\n", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "default": "created_at" + } + } + ], + "responses": { + "200": { + "description": "A list of evals", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalList" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List evals", + "group": "evals", + "path": "list", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals?limit=1 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.evals.list()\npage = page.data[0]\nprint(page.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst evals = await openai.evals.list({ limit: 1 });\nconsole.log(evals);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const evalListResponse of client.evals.list()) {\n console.log(evalListResponse.id);\n}", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.EvalListPage;\nimport com.openai.models.evals.EvalListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalListPage page = client.evals().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.evals.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"object\": \"eval\",\n \"data_source_config\": {\n \"type\": \"stored_completions\",\n \"metadata\": {\n \"usecase\": \"push_notifications_summarizer\"\n },\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"type\": \"object\"\n },\n \"sample\": {\n \"type\": \"object\"\n }\n },\n \"required\": [\n \"item\",\n \"sample\"\n ]\n }\n },\n \"testing_criteria\": [\n {\n \"name\": \"Push Notification Summary Grader\",\n \"id\": \"Push Notification Summary Grader-9b876f24-4762-4be9-aff4-db7a9b31c673\",\n \"type\": \"label_model\",\n \"model\": \"o3-mini\",\n \"input\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"\\nLabel the following push notification summary as either correct or incorrect.\\nThe push notification and the summary will be provided below.\\nA good push notificiation summary is concise and snappy.\\nIf it is good, then label it as correct, if not, then incorrect.\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"\\nPush notifications: {{item.input}}\\nSummary: {{sample.output_text}}\\n\"\n }\n }\n ],\n \"passing_labels\": [\n \"correct\"\n ],\n \"labels\": [\n \"correct\",\n \"incorrect\"\n ],\n \"sampling_params\": null\n }\n ],\n \"name\": \"Push Notification Summary Grader\",\n \"created_at\": 1739314509,\n \"metadata\": {\n \"description\": \"A stored completions eval for push notification summaries\"\n }\n }\n ],\n \"first_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"last_id\": \"eval_67aa884cf6688190b58f657d4441c8b7\",\n \"has_more\": true\n}\n" + } + } + }, + "post": { + "operationId": "createEval", + "tags": [ + "Evals" + ], + "summary": "Create the structure of an evaluation that can be used to test a model's performance.\nAn evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.\nFor more information, see the [Evals guide](/docs/guides/evals).\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEvalRequest" + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eval" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create eval", + "group": "evals", + "path": "post", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Sentiment\",\n \"data_source_config\": {\n \"type\": \"stored_completions\",\n \"metadata\": {\n \"usecase\": \"chatbot\"\n }\n },\n \"testing_criteria\": [\n {\n \"type\": \"label_model\",\n \"model\": \"o3-mini\",\n \"input\": [\n {\n \"role\": \"developer\",\n \"content\": \"Classify the sentiment of the following statement as one of 'positive', 'neutral', or 'negative'\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Statement: {{item.input}}\"\n }\n ],\n \"passing_labels\": [\n \"positive\"\n ],\n \"labels\": [\n \"positive\",\n \"neutral\",\n \"negative\"\n ],\n \"name\": \"Example label grader\"\n }\n ]\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\neval = client.evals.create(\n data_source_config={\n \"item_schema\": {\n \"foo\": \"bar\"\n },\n \"type\": \"custom\",\n },\n testing_criteria=[{\n \"input\": [{\n \"content\": \"content\",\n \"role\": \"role\",\n }],\n \"labels\": [\"string\"],\n \"model\": \"model\",\n \"name\": \"name\",\n \"passing_labels\": [\"string\"],\n \"type\": \"label_model\",\n }],\n)\nprint(eval.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst evalObj = await openai.evals.create({\n name: \"Sentiment\",\n data_source_config: {\n type: \"stored_completions\",\n metadata: { usecase: \"chatbot\" }\n },\n testing_criteria: [\n {\n type: \"label_model\",\n model: \"o3-mini\",\n input: [\n { role: \"developer\", content: \"Classify the sentiment of the following statement as one of 'positive', 'neutral', or 'negative'\" },\n { role: \"user\", content: \"Statement: {{item.input}}\" }\n ],\n passing_labels: [\"positive\"],\n labels: [\"positive\", \"neutral\", \"negative\"],\n name: \"Example label grader\"\n }\n ]\n});\nconsole.log(evalObj);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst _eval = await client.evals.create({\n data_source_config: {\n item_schema: { foo: 'bar' },\n type: 'custom',\n },\n testing_criteria: [\n {\n input: [{ content: 'content', role: 'role' }],\n labels: ['string'],\n model: 'model',\n name: 'name',\n passing_labels: ['string'],\n type: 'label_model',\n },\n ],\n});\n\nconsole.log(_eval.id);", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.JsonValue;\nimport com.openai.models.evals.EvalCreateParams;\nimport com.openai.models.evals.EvalCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalCreateParams params = EvalCreateParams.builder()\n .customDataSourceConfig(EvalCreateParams.DataSourceConfig.Custom.ItemSchema.builder()\n .putAdditionalProperty(\"foo\", JsonValue.from(\"bar\"))\n .build())\n .addTestingCriterion(EvalCreateParams.TestingCriterion.LabelModel.builder()\n .addInput(EvalCreateParams.TestingCriterion.LabelModel.Input.SimpleInputMessage.builder()\n .content(\"content\")\n .role(\"role\")\n .build())\n .addLabel(\"string\")\n .model(\"model\")\n .name(\"name\")\n .addPassingLabel(\"string\")\n .build())\n .build();\n EvalCreateResponse eval = client.evals().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\neval_ = openai.evals.create(\n data_source_config: {item_schema: {foo: \"bar\"}, type: :custom},\n testing_criteria: [\n {\n input: [{content: \"content\", role: \"role\"}],\n labels: [\"string\"],\n model: \"model\",\n name: \"name\",\n passing_labels: [\"string\"],\n type: :label_model\n }\n ]\n)\n\nputs(eval_)" + }, + "response": "{\n \"object\": \"eval\",\n \"id\": \"eval_67b7fa9a81a88190ab4aa417e397ea21\",\n \"data_source_config\": {\n \"type\": \"stored_completions\",\n \"metadata\": {\n \"usecase\": \"chatbot\"\n },\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"type\": \"object\"\n },\n \"sample\": {\n \"type\": \"object\"\n }\n },\n \"required\": [\n \"item\",\n \"sample\"\n ]\n },\n \"testing_criteria\": [\n {\n \"name\": \"Example label grader\",\n \"type\": \"label_model\",\n \"model\": \"o3-mini\",\n \"input\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Classify the sentiment of the following statement as one of positive, neutral, or negative\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Statement: {{item.input}}\"\n }\n }\n ],\n \"passing_labels\": [\n \"positive\"\n ],\n \"labels\": [\n \"positive\",\n \"neutral\",\n \"negative\"\n ]\n }\n ],\n \"name\": \"Sentiment\",\n \"created_at\": 1740110490,\n \"metadata\": {\n \"description\": \"An eval for sentiment analysis\"\n }\n}\n" + } + } + } + }, + "/evals/{eval_id}": { + "get": { + "operationId": "getEval", + "tags": [ + "Evals" + ], + "summary": "Get an evaluation by ID.\n", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the evaluation to retrieve." + } + ], + "responses": { + "200": { + "description": "The evaluation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eval" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Get an eval", + "group": "evals", + "path": "get", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\neval = client.evals.retrieve(\n \"eval_id\",\n)\nprint(eval.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst evalObj = await openai.evals.retrieve(\"eval_67abd54d9b0081909a86353f6fb9317a\");\nconsole.log(evalObj);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst _eval = await client.evals.retrieve('eval_id');\n\nconsole.log(_eval.id);", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.EvalRetrieveParams;\nimport com.openai.models.evals.EvalRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalRetrieveResponse eval = client.evals().retrieve(\"eval_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\neval_ = openai.evals.retrieve(\"eval_id\")\n\nputs(eval_)" + }, + "response": "{\n \"object\": \"eval\",\n \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"data_source_config\": {\n \"type\": \"custom\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"type\": \"object\",\n \"properties\": {\n \"input\": {\n \"type\": \"string\"\n },\n \"ground_truth\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"input\",\n \"ground_truth\"\n ]\n }\n },\n \"required\": [\n \"item\"\n ]\n }\n },\n \"testing_criteria\": [\n {\n \"name\": \"String check\",\n \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\",\n \"type\": \"string_check\",\n \"input\": \"{{item.input}}\",\n \"reference\": \"{{item.ground_truth}}\",\n \"operation\": \"eq\"\n }\n ],\n \"name\": \"External Data Eval\",\n \"created_at\": 1739314509,\n \"metadata\": {},\n}\n" + } + } + }, + "post": { + "operationId": "updateEval", + "tags": [ + "Evals" + ], + "summary": "Update certain properties of an evaluation.\n", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the evaluation to update." + } + ], + "requestBody": { + "description": "Request to update an evaluation", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Rename the evaluation." + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The updated evaluation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eval" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Update an eval", + "group": "evals", + "path": "update", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\": \"Updated Eval\", \"metadata\": {\"description\": \"Updated description\"}}'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\neval = client.evals.update(\n eval_id=\"eval_id\",\n)\nprint(eval.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst updatedEval = await openai.evals.update(\n \"eval_67abd54d9b0081909a86353f6fb9317a\",\n {\n name: \"Updated Eval\",\n metadata: { description: \"Updated description\" }\n }\n);\nconsole.log(updatedEval);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst _eval = await client.evals.update('eval_id');\n\nconsole.log(_eval.id);", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.EvalUpdateParams;\nimport com.openai.models.evals.EvalUpdateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalUpdateResponse eval = client.evals().update(\"eval_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\neval_ = openai.evals.update(\"eval_id\")\n\nputs(eval_)" + }, + "response": "{\n \"object\": \"eval\",\n \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"data_source_config\": {\n \"type\": \"custom\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"type\": \"object\",\n \"properties\": {\n \"input\": {\n \"type\": \"string\"\n },\n \"ground_truth\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"input\",\n \"ground_truth\"\n ]\n }\n },\n \"required\": [\n \"item\"\n ]\n }\n },\n \"testing_criteria\": [\n {\n \"name\": \"String check\",\n \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\",\n \"type\": \"string_check\",\n \"input\": \"{{item.input}}\",\n \"reference\": \"{{item.ground_truth}}\",\n \"operation\": \"eq\"\n }\n ],\n \"name\": \"Updated Eval\",\n \"created_at\": 1739314509,\n \"metadata\": {\"description\": \"Updated description\"},\n}\n" + } + } + }, + "delete": { + "operationId": "deleteEval", + "tags": [ + "Evals" + ], + "summary": "Delete an evaluation.\n", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the evaluation to delete." + } + ], + "responses": { + "200": { + "description": "Successfully deleted the evaluation.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "object": { + "type": "string", + "example": "eval.deleted" + }, + "deleted": { + "type": "boolean", + "example": true + }, + "eval_id": { + "type": "string", + "example": "eval_abc123" + } + }, + "required": [ + "object", + "deleted", + "eval_id" + ] + } + } + } + }, + "404": { + "description": "Evaluation not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete an eval", + "group": "evals", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals/eval_abc123 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\neval = client.evals.delete(\n \"eval_id\",\n)\nprint(eval.eval_id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst deleted = await openai.evals.delete(\"eval_abc123\");\nconsole.log(deleted);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst _eval = await client.evals.delete('eval_id');\n\nconsole.log(_eval.eval_id);", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.EvalDeleteParams;\nimport com.openai.models.evals.EvalDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalDeleteResponse eval = client.evals().delete(\"eval_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\neval_ = openai.evals.delete(\"eval_id\")\n\nputs(eval_)" + }, + "response": "{\n \"object\": \"eval.deleted\",\n \"deleted\": true,\n \"eval_id\": \"eval_abc123\"\n}\n" + } + } + } + }, + "/evals/{eval_id}/runs": { + "get": { + "operationId": "getEvalRuns", + "tags": [ + "Evals" + ], + "summary": "Get a list of runs for an evaluation.\n", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the evaluation to retrieve runs for." + }, + { + "name": "after", + "in": "query", + "description": "Identifier for the last run from the previous pagination request.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of runs to retrieve.", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + }, + { + "name": "status", + "in": "query", + "description": "Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` | `canceled`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "queued", + "in_progress", + "completed", + "canceled", + "failed" + ] + } + } + ], + "responses": { + "200": { + "description": "A list of runs for the evaluation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRunList" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Get eval runs", + "group": "evals", + "path": "get-runs", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.evals.runs.list(\n eval_id=\"eval_id\",\n)\npage = page.data[0]\nprint(page.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst runs = await openai.evals.runs.list(\"egroup_67abd54d9b0081909a86353f6fb9317a\");\nconsole.log(runs);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const runListResponse of client.evals.runs.list('eval_id')) {\n console.log(runListResponse.id);\n}", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunListPage;\nimport com.openai.models.evals.runs.RunListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunListPage page = client.evals().runs().list(\"eval_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.evals.runs.list(\"eval_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n \"eval_id\": \"eval_67e0c726d560819083f19a957c4c640b\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67e0c726d560819083f19a957c4c640b\",\n \"status\": \"completed\",\n \"model\": \"o3-mini\",\n \"name\": \"bulk_with_negative_examples_o3-mini\",\n \"created_at\": 1742784467,\n \"result_counts\": {\n \"total\": 1,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 1\n },\n \"per_model_usage\": [\n {\n \"model_name\": \"o3-mini\",\n \"invocation_count\": 1,\n \"prompt_tokens\": 563,\n \"completion_tokens\": 874,\n \"total_tokens\": 1437,\n \"cached_tokens\": 0\n }\n ],\n \"per_testing_criteria_results\": [\n {\n \"testing_criteria\": \"Push Notification Summary Grader-1808cd0b-eeec-4e0b-a519-337e79f4f5d1\",\n \"passed\": 1,\n \"failed\": 0\n }\n ],\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"notifications\": \"\\n- New message from Sarah: \\\"Can you call me later?\\\"\\n- Your package has been delivered!\\n- Flash sale: 20% off electronics for the next 2 hours!\\n\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"\\n\\n\\n\\nYou are a helpful assistant that takes in an array of push notifications and returns a collapsed summary of them.\\nThe push notification will be provided as follows:\\n\\n...notificationlist...\\n\\n\\nYou should return just the summary and nothing else.\\n\\n\\nYou should return a summary that is concise and snappy.\\n\\n\\nHere is an example of a good summary:\\n\\n- Traffic alert: Accident reported on Main Street.- Package out for delivery: Expected by 5 PM.- New friend suggestion: Connect with Emma.\\n\\n\\nTraffic alert, package expected by 5pm, suggestion for new friend (Emily).\\n\\n\\n\\nHere is an example of a bad summary:\\n\\n- Traffic alert: Accident reported on Main Street.- Package out for delivery: Expected by 5 PM.- New friend suggestion: Connect with Emma.\\n\\n\\nTraffic alert reported on main street. You have a package that will arrive by 5pm, Emily is a new friend suggested for you.\\n\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.notifications}}\"\n }\n }\n ]\n },\n \"model\": \"o3-mini\",\n \"sampling_params\": null\n },\n \"error\": null,\n \"metadata\": {}\n }\n ],\n \"first_id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n \"last_id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n \"has_more\": true\n}\n" + } + } + }, + "post": { + "operationId": "createEvalRun", + "tags": [ + "Evals" + ], + "summary": "Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation.\n", + "parameters": [ + { + "in": "path", + "name": "eval_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the evaluation to create a run for." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEvalRunRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a run for the evaluation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + }, + "400": { + "description": "Bad request (for example, missing eval object)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create eval run", + "group": "evals", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals/eval_67e579652b548190aaa83ada4b125f47/runs \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\":\"gpt-4o-mini\",\"data_source\":{\"type\":\"completions\",\"input_messages\":{\"type\":\"template\",\"template\":[{\"role\":\"developer\",\"content\":\"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"} , {\"role\":\"user\",\"content\":\"{{item.input}}\"}]} ,\"sampling_params\":{\"temperature\":1,\"max_completions_tokens\":2048,\"top_p\":1,\"seed\":42},\"model\":\"gpt-4o-mini\",\"source\":{\"type\":\"file_content\",\"content\":[{\"item\":{\"input\":\"Tech Company Launches Advanced Artificial Intelligence Platform\",\"ground_truth\":\"Technology\"}}]}}'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nrun = client.evals.runs.create(\n eval_id=\"eval_id\",\n data_source={\n \"source\": {\n \"content\": [{\n \"item\": {\n \"foo\": \"bar\"\n }\n }],\n \"type\": \"file_content\",\n },\n \"type\": \"jsonl\",\n },\n)\nprint(run.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst run = await openai.evals.runs.create(\n \"eval_67e579652b548190aaa83ada4b125f47\",\n {\n name: \"gpt-4o-mini\",\n data_source: {\n type: \"completions\",\n input_messages: {\n type: \"template\",\n template: [\n {\n role: \"developer\",\n content: \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n },\n {\n role: \"user\",\n content: \"{{item.input}}\"\n }\n ]\n },\n sampling_params: {\n temperature: 1,\n max_completions_tokens: 2048,\n top_p: 1,\n seed: 42\n },\n model: \"gpt-4o-mini\",\n source: {\n type: \"file_content\",\n content: [\n {\n item: {\n input: \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n ground_truth: \"Technology\"\n }\n }\n ]\n }\n }\n }\n);\nconsole.log(run);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst run = await client.evals.runs.create('eval_id', {\n data_source: {\n source: { content: [{ item: { foo: 'bar' } }], type: 'file_content' },\n type: 'jsonl',\n },\n});\n\nconsole.log(run.id);", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.JsonValue;\nimport com.openai.models.evals.runs.CreateEvalJsonlRunDataSource;\nimport com.openai.models.evals.runs.RunCreateParams;\nimport com.openai.models.evals.runs.RunCreateResponse;\nimport java.util.List;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunCreateParams params = RunCreateParams.builder()\n .evalId(\"eval_id\")\n .dataSource(CreateEvalJsonlRunDataSource.builder()\n .fileContentSource(List.of(CreateEvalJsonlRunDataSource.Source.FileContent.Content.builder()\n .item(CreateEvalJsonlRunDataSource.Source.FileContent.Content.Item.builder()\n .putAdditionalProperty(\"foo\", JsonValue.from(\"bar\"))\n .build())\n .build()))\n .build())\n .build();\n RunCreateResponse run = client.evals().runs().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.evals.runs.create(\n \"eval_id\",\n data_source: {source: {content: [{item: {foo: \"bar\"}}], type: :file_content}, type: :jsonl}\n)\n\nputs(run)" + }, + "response": "{\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67e57965b480819094274e3a32235e4c\",\n \"eval_id\": \"eval_67e579652b548190aaa83ada4b125f47\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47&run_id=evalrun_67e57965b480819094274e3a32235e4c\",\n \"status\": \"queued\",\n \"model\": \"gpt-4o-mini\",\n \"name\": \"gpt-4o-mini\",\n \"created_at\": 1743092069,\n \"result_counts\": {\n \"total\": 0,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 0\n },\n \"per_model_usage\": null,\n \"per_testing_criteria_results\": null,\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n \"ground_truth\": \"Technology\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.input}}\"\n }\n }\n ]\n },\n \"model\": \"gpt-4o-mini\",\n \"sampling_params\": {\n \"seed\": 42,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completions_tokens\": 2048\n }\n },\n \"error\": null,\n \"metadata\": {}\n}\n" + } + } + } + }, + "/evals/{eval_id}/runs/{run_id}": { + "get": { + "operationId": "getEvalRun", + "tags": [ + "Evals" + ], + "summary": "Get an evaluation run by ID.\n", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the evaluation to retrieve runs for." + }, + { + "name": "run_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run to retrieve." + } + ], + "responses": { + "200": { + "description": "The evaluation run", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Get an eval run", + "group": "evals", + "path": "get", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nrun = client.evals.runs.retrieve(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\nprint(run.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst run = await openai.evals.runs.retrieve(\n \"evalrun_67abd54d60ec8190832b46859da808f7\",\n { eval_id: \"eval_67abd54d9b0081909a86353f6fb9317a\" }\n);\nconsole.log(run);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst run = await client.evals.runs.retrieve('run_id', { eval_id: 'eval_id' });\n\nconsole.log(run.id);", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunRetrieveParams;\nimport com.openai.models.evals.runs.RunRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunRetrieveParams params = RunRetrieveParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n RunRetrieveResponse run = client.evals().runs().retrieve(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.evals.runs.retrieve(\"run_id\", eval_id: \"eval_id\")\n\nputs(run)" + }, + "response": "{\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7\",\n \"status\": \"queued\",\n \"model\": \"gpt-4o-mini\",\n \"name\": \"gpt-4o-mini\",\n \"created_at\": 1743092069,\n \"result_counts\": {\n \"total\": 0,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 0\n },\n \"per_model_usage\": null,\n \"per_testing_criteria_results\": null,\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Summit Addresses Climate Change Strategies\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"National Team Qualifies for World Championship Finals\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"World Leaders Sign Historic Climate Agreement\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Cooperation Strengthened Through New Treaty\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n \"ground_truth\": \"Sports\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.input}}\"\n }\n }\n ]\n },\n \"model\": \"gpt-4o-mini\",\n \"sampling_params\": {\n \"seed\": 42,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completions_tokens\": 2048\n }\n },\n \"error\": null,\n \"metadata\": {}\n}\n" + } + } + }, + "post": { + "operationId": "cancelEvalRun", + "tags": [ + "Evals" + ], + "summary": "Cancel an ongoing evaluation run.\n", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the evaluation whose run you want to cancel." + }, + { + "name": "run_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run to cancel." + } + ], + "responses": { + "200": { + "description": "The canceled eval run object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Cancel eval run", + "group": "evals", + "path": "post", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/cancel \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.evals.runs.cancel(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\nprint(response.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst canceledRun = await openai.evals.runs.cancel(\n \"evalrun_67abd54d60ec8190832b46859da808f7\",\n { eval_id: \"eval_67abd54d9b0081909a86353f6fb9317a\" }\n);\nconsole.log(canceledRun);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.evals.runs.cancel('run_id', { eval_id: 'eval_id' });\n\nconsole.log(response.id);", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunCancelParams;\nimport com.openai.models.evals.runs.RunCancelResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunCancelParams params = RunCancelParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n RunCancelResponse response = client.evals().runs().cancel(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.evals.runs.cancel(\"run_id\", eval_id: \"eval_id\")\n\nputs(response)" + }, + "response": "{\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7\",\n \"status\": \"canceled\",\n \"model\": \"gpt-4o-mini\",\n \"name\": \"gpt-4o-mini\",\n \"created_at\": 1743092069,\n \"result_counts\": {\n \"total\": 0,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 0\n },\n \"per_model_usage\": null,\n \"per_testing_criteria_results\": null,\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Summit Addresses Climate Change Strategies\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"National Team Qualifies for World Championship Finals\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"World Leaders Sign Historic Climate Agreement\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Cooperation Strengthened Through New Treaty\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n \"ground_truth\": \"Sports\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.input}}\"\n }\n }\n ]\n },\n \"model\": \"gpt-4o-mini\",\n \"sampling_params\": {\n \"seed\": 42,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completions_tokens\": 2048\n }\n },\n \"error\": null,\n \"metadata\": {}\n}\n" + } + } + }, + "delete": { + "operationId": "deleteEvalRun", + "tags": [ + "Evals" + ], + "summary": "Delete an eval run.\n", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the evaluation to delete the run from." + }, + { + "name": "run_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run to delete." + } + ], + "responses": { + "200": { + "description": "Successfully deleted the eval run", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "object": { + "type": "string", + "example": "eval.run.deleted" + }, + "deleted": { + "type": "boolean", + "example": true + }, + "run_id": { + "type": "string", + "example": "evalrun_677469f564d48190807532a852da3afb" + } + } + } + } + } + }, + "404": { + "description": "Run not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete eval run", + "group": "evals", + "path": "delete", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals/eval_123abc/runs/evalrun_abc456 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nrun = client.evals.runs.delete(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\nprint(run.run_id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst deleted = await openai.evals.runs.delete(\n \"eval_123abc\",\n \"evalrun_abc456\"\n);\nconsole.log(deleted);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst run = await client.evals.runs.delete('run_id', { eval_id: 'eval_id' });\n\nconsole.log(run.run_id);", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunDeleteParams;\nimport com.openai.models.evals.runs.RunDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunDeleteParams params = RunDeleteParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n RunDeleteResponse run = client.evals().runs().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.evals.runs.delete(\"run_id\", eval_id: \"eval_id\")\n\nputs(run)" + }, + "response": "{\n \"object\": \"eval.run.deleted\",\n \"deleted\": true,\n \"run_id\": \"evalrun_abc456\"\n}\n" + } + } + } + }, + "/evals/{eval_id}/runs/{run_id}/output_items": { + "get": { + "operationId": "getEvalRunOutputItems", + "tags": [ + "Evals" + ], + "summary": "Get a list of output items for an evaluation run.\n", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the evaluation to retrieve runs for." + }, + { + "name": "run_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run to retrieve output items for." + }, + { + "name": "after", + "in": "query", + "description": "Identifier for the last output item from the previous pagination request.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of output items to retrieve.", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "status", + "in": "query", + "description": "Filter output items by status. Use `failed` to filter by failed output\nitems or `pass` to filter by passed output items.\n", + "required": false, + "schema": { + "type": "string", + "enum": [ + "fail", + "pass" + ] + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for output items by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + } + ], + "responses": { + "200": { + "description": "A list of output items for the evaluation run", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRunOutputItemList" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Get eval run output items", + "group": "evals", + "path": "get", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs/erun_67abd54d60ec8190832b46859da808f7/output_items \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.evals.runs.output_items.list(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\npage = page.data[0]\nprint(page.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst outputItems = await openai.evals.runs.outputItems.list(\n \"egroup_67abd54d9b0081909a86353f6fb9317a\",\n \"erun_67abd54d60ec8190832b46859da808f7\"\n);\nconsole.log(outputItems);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const outputItemListResponse of client.evals.runs.outputItems.list('run_id', {\n eval_id: 'eval_id',\n})) {\n console.log(outputItemListResponse.id);\n}", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.outputitems.OutputItemListPage;\nimport com.openai.models.evals.runs.outputitems.OutputItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n OutputItemListParams params = OutputItemListParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n OutputItemListPage page = client.evals().runs().outputItems().list(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.evals.runs.output_items.list(\"run_id\", eval_id: \"eval_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"eval.run.output_item\",\n \"id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n \"created_at\": 1743092076,\n \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"status\": \"pass\",\n \"datasource_item_id\": 5,\n \"datasource_item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n },\n \"results\": [\n {\n \"name\": \"String check-a2486074-d803-4445-b431-ad2262e85d47\",\n \"sample\": null,\n \"passed\": true,\n \"score\": 1.0\n }\n ],\n \"sample\": {\n \"input\": [\n {\n \"role\": \"developer\",\n \"content\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n },\n {\n \"role\": \"user\",\n \"content\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n }\n ],\n \"output\": [\n {\n \"role\": \"assistant\",\n \"content\": \"Markets\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n }\n ],\n \"finish_reason\": \"stop\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"usage\": {\n \"total_tokens\": 325,\n \"completion_tokens\": 2,\n \"prompt_tokens\": 323,\n \"cached_tokens\": 0\n },\n \"error\": null,\n \"temperature\": 1.0,\n \"max_completion_tokens\": 2048,\n \"top_p\": 1.0,\n \"seed\": 42\n }\n }\n ],\n \"first_id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n \"last_id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n \"has_more\": true\n}\n" + } + } + } + }, + "/evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}": { + "get": { + "operationId": "getEvalRunOutputItem", + "tags": [ + "Evals" + ], + "summary": "Get an evaluation run output item by ID.\n", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the evaluation to retrieve runs for." + }, + { + "name": "run_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run to retrieve." + }, + { + "name": "output_item_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the output item to retrieve." + } + ], + "responses": { + "200": { + "description": "The evaluation run output item", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRunOutputItem" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Get an output item of an eval run", + "group": "evals", + "path": "get", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/output_items/outputitem_67abd55eb6548190bb580745d5644a33 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\noutput_item = client.evals.runs.output_items.retrieve(\n output_item_id=\"output_item_id\",\n eval_id=\"eval_id\",\n run_id=\"run_id\",\n)\nprint(output_item.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst outputItem = await openai.evals.runs.outputItems.retrieve(\n \"outputitem_67abd55eb6548190bb580745d5644a33\",\n {\n eval_id: \"eval_67abd54d9b0081909a86353f6fb9317a\",\n run_id: \"evalrun_67abd54d60ec8190832b46859da808f7\",\n }\n);\nconsole.log(outputItem);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst outputItem = await client.evals.runs.outputItems.retrieve('output_item_id', {\n eval_id: 'eval_id',\n run_id: 'run_id',\n});\n\nconsole.log(outputItem.id);", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.outputitems.OutputItemRetrieveParams;\nimport com.openai.models.evals.runs.outputitems.OutputItemRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n OutputItemRetrieveParams params = OutputItemRetrieveParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .outputItemId(\"output_item_id\")\n .build();\n OutputItemRetrieveResponse outputItem = client.evals().runs().outputItems().retrieve(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\noutput_item = openai.evals.runs.output_items.retrieve(\"output_item_id\", eval_id: \"eval_id\", run_id: \"run_id\")\n\nputs(output_item)" + }, + "response": "{\n \"object\": \"eval.run.output_item\",\n \"id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n \"created_at\": 1743092076,\n \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"status\": \"pass\",\n \"datasource_item_id\": 5,\n \"datasource_item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n },\n \"results\": [\n {\n \"name\": \"String check-a2486074-d803-4445-b431-ad2262e85d47\",\n \"sample\": null,\n \"passed\": true,\n \"score\": 1.0\n }\n ],\n \"sample\": {\n \"input\": [\n {\n \"role\": \"developer\",\n \"content\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n },\n {\n \"role\": \"user\",\n \"content\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n }\n ],\n \"output\": [\n {\n \"role\": \"assistant\",\n \"content\": \"Markets\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n }\n ],\n \"finish_reason\": \"stop\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"usage\": {\n \"total_tokens\": 325,\n \"completion_tokens\": 2,\n \"prompt_tokens\": 323,\n \"cached_tokens\": 0\n },\n \"error\": null,\n \"temperature\": 1.0,\n \"max_completion_tokens\": 2048,\n \"top_p\": 1.0,\n \"seed\": 42\n }\n}\n" + } + } + } + }, + "/files": { + "get": { + "operationId": "listFiles", + "tags": [ + "Files" + ], + "summary": "Returns a list of files.", + "parameters": [ + { + "in": "query", + "name": "purpose", + "required": false, + "schema": { + "type": "string" + }, + "description": "Only return files with the given purpose." + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000.\n", + "required": false, + "schema": { + "type": "integer", + "default": 10000 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFilesResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List files", + "group": "files", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.files.list()\npage = page.data[0]\nprint(page)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.files.list();\n\n for await (const file of list) {\n console.log(file);\n }\n}\n\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fileObject of client.files.list()) {\n console.log(fileObject);\n}", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Files.List(context.TODO(), openai.FileListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileListPage;\nimport com.openai.models.files.FileListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileListPage page = client.files().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.files.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 175,\n \"created_at\": 1613677385,\n \"expires_at\": 1677614202,\n \"filename\": \"salesOverview.pdf\",\n \"purpose\": \"assistants\",\n },\n {\n \"id\": \"file-abc456\",\n \"object\": \"file\",\n \"bytes\": 140,\n \"created_at\": 1613779121,\n \"expires_at\": 1677614202,\n \"filename\": \"puppy.jsonl\",\n \"purpose\": \"fine-tune\",\n }\n ],\n \"first_id\": \"file-abc123\",\n \"last_id\": \"file-abc456\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "operationId": "createFile", + "tags": [ + "Files" + ], + "summary": "Upload a file that can be used across various endpoints. Individual files\ncan be up to 512 MB, and each project can store up to 2.5 TB of files in\ntotal. There is no organization-wide storage limit. Uploads to this\nendpoint are rate-limited to 1,000 requests per minute per authenticated\nuser.\n\n- The Assistants API supports files up to 2 million tokens and of specific\n file types. See the [Assistants Tools guide](/docs/assistants/tools) for\n details.\n- The Fine-tuning API only supports `.jsonl` files. The input also has\n certain required formats for fine-tuning\n [chat](/docs/api-reference/fine-tuning/chat-input) or\n [completions](/docs/api-reference/fine-tuning/completions-input) models.\n- The Batch API only supports `.jsonl` files up to 200 MB in size. The input\n also has a specific required\n [format](/docs/api-reference/batch/request-input).\n- For Retrieval or `file_search` ingestion, upload files here first. If\n you need to attach multiple uploaded files to the same vector store, use\n [`/vector_stores/{vector_store_id}/file_batches`](/docs/api-reference/vector-stores-file-batches/createBatch)\n instead of attaching them one by one. Vector store attachment has separate\n limits from file upload, including 2,000 attached files per minute per\n organization.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these\nstorage limits.\n", + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateFileRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAIFile" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Upload file", + "group": "files", + "description": "Uploads a file for later use across OpenAI APIs. Uploads to this endpoint are rate-limited to 1,000 requests per minute per authenticated user. For Retrieval or `file_search` ingestion, upload files here first. If you need to attach multiple uploaded files to the same vector store, use vector store file batches instead of attaching them one by one.\n", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F purpose=\"fine-tune\" \\\n -F file=\"@mydata.jsonl\"\n -F expires_after[anchor]=\"created_at\"\n -F expires_after[seconds]=2592000\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfile_object = client.files.create(\n file=b\"Example data\",\n purpose=\"assistants\",\n)\nprint(file_object.id)", + "javascript": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.create({\n file: fs.createReadStream(\"mydata.jsonl\"),\n purpose: \"fine-tune\",\n expires_after: {\n anchor: \"created_at\",\n seconds: 2592000\n }\n });\n\n console.log(file);\n}\n\nmain();", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fileObject = await client.files.create({\n file: fs.createReadStream('fine-tune.jsonl'),\n purpose: 'assistants',\n});\n\nconsole.log(fileObject.id);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfileObject, err := client.Files.New(context.TODO(), openai.FileNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tPurpose: openai.FilePurposeAssistants,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fileObject.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileCreateParams;\nimport com.openai.models.files.FileObject;\nimport com.openai.models.files.FilePurpose;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileCreateParams params = FileCreateParams.builder()\n .file(new ByteArrayInputStream(\"Example data\".getBytes()))\n .purpose(FilePurpose.ASSISTANTS)\n .build();\n FileObject fileObject = client.files().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile_object = openai.files.create(file: StringIO.new(\"Example data\"), purpose: :assistants)\n\nputs(file_object)" + }, + "response": "{\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 120000,\n \"created_at\": 1677610602,\n \"expires_at\": 1677614202,\n \"filename\": \"mydata.jsonl\",\n \"purpose\": \"fine-tune\",\n}\n" + } + } + } + }, + "/files/{file_id}": { + "delete": { + "operationId": "deleteFile", + "tags": [ + "Files" + ], + "summary": "Delete a file and remove it from all vector stores.", + "parameters": [ + { + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the file to use for this request." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteFileResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete file", + "group": "files", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/files/file-abc123 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfile_deleted = client.files.delete(\n \"file_id\",\n)\nprint(file_deleted.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.delete(\"file-abc123\");\n\n console.log(file);\n}\n\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fileDeleted = await client.files.delete('file_id');\n\nconsole.log(fileDeleted.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfileDeleted, err := client.Files.Delete(context.TODO(), \"file_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fileDeleted.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileDeleteParams;\nimport com.openai.models.files.FileDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileDeleted fileDeleted = client.files().delete(\"file_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile_deleted = openai.files.delete(\"file_id\")\n\nputs(file_deleted)" + }, + "response": "{\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"deleted\": true\n}\n" + } + } + }, + "get": { + "operationId": "retrieveFile", + "tags": [ + "Files" + ], + "summary": "Returns information about a specific file.", + "parameters": [ + { + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the file to use for this request." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAIFile" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve file", + "group": "files", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/files/file-abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfile_object = client.files.retrieve(\n \"file_id\",\n)\nprint(file_object.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.retrieve(\"file-abc123\");\n\n console.log(file);\n}\n\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fileObject = await client.files.retrieve('file_id');\n\nconsole.log(fileObject.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfileObject, err := client.Files.Get(context.TODO(), \"file_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fileObject.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileObject;\nimport com.openai.models.files.FileRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileObject fileObject = client.files().retrieve(\"file_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile_object = openai.files.retrieve(\"file_id\")\n\nputs(file_object)" + }, + "response": "{\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 120000,\n \"created_at\": 1677610602,\n \"expires_at\": 1677614202,\n \"filename\": \"mydata.jsonl\",\n \"purpose\": \"fine-tune\",\n}\n" + } + } + } + }, + "/files/{file_id}/content": { + "get": { + "operationId": "downloadFile", + "tags": [ + "Files" + ], + "summary": "Returns the contents of the specified file.", + "parameters": [ + { + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the file to use for this request." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve file content", + "group": "files", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/files/file-abc123/content \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" > file.jsonl\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.files.content(\n \"file_id\",\n)\nprint(response)\ncontent = response.read()\nprint(content)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.content(\"file-abc123\");\n\n console.log(file);\n}\n\nmain();\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.files.content('file_id');\n\nconsole.log(response);\n\nconst content = await response.blob();\nconsole.log(content);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Files.Content(context.TODO(), \"file_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.files.FileContentParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n HttpResponse response = client.files().content(\"file_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.files.content(\"file_id\")\n\nputs(response)" + }, + "response": "" + } + } + } + }, + "/fine_tuning/alpha/graders/run": { + "post": { + "operationId": "runGrader", + "tags": [ + "Fine-tuning" + ], + "summary": "Run a grader.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunGraderRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunGraderResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Run grader", + "beta": true, + "group": "graders", + "examples": [ + { + "title": "Score text alignment", + "request": { + "curl": "curl -X POST https://api.openai.com/v1/fine_tuning/alpha/graders/run \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"grader\": {\n \"type\": \"score_model\",\n \"name\": \"Example score model grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"input_text\",\n \"text\": \"Score how close the reference answer is to the model answer on a 0-1 scale. Return only the score.\\n\\nReference answer: {{item.reference_answer}}\\n\\nModel answer: {{sample.output_text}}\"\n }\n ]\n }\n ],\n \"model\": \"gpt-5-mini\",\n \"sampling_params\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"seed\": 42\n }\n },\n \"item\": {\n \"reference_answer\": \"fuzzy wuzzy was a bear\"\n },\n \"model_sample\": \"fuzzy wuzzy was a bear\"\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.fine_tuning.alpha.graders.run(\n grader={\n \"input\": \"input\",\n \"name\": \"name\",\n \"operation\": \"eq\",\n \"reference\": \"reference\",\n \"type\": \"string_check\",\n },\n model_sample=\"model_sample\",\n)\nprint(response.metadata)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst result = await openai.fineTuning.alpha.graders.run({\n grader: {\n type: \"score_model\",\n name: \"Example score model grader\",\n input: [\n {\n role: \"user\",\n content: [\n {\n type: \"input_text\",\n text: \"Score how close the reference answer is to the model answer on a 0-1 scale. Return only the score.\\n\\nReference answer: {{item.reference_answer}}\\n\\nModel answer: {{sample.output_text}}\",\n },\n ],\n },\n ],\n model: \"gpt-5-mini\",\n sampling_params: { temperature: 1, top_p: 1, seed: 42 },\n },\n item: { reference_answer: \"fuzzy wuzzy was a bear\" },\n model_sample: \"fuzzy wuzzy was a bear\",\n});\nconsole.log(result);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.fineTuning.alpha.graders.run({\n grader: {\n input: 'input',\n name: 'name',\n operation: 'eq',\n reference: 'reference',\n type: 'string_check',\n },\n model_sample: 'model_sample',\n});\n\nconsole.log(response.metadata);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.FineTuning.Alpha.Graders.Run(context.TODO(), openai.FineTuningAlphaGraderRunParams{\n\t\tGrader: openai.FineTuningAlphaGraderRunParamsGraderUnion{\n\t\t\tOfStringCheck: &openai.StringCheckGraderParam{\n\t\t\t\tInput: \"input\",\n\t\t\t\tName: \"name\",\n\t\t\t\tOperation: openai.StringCheckGraderOperationEq,\n\t\t\t\tReference: \"reference\",\n\t\t\t},\n\t\t},\n\t\tModelSample: \"model_sample\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Metadata)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.alpha.graders.GraderRunParams;\nimport com.openai.models.finetuning.alpha.graders.GraderRunResponse;\nimport com.openai.models.graders.gradermodels.StringCheckGrader;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GraderRunParams params = GraderRunParams.builder()\n .grader(StringCheckGrader.builder()\n .input(\"input\")\n .name(\"name\")\n .operation(StringCheckGrader.Operation.EQ)\n .reference(\"reference\")\n .build())\n .modelSample(\"model_sample\")\n .build();\n GraderRunResponse response = client.fineTuning().alpha().graders().run(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.fine_tuning.alpha.graders.run(\n grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check},\n model_sample: \"model_sample\"\n)\n\nputs(response)" + }, + "response": "{\n \"reward\": 1.0,\n \"metadata\": {\n \"name\": \"Example score model grader\",\n \"type\": \"score_model\",\n \"errors\": {\n \"formula_parse_error\": false,\n \"sample_parse_error\": false,\n \"truncated_observation_error\": false,\n \"unresponsive_reward_error\": false,\n \"invalid_variable_error\": false,\n \"other_error\": false,\n \"python_grader_server_error\": false,\n \"python_grader_server_error_type\": null,\n \"python_grader_runtime_error\": false,\n \"python_grader_runtime_error_details\": null,\n \"model_grader_server_error\": false,\n \"model_grader_refusal_error\": false,\n \"model_grader_parse_error\": false,\n \"model_grader_server_error_details\": null\n },\n \"execution_time\": 4.365238428115845,\n \"scores\": {},\n \"token_usage\": {\n \"prompt_tokens\": 190,\n \"total_tokens\": 324,\n \"completion_tokens\": 134,\n \"cached_tokens\": 0\n },\n \"sampled_model_name\": \"gpt-4o-2024-08-06\"\n },\n \"sub_rewards\": {},\n \"model_grader_token_usage_per_model\": {\n \"gpt-4o-2024-08-06\": {\n \"prompt_tokens\": 190,\n \"total_tokens\": 324,\n \"completion_tokens\": 134,\n \"cached_tokens\": 0\n }\n }\n}\n" + }, + { + "title": "Score an image caption", + "request": { + "curl": "curl -X POST https://api.openai.com/v1/fine_tuning/alpha/graders/run \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"grader\": {\n \"type\": \"score_model\",\n \"name\": \"Image caption grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"input_text\",\n \"text\": \"Score how well the provided caption matches the image on a 0-1 scale. Only return the score.\\n\\nCaption: {{sample.output_text}}\"\n },\n {\n \"type\": \"input_image\",\n \"image_url\": \"https://example.com/dog-catching-ball.png\",\n \"file_id\": null,\n \"detail\": \"high\"\n }\n ]\n }\n ],\n \"model\": \"gpt-5-mini\",\n \"sampling_params\": {\n \"temperature\": 0.2\n }\n },\n \"item\": {\n \"expected_caption\": \"A golden retriever jumps to catch a tennis ball\"\n },\n \"model_sample\": \"A dog leaps to grab a tennis ball mid-air\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.fineTuning.alpha.graders.run({\n grader: {\n input: 'input',\n name: 'name',\n operation: 'eq',\n reference: 'reference',\n type: 'string_check',\n },\n model_sample: 'model_sample',\n});\n\nconsole.log(response.metadata);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.fine_tuning.alpha.graders.run(\n grader={\n \"input\": \"input\",\n \"name\": \"name\",\n \"operation\": \"eq\",\n \"reference\": \"reference\",\n \"type\": \"string_check\",\n },\n model_sample=\"model_sample\",\n)\nprint(response.metadata)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.FineTuning.Alpha.Graders.Run(context.TODO(), openai.FineTuningAlphaGraderRunParams{\n\t\tGrader: openai.FineTuningAlphaGraderRunParamsGraderUnion{\n\t\t\tOfStringCheck: &openai.StringCheckGraderParam{\n\t\t\t\tInput: \"input\",\n\t\t\t\tName: \"name\",\n\t\t\t\tOperation: openai.StringCheckGraderOperationEq,\n\t\t\t\tReference: \"reference\",\n\t\t\t},\n\t\t},\n\t\tModelSample: \"model_sample\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Metadata)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.alpha.graders.GraderRunParams;\nimport com.openai.models.finetuning.alpha.graders.GraderRunResponse;\nimport com.openai.models.graders.gradermodels.StringCheckGrader;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GraderRunParams params = GraderRunParams.builder()\n .grader(StringCheckGrader.builder()\n .input(\"input\")\n .name(\"name\")\n .operation(StringCheckGrader.Operation.EQ)\n .reference(\"reference\")\n .build())\n .modelSample(\"model_sample\")\n .build();\n GraderRunResponse response = client.fineTuning().alpha().graders().run(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.fine_tuning.alpha.graders.run(\n grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check},\n model_sample: \"model_sample\"\n)\n\nputs(response)" + } + }, + { + "title": "Score an audio response", + "request": { + "curl": "curl -X POST https://api.openai.com/v1/fine_tuning/alpha/graders/run \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"grader\": {\n \"type\": \"score_model\",\n \"name\": \"Audio clarity grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"input_text\",\n \"text\": \"Listen to the clip and return a confidence score from 0 to 1 that the speaker said: {{item.target_phrase}}\"\n },\n {\n \"type\": \"input_audio\",\n \"input_audio\": {\n \"data\": \"{{item.audio_clip_b64}}\",\n \"format\": \"mp3\"\n }\n }\n ]\n }\n ],\n \"model\": \"gpt-audio\",\n \"sampling_params\": {\n \"temperature\": 0.2,\n \"top_p\": 1,\n \"seed\": 123\n }\n },\n \"item\": {\n \"target_phrase\": \"Please deliver the package on Tuesday\",\n \"audio_clip_b64\": \"\"\n },\n \"model_sample\": \"Please deliver the package on Tuesday\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.fineTuning.alpha.graders.run({\n grader: {\n input: 'input',\n name: 'name',\n operation: 'eq',\n reference: 'reference',\n type: 'string_check',\n },\n model_sample: 'model_sample',\n});\n\nconsole.log(response.metadata);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.fine_tuning.alpha.graders.run(\n grader={\n \"input\": \"input\",\n \"name\": \"name\",\n \"operation\": \"eq\",\n \"reference\": \"reference\",\n \"type\": \"string_check\",\n },\n model_sample=\"model_sample\",\n)\nprint(response.metadata)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.FineTuning.Alpha.Graders.Run(context.TODO(), openai.FineTuningAlphaGraderRunParams{\n\t\tGrader: openai.FineTuningAlphaGraderRunParamsGraderUnion{\n\t\t\tOfStringCheck: &openai.StringCheckGraderParam{\n\t\t\t\tInput: \"input\",\n\t\t\t\tName: \"name\",\n\t\t\t\tOperation: openai.StringCheckGraderOperationEq,\n\t\t\t\tReference: \"reference\",\n\t\t\t},\n\t\t},\n\t\tModelSample: \"model_sample\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Metadata)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.alpha.graders.GraderRunParams;\nimport com.openai.models.finetuning.alpha.graders.GraderRunResponse;\nimport com.openai.models.graders.gradermodels.StringCheckGrader;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GraderRunParams params = GraderRunParams.builder()\n .grader(StringCheckGrader.builder()\n .input(\"input\")\n .name(\"name\")\n .operation(StringCheckGrader.Operation.EQ)\n .reference(\"reference\")\n .build())\n .modelSample(\"model_sample\")\n .build();\n GraderRunResponse response = client.fineTuning().alpha().graders().run(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.fine_tuning.alpha.graders.run(\n grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check},\n model_sample: \"model_sample\"\n)\n\nputs(response)" + } + } + ] + } + } + }, + "/fine_tuning/alpha/graders/validate": { + "post": { + "operationId": "validateGrader", + "tags": [ + "Fine-tuning" + ], + "summary": "Validate a grader.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateGraderRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateGraderResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Validate grader", + "beta": true, + "group": "graders", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/alpha/graders/validate \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"grader\": {\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n }\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.fineTuning.alpha.graders.validate({\n grader: {\n input: 'input',\n name: 'name',\n operation: 'eq',\n reference: 'reference',\n type: 'string_check',\n },\n});\n\nconsole.log(response.grader);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.fine_tuning.alpha.graders.validate(\n grader={\n \"input\": \"input\",\n \"name\": \"name\",\n \"operation\": \"eq\",\n \"reference\": \"reference\",\n \"type\": \"string_check\",\n },\n)\nprint(response.grader)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.FineTuning.Alpha.Graders.Validate(context.TODO(), openai.FineTuningAlphaGraderValidateParams{\n\t\tGrader: openai.FineTuningAlphaGraderValidateParamsGraderUnion{\n\t\t\tOfStringCheckGrader: &openai.StringCheckGraderParam{\n\t\t\t\tInput: \"input\",\n\t\t\t\tName: \"name\",\n\t\t\t\tOperation: openai.StringCheckGraderOperationEq,\n\t\t\t\tReference: \"reference\",\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Grader)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.alpha.graders.GraderValidateParams;\nimport com.openai.models.finetuning.alpha.graders.GraderValidateResponse;\nimport com.openai.models.graders.gradermodels.StringCheckGrader;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GraderValidateParams params = GraderValidateParams.builder()\n .grader(StringCheckGrader.builder()\n .input(\"input\")\n .name(\"name\")\n .operation(StringCheckGrader.Operation.EQ)\n .reference(\"reference\")\n .build())\n .build();\n GraderValidateResponse response = client.fineTuning().alpha().graders().validate(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.fine_tuning.alpha.graders.validate(\n grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check}\n)\n\nputs(response)" + }, + "response": "{\n \"grader\": {\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n }\n}\n" + } + } + } + }, + "/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions": { + "get": { + "operationId": "listFineTuningCheckpointPermissions", + "tags": [ + "Fine-tuning" + ], + "summary": "**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).\n\nOrganization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.\n", + "parameters": [ + { + "in": "path", + "name": "fine_tuned_model_checkpoint", + "required": true, + "schema": { + "type": "string", + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F" + }, + "description": "The ID of the fine-tuned model checkpoint to get permissions for.\n" + }, + { + "name": "project_id", + "in": "query", + "description": "The ID of the project to get permissions for.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "in": "query", + "description": "Identifier for the last permission ID from the previous pagination request.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of permissions to retrieve.", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "order", + "in": "query", + "description": "The order in which to retrieve permissions.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ascending", + "descending" + ], + "default": "descending" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFineTuningCheckpointPermissionResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List checkpoint permissions", + "group": "fine-tuning", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst permission = await client.fineTuning.checkpoints.permissions.retrieve(\n 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',\n);\n\nconsole.log(permission.first_id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npermission = client.fine_tuning.checkpoints.permissions.retrieve(\n fine_tuned_model_checkpoint=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(permission.first_id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpermission, err := client.FineTuning.Checkpoints.Permissions.Get(\n\t\tcontext.TODO(),\n\t\t\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n\t\topenai.FineTuningCheckpointPermissionGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", permission.FirstID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionRetrieveParams;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n PermissionRetrieveResponse permission = client.fineTuning().checkpoints().permissions().retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npermission = openai.fine_tuning.checkpoints.permissions.retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(permission)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"checkpoint.permission\",\n \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"created_at\": 1721764867,\n \"project_id\": \"proj_abGMw1llN8IrBb6SvvY5A1iH\"\n },\n {\n \"object\": \"checkpoint.permission\",\n \"id\": \"cp_enQCFmOTGj3syEpYVhBRLTSy\",\n \"created_at\": 1721764800,\n \"project_id\": \"proj_iqGMw1llN8IrBb6SvvY5A1oF\"\n },\n ],\n \"first_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"last_id\": \"cp_enQCFmOTGj3syEpYVhBRLTSy\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "operationId": "createFineTuningCheckpointPermission", + "tags": [ + "Fine-tuning" + ], + "summary": "**NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).\n\nThis enables organization owners to share fine-tuned models with other projects in their organization.\n", + "parameters": [ + { + "in": "path", + "name": "fine_tuned_model_checkpoint", + "required": true, + "schema": { + "type": "string", + "example": "ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd" + }, + "description": "The ID of the fine-tuned model checkpoint to create a permission for.\n" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFineTuningCheckpointPermissionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFineTuningCheckpointPermissionResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create checkpoint permissions", + "group": "fine-tuning", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n -d '{\"project_ids\": [\"proj_abGMw1llN8IrBb6SvvY5A1iH\"]}'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create(\n 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',\n { project_ids: ['string'] },\n)) {\n console.log(permissionCreateResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.fine_tuning.checkpoints.permissions.create(\n fine_tuned_model_checkpoint=\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n project_ids=[\"string\"],\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.FineTuning.Checkpoints.Permissions.New(\n\t\tcontext.TODO(),\n\t\t\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n\t\topenai.FineTuningCheckpointPermissionNewParams{\n\t\t\tProjectIDs: []string{\"string\"},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionCreatePage;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n PermissionCreateParams params = PermissionCreateParams.builder()\n .fineTunedModelCheckpoint(\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\")\n .addProjectId(\"string\")\n .build();\n PermissionCreatePage page = client.fineTuning().checkpoints().permissions().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.fine_tuning.checkpoints.permissions.create(\n \"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n project_ids: [\"string\"]\n)\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"checkpoint.permission\",\n \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"created_at\": 1721764867,\n \"project_id\": \"proj_abGMw1llN8IrBb6SvvY5A1iH\"\n }\n ],\n \"first_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"last_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"has_more\": false\n}\n" + } + } + } + }, + "/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}": { + "delete": { + "operationId": "deleteFineTuningCheckpointPermission", + "tags": [ + "Fine-tuning" + ], + "summary": "**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).\n\nOrganization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint.\n", + "parameters": [ + { + "in": "path", + "name": "fine_tuned_model_checkpoint", + "required": true, + "schema": { + "type": "string", + "example": "ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd" + }, + "description": "The ID of the fine-tuned model checkpoint to delete a permission for.\n" + }, + { + "in": "path", + "name": "permission_id", + "required": true, + "schema": { + "type": "string", + "example": "cp_zc4Q7MP6XxulcVzj4MZdwsAB" + }, + "description": "The ID of the fine-tuned model checkpoint permission to delete.\n" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteFineTuningCheckpointPermissionResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete checkpoint permission", + "group": "fine-tuning", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions/cp_zc4Q7MP6XxulcVzj4MZdwsAB \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst permission = await client.fineTuning.checkpoints.permissions.delete(\n 'cp_zc4Q7MP6XxulcVzj4MZdwsAB',\n { fine_tuned_model_checkpoint: 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd' },\n);\n\nconsole.log(permission.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npermission = client.fine_tuning.checkpoints.permissions.delete(\n permission_id=\"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n fine_tuned_model_checkpoint=\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n)\nprint(permission.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpermission, err := client.FineTuning.Checkpoints.Permissions.Delete(\n\t\tcontext.TODO(),\n\t\t\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n\t\t\"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", permission.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionDeleteParams;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n PermissionDeleteParams params = PermissionDeleteParams.builder()\n .fineTunedModelCheckpoint(\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\")\n .permissionId(\"cp_zc4Q7MP6XxulcVzj4MZdwsAB\")\n .build();\n PermissionDeleteResponse permission = client.fineTuning().checkpoints().permissions().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npermission = openai.fine_tuning.checkpoints.permissions.delete(\n \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n fine_tuned_model_checkpoint: \"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\"\n)\n\nputs(permission)" + }, + "response": "{\n \"object\": \"checkpoint.permission\",\n \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/fine_tuning/jobs": { + "post": { + "operationId": "createFineTuningJob", + "tags": [ + "Fine-tuning" + ], + "summary": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/model-optimization)\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFineTuningJobRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTuningJob" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create fine-tuning job", + "group": "fine-tuning", + "examples": [ + { + "title": "Default", + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n \"model\": \"gpt-4o-mini\"\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.create({\n training_file: \"file-abc123\"\n });\n\n console.log(fineTune);\n}\n\nmain();\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\",\n }\n }\n },\n \"metadata\": null\n}\n" + }, + { + "title": "Epochs", + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\",\n \"model\": \"gpt-4o-mini\",\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"n_epochs\": 2\n }\n }\n }\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)", + "javascript": "import OpenAI from \"openai\";\nimport { SupervisedMethod, SupervisedHyperparameters } from \"openai/resources/fine-tuning/methods\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.create({\n training_file: \"file-abc123\",\n model: \"gpt-4o-mini\",\n method: {\n type: \"supervised\",\n supervised: {\n hyperparameters: {\n n_epochs: 2\n }\n }\n }\n });\n\n console.log(fineTune);\n}\n\nmain();\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": 2\n },\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": 2\n }\n }\n },\n \"metadata\": null,\n \"error\": {\n \"code\": null,\n \"message\": null,\n \"param\": null\n },\n \"finished_at\": null,\n \"seed\": 683058546,\n \"trained_tokens\": null,\n \"estimated_finish\": null,\n \"integrations\": [],\n \"user_provided_suffix\": null,\n \"usage_metrics\": null,\n \"shared_with_openai\": false\n}\n" + }, + { + "title": "DPO", + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\",\n \"validation_file\": \"file-abc123\",\n \"model\": \"gpt-4o-mini\",\n \"method\": {\n \"type\": \"dpo\",\n \"dpo\": {\n \"hyperparameters\": {\n \"beta\": 0.1\n }\n }\n }\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc\",\n \"model\": \"gpt-4o-mini\",\n \"created_at\": 1746130590,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-abc\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": \"file-123\",\n \"training_file\": \"file-abc\",\n \"method\": {\n \"type\": \"dpo\",\n \"dpo\": {\n \"hyperparameters\": {\n \"beta\": 0.1,\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\"\n }\n }\n },\n \"metadata\": null,\n \"error\": {\n \"code\": null,\n \"message\": null,\n \"param\": null\n },\n \"finished_at\": null,\n \"hyperparameters\": null,\n \"seed\": 1036326793,\n \"estimated_finish\": null,\n \"integrations\": [],\n \"user_provided_suffix\": null,\n \"usage_metrics\": null,\n \"shared_with_openai\": false\n}\n" + }, + { + "title": "Reinforcement", + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc\",\n \"validation_file\": \"file-123\",\n \"model\": \"o4-mini\",\n \"method\": {\n \"type\": \"reinforcement\",\n \"reinforcement\": {\n \"grader\": {\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n },\n \"hyperparameters\": {\n \"reasoning_effort\": \"medium\"\n }\n }\n }\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"o4-mini\",\n \"created_at\": 1721764800,\n \"finished_at\": null,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"validating_files\",\n \"validation_file\": \"file-123\",\n \"training_file\": \"file-abc\",\n \"trained_tokens\": null,\n \"error\": {},\n \"user_provided_suffix\": null,\n \"seed\": 950189191,\n \"estimated_finish\": null,\n \"integrations\": [],\n \"method\": {\n \"type\": \"reinforcement\",\n \"reinforcement\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\",\n \"eval_interval\": \"auto\",\n \"eval_samples\": \"auto\",\n \"compute_multiplier\": \"auto\",\n \"reasoning_effort\": \"medium\"\n },\n \"grader\": {\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n },\n \"response_format\": null\n }\n },\n \"metadata\": null,\n \"usage_metrics\": null,\n \"shared_with_openai\": false\n}\n \n" + }, + { + "title": "Validation file", + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\",\n \"validation_file\": \"file-abc123\",\n \"model\": \"gpt-4o-mini\"\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.create({\n training_file: \"file-abc123\",\n validation_file: \"file-abc123\"\n });\n\n console.log(fineTune);\n}\n\nmain();\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\",\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\",\n }\n }\n },\n \"metadata\": null\n}\n" + }, + { + "title": "W&B Integration", + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\",\n \"validation_file\": \"file-abc123\",\n \"model\": \"gpt-4o-mini\",\n \"integrations\": [\n {\n \"type\": \"wandb\",\n \"wandb\": {\n \"project\": \"my-wandb-project\",\n \"name\": \"ft-run-display-name\"\n \"tags\": [\n \"first-experiment\", \"v2\"\n ]\n }\n }\n ]\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\",\n \"integrations\": [\n {\n \"type\": \"wandb\",\n \"wandb\": {\n \"project\": \"my-wandb-project\",\n \"entity\": None,\n \"run_id\": \"ftjob-abc123\"\n }\n }\n ],\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\",\n }\n }\n },\n \"metadata\": null\n}\n" + } + ] + } + }, + "get": { + "operationId": "listPaginatedFineTuningJobs", + "tags": [ + "Fine-tuning" + ], + "summary": "List your organization's fine-tuning jobs\n", + "parameters": [ + { + "name": "after", + "in": "query", + "description": "Identifier for the last job from the previous pagination request.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of fine-tuning jobs to retrieve.", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "type": "object", + "nullable": true, + "additionalProperties": { + "type": "string" + } + }, + "style": "deepObject", + "explode": true, + "description": "Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Alternatively, set `metadata=null` to indicate no metadata.\n" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListPaginatedFineTuningJobsResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List fine-tuning jobs", + "group": "fine-tuning", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs?limit=2&metadata[key]=value \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.fine_tuning.jobs.list()\npage = page.data[0]\nprint(page.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.fineTuning.jobs.list();\n\n for await (const fineTune of list) {\n console.log(fineTune);\n }\n}\n\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fineTuningJob of client.fineTuning.jobs.list()) {\n console.log(fineTuningJob.id);\n}", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.FineTuning.Jobs.List(context.TODO(), openai.FineTuningJobListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.JobListPage;\nimport com.openai.models.finetuning.jobs.JobListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobListPage page = client.fineTuning().jobs().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.fine_tuning.jobs.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"metadata\": {\n \"key\": \"value\"\n }\n },\n { ... },\n { ... }\n ], \"has_more\": true\n}\n" + } + } + } + }, + "/fine_tuning/jobs/{fine_tuning_job_id}": { + "get": { + "operationId": "retrieveFineTuningJob", + "tags": [ + "Fine-tuning" + ], + "summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/model-optimization)\n", + "parameters": [ + { + "in": "path", + "name": "fine_tuning_job_id", + "required": true, + "schema": { + "type": "string", + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F" + }, + "description": "The ID of the fine-tuning job.\n" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTuningJob" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve fine-tuning job", + "group": "fine-tuning", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs/ft-AF1WoRqd3aJAHsqc9NY7iL8F \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.retrieve(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.retrieve(\"ftjob-abc123\");\n\n console.log(fineTune);\n}\n\nmain();\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.retrieve('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.Get(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FineTuningJob fineTuningJob = client.fineTuning().jobs().retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(fine_tuning_job)" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"davinci-002\",\n \"created_at\": 1692661014,\n \"finished_at\": 1692661190,\n \"fine_tuned_model\": \"ft:davinci-002:my-org:custom_suffix:7q8mpxmy\",\n \"organization_id\": \"org-123\",\n \"result_files\": [\n \"file-abc123\"\n ],\n \"status\": \"succeeded\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"hyperparameters\": {\n \"n_epochs\": 4,\n \"batch_size\": 1,\n \"learning_rate_multiplier\": 1.0\n },\n \"trained_tokens\": 5768,\n \"integrations\": [],\n \"seed\": 0,\n \"estimated_finish\": 0,\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"n_epochs\": 4,\n \"batch_size\": 1,\n \"learning_rate_multiplier\": 1.0\n }\n }\n }\n}\n" + } + } + } + }, + "/fine_tuning/jobs/{fine_tuning_job_id}/cancel": { + "post": { + "operationId": "cancelFineTuningJob", + "tags": [ + "Fine-tuning" + ], + "summary": "Immediately cancel a fine-tune job.\n", + "parameters": [ + { + "in": "path", + "name": "fine_tuning_job_id", + "required": true, + "schema": { + "type": "string", + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F" + }, + "description": "The ID of the fine-tuning job to cancel.\n" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTuningJob" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Cancel fine-tuning", + "group": "fine-tuning", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/cancel \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.cancel(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.cancel(\"ftjob-abc123\");\n\n console.log(fineTune);\n}\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.cancel('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.Cancel(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCancelParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FineTuningJob fineTuningJob = client.fineTuning().jobs().cancel(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.cancel(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(fine_tuning_job)" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"cancelled\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\"\n}\n" + } + } + } + }, + "/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints": { + "get": { + "operationId": "listFineTuningJobCheckpoints", + "tags": [ + "Fine-tuning" + ], + "summary": "List checkpoints for a fine-tuning job.\n", + "parameters": [ + { + "in": "path", + "name": "fine_tuning_job_id", + "required": true, + "schema": { + "type": "string", + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F" + }, + "description": "The ID of the fine-tuning job to get checkpoints for.\n" + }, + { + "name": "after", + "in": "query", + "description": "Identifier for the last checkpoint ID from the previous pagination request.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of checkpoints to retrieve.", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFineTuningJobCheckpointsResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List fine-tuning checkpoints", + "group": "fine-tuning", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/checkpoints \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fineTuningJobCheckpoint of client.fineTuning.jobs.checkpoints.list(\n 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',\n)) {\n console.log(fineTuningJobCheckpoint.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.fine_tuning.jobs.checkpoints.list(\n fine_tuning_job_id=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.FineTuning.Jobs.Checkpoints.List(\n\t\tcontext.TODO(),\n\t\t\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n\t\topenai.FineTuningJobCheckpointListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.checkpoints.CheckpointListPage;\nimport com.openai.models.finetuning.jobs.checkpoints.CheckpointListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CheckpointListPage page = client.fineTuning().jobs().checkpoints().list(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.fine_tuning.jobs.checkpoints.list(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"fine_tuning.job.checkpoint\",\n \"id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"created_at\": 1721764867,\n \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:96olL566:ckpt-step-2000\",\n \"metrics\": {\n \"full_valid_loss\": 0.134,\n \"full_valid_mean_token_accuracy\": 0.874\n },\n \"fine_tuning_job_id\": \"ftjob-abc123\",\n \"step_number\": 2000\n },\n {\n \"object\": \"fine_tuning.job.checkpoint\",\n \"id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\",\n \"created_at\": 1721764800,\n \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:7q8mpxmy:ckpt-step-1000\",\n \"metrics\": {\n \"full_valid_loss\": 0.167,\n \"full_valid_mean_token_accuracy\": 0.781\n },\n \"fine_tuning_job_id\": \"ftjob-abc123\",\n \"step_number\": 1000\n }\n ],\n \"first_id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"last_id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\",\n \"has_more\": true\n}\n" + } + } + } + }, + "/fine_tuning/jobs/{fine_tuning_job_id}/events": { + "get": { + "operationId": "listFineTuningEvents", + "tags": [ + "Fine-tuning" + ], + "summary": "Get status updates for a fine-tuning job.\n", + "parameters": [ + { + "in": "path", + "name": "fine_tuning_job_id", + "required": true, + "schema": { + "type": "string", + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F" + }, + "description": "The ID of the fine-tuning job to get events for.\n" + }, + { + "name": "after", + "in": "query", + "description": "Identifier for the last event from the previous pagination request.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of events to retrieve.", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFineTuningJobEventsResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List fine-tuning events", + "group": "fine-tuning", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/events \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.fine_tuning.jobs.list_events(\n fine_tuning_job_id=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\npage = page.data[0]\nprint(page.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.fineTuning.list_events(id=\"ftjob-abc123\", limit=2);\n\n for await (const fineTune of list) {\n console.log(fineTune);\n }\n}\n\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fineTuningJobEvent of client.fineTuning.jobs.listEvents(\n 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',\n)) {\n console.log(fineTuningJobEvent.id);\n}", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.FineTuning.Jobs.ListEvents(\n\t\tcontext.TODO(),\n\t\t\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n\t\topenai.FineTuningJobListEventsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.JobListEventsPage;\nimport com.openai.models.finetuning.jobs.JobListEventsParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobListEventsPage page = client.fineTuning().jobs().listEvents(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.fine_tuning.jobs.list_events(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"fine_tuning.job.event\",\n \"id\": \"ft-event-ddTJfwuMVpfLXseO0Am0Gqjm\",\n \"created_at\": 1721764800,\n \"level\": \"info\",\n \"message\": \"Fine tuning job successfully completed\",\n \"data\": null,\n \"type\": \"message\"\n },\n {\n \"object\": \"fine_tuning.job.event\",\n \"id\": \"ft-event-tyiGuB72evQncpH87xe505Sv\",\n \"created_at\": 1721764800,\n \"level\": \"info\",\n \"message\": \"New fine-tuned model created: ft:gpt-4o-mini:openai::7p4lURel\",\n \"data\": null,\n \"type\": \"message\"\n }\n ],\n \"has_more\": true\n}\n" + } + } + } + }, + "/fine_tuning/jobs/{fine_tuning_job_id}/pause": { + "post": { + "operationId": "pauseFineTuningJob", + "tags": [ + "Fine-tuning" + ], + "summary": "Pause a fine-tune job.\n", + "parameters": [ + { + "in": "path", + "name": "fine_tuning_job_id", + "required": true, + "schema": { + "type": "string", + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F" + }, + "description": "The ID of the fine-tuning job to pause.\n" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTuningJob" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Pause fine-tuning", + "group": "fine-tuning", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/pause \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.pause(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.pause(\"ftjob-abc123\");\n\n console.log(fineTune);\n}\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.pause('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.Pause(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobPauseParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FineTuningJob fineTuningJob = client.fineTuning().jobs().pause(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.pause(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(fine_tuning_job)" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"paused\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\"\n}\n" + } + } + } + }, + "/fine_tuning/jobs/{fine_tuning_job_id}/resume": { + "post": { + "operationId": "resumeFineTuningJob", + "tags": [ + "Fine-tuning" + ], + "summary": "Resume a fine-tune job.\n", + "parameters": [ + { + "in": "path", + "name": "fine_tuning_job_id", + "required": true, + "schema": { + "type": "string", + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F" + }, + "description": "The ID of the fine-tuning job to resume.\n" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTuningJob" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Resume fine-tuning", + "group": "fine-tuning", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/resume \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.resume(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.resume(\"ftjob-abc123\");\n\n console.log(fineTune);\n}\nmain();", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.resume('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.Resume(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobResumeParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FineTuningJob fineTuningJob = client.fineTuning().jobs().resume(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.resume(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(fine_tuning_job)" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\"\n}\n" + } + } + } + }, + "/images/edits": { + "post": { + "operationId": "createImageEdit", + "tags": [ + "Images" + ], + "summary": "Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.", + "description": "You can call this endpoint with either:\n\n- `multipart/form-data`: use binary uploads via `image` (and optional `mask`).\n- `application/json`: use `images` (and optional `mask`) as references with either `image_url` or `file_id`.\n\nNote that JSON requests use `images` (array) instead of the multipart `image` field.\n", + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateImageEditRequest" + }, + "examples": { + "multipart_edit": { + "summary": "Multipart form upload (binary image + prompt)", + "value": { + "model": "gpt-image-1.5", + "prompt": "Add a watercolor effect to this image", + "image": "", + "size": "1024x1024", + "quality": "high" + } + } + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditImageBodyJsonParam" + }, + "examples": { + "json_with_url": { + "summary": "JSON request with image URL", + "value": { + "model": "gpt-image-1.5", + "prompt": "Add a watercolor effect to this image", + "images": [ + { + "image_url": "https://example.com/source-image.png" + } + ], + "size": "1024x1024", + "quality": "high" + } + }, + "json_with_file_id": { + "summary": "JSON request with uploaded file id", + "value": { + "model": "gpt-image-1.5", + "prompt": "Replace the background with a snowy mountain scene", + "images": [ + { + "file_id": "file-abc123" + } + ], + "mask": { + "file_id": "file-mask123" + }, + "output_format": "png", + "output_compression": 100 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImagesResponse" + } + }, + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/ImageEditStreamEvent" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create image edit", + "group": "images", + "examples": [ + { + "title": "Edit image", + "request": { + "curl": "curl -s -D >(grep -i x-request-id >&2) \\\n -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) \\\n -X POST \"https://api.openai.com/v1/images/edits\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"model=gpt-image-1.5\" \\\n -F \"image[]=@body-lotion.png\" \\\n -F \"image[]=@bath-bomb.png\" \\\n -F \"image[]=@incense-kit.png\" \\\n -F \"image[]=@soap.png\" \\\n -F 'prompt=Create a lovely gift basket with these four items in it'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor image in client.images.edit(\n image=b\"Example data\",\n prompt=\"A cute baby sea otter wearing a beret\",\n):\n print(image)", + "javascript": "import fs from \"fs\";\nimport OpenAI, { toFile } from \"openai\";\n\nconst client = new OpenAI();\n\nconst imageFiles = [\n \"bath-bomb.png\",\n \"body-lotion.png\",\n \"incense-kit.png\",\n \"soap.png\",\n];\n\nconst images = await Promise.all(\n imageFiles.map(async (file) =>\n await toFile(fs.createReadStream(file), null, {\n type: \"image/png\",\n })\n ),\n);\n\nconst rsp = await client.images.edit({\n model: \"gpt-image-1.5\",\n image: images,\n prompt: \"Create a lovely gift basket with these four items in it\",\n});\n\n// Save the image to a file\nconst image_base64 = rsp.data[0].b64_json;\nconst image_bytes = Buffer.from(image_base64, \"base64\");\nfs.writeFileSync(\"basket.png\", image_bytes);\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst imagesResponse = await client.images.edit({\n image: fs.createReadStream('path/to/file'),\n prompt: 'A cute baby sea otter wearing a beret',\n});\n\nconsole.log(imagesResponse);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\timagesResponse, err := client.Images.Edit(context.TODO(), openai.ImageEditParams{\n\t\tImage: openai.ImageEditParamsImageUnion{\n\t\t\tOfFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\t},\n\t\tPrompt: \"A cute baby sea otter wearing a beret\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", imagesResponse)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageEditParams;\nimport com.openai.models.images.ImagesResponse;\nimport java.io.ByteArrayInputStream;\nimport java.io.InputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageEditParams params = ImageEditParams.builder()\n .image(new ByteArrayInputStream(\"Example data\".getBytes()))\n .prompt(\"A cute baby sea otter wearing a beret\")\n .build();\n ImagesResponse imagesResponse = client.images().edit(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.edit(image: StringIO.new(\"Example data\"), prompt: \"A cute baby sea otter wearing a beret\")\n\nputs(images_response)" + } + }, + { + "title": "Streaming", + "request": { + "curl": "curl -s -N -X POST \"https://api.openai.com/v1/images/edits\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"model=gpt-image-1.5\" \\\n -F \"image[]=@body-lotion.png\" \\\n -F \"image[]=@bath-bomb.png\" \\\n -F \"image[]=@incense-kit.png\" \\\n -F \"image[]=@soap.png\" \\\n -F 'prompt=Create a lovely gift basket with these four items in it' \\\n -F \"stream=true\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor image in client.images.edit(\n image=b\"Example data\",\n prompt=\"A cute baby sea otter wearing a beret\",\n):\n print(image)", + "javascript": "import fs from \"fs\";\nimport OpenAI, { toFile } from \"openai\";\n\nconst client = new OpenAI();\n\nconst imageFiles = [\n \"bath-bomb.png\",\n \"body-lotion.png\",\n \"incense-kit.png\",\n \"soap.png\",\n];\n\nconst images = await Promise.all(\n imageFiles.map(async (file) =>\n await toFile(fs.createReadStream(file), null, {\n type: \"image/png\",\n })\n ),\n);\n\nconst stream = await client.images.edit({\n model: \"gpt-image-1.5\",\n image: images,\n prompt: \"Create a lovely gift basket with these four items in it\",\n stream: true,\n});\n\nfor await (const event of stream) {\n console.log(event);\n}\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst imagesResponse = await client.images.edit({\n image: fs.createReadStream('path/to/file'),\n prompt: 'A cute baby sea otter wearing a beret',\n});\n\nconsole.log(imagesResponse);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\timagesResponse, err := client.Images.Edit(context.TODO(), openai.ImageEditParams{\n\t\tImage: openai.ImageEditParamsImageUnion{\n\t\t\tOfFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\t},\n\t\tPrompt: \"A cute baby sea otter wearing a beret\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", imagesResponse)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageEditParams;\nimport com.openai.models.images.ImagesResponse;\nimport java.io.ByteArrayInputStream;\nimport java.io.InputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageEditParams params = ImageEditParams.builder()\n .image(new ByteArrayInputStream(\"Example data\".getBytes()))\n .prompt(\"A cute baby sea otter wearing a beret\")\n .build();\n ImagesResponse imagesResponse = client.images().edit(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.edit(image: StringIO.new(\"Example data\"), prompt: \"A cute baby sea otter wearing a beret\")\n\nputs(images_response)" + }, + "response": "event: image_edit.partial_image\ndata: {\"type\":\"image_edit.partial_image\",\"b64_json\":\"...\",\"partial_image_index\":0}\n\nevent: image_edit.completed\ndata: {\"type\":\"image_edit.completed\",\"b64_json\":\"...\",\"usage\":{\"total_tokens\":100,\"input_tokens\":50,\"output_tokens\":50,\"input_tokens_details\":{\"text_tokens\":10,\"image_tokens\":40}}}\n" + } + ] + } + } + }, + "/images/generations": { + "post": { + "operationId": "createImage", + "tags": [ + "Images" + ], + "summary": "Creates an image given a prompt. [Learn more](/docs/guides/images).\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateImageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImagesResponse" + } + }, + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/ImageGenStreamEvent" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create image", + "group": "images", + "examples": [ + { + "title": "Generate image", + "request": { + "curl": "curl https://api.openai.com/v1/images/generations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"gpt-image-1.5\",\n \"prompt\": \"A cute baby sea otter\",\n \"n\": 1,\n \"size\": \"1024x1024\"\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor image in client.images.generate(\n prompt=\"A cute baby sea otter\",\n):\n print(image)", + "javascript": "import OpenAI from \"openai\";\nimport { writeFile } from \"fs/promises\";\n\nconst client = new OpenAI();\n\nconst img = await client.images.generate({\n model: \"gpt-image-1.5\",\n prompt: \"A cute baby sea otter\",\n n: 1,\n size: \"1024x1024\"\n});\n\nconst imageBuffer = Buffer.from(img.data[0].b64_json, \"base64\");\nawait writeFile(\"output.png\", imageBuffer);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst imagesResponse = await client.images.generate({ prompt: 'A cute baby sea otter' });\n\nconsole.log(imagesResponse);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\timagesResponse, err := client.Images.Generate(context.TODO(), openai.ImageGenerateParams{\n\t\tPrompt: \"A cute baby sea otter\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", imagesResponse)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageGenerateParams;\nimport com.openai.models.images.ImagesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageGenerateParams params = ImageGenerateParams.builder()\n .prompt(\"A cute baby sea otter\")\n .build();\n ImagesResponse imagesResponse = client.images().generate(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.generate(prompt: \"A cute baby sea otter\")\n\nputs(images_response)" + }, + "response": "{\n \"created\": 1713833628,\n \"data\": [\n {\n \"b64_json\": \"...\"\n }\n ],\n \"usage\": {\n \"total_tokens\": 100,\n \"input_tokens\": 50,\n \"output_tokens\": 50,\n \"input_tokens_details\": {\n \"text_tokens\": 10,\n \"image_tokens\": 40\n }\n }\n}\n" + }, + { + "title": "Streaming", + "request": { + "curl": "curl https://api.openai.com/v1/images/generations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"gpt-image-1.5\",\n \"prompt\": \"A cute baby sea otter\",\n \"n\": 1,\n \"size\": \"1024x1024\",\n \"stream\": true\n }' \\\n --no-buffer\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor image in client.images.generate(\n prompt=\"A cute baby sea otter\",\n):\n print(image)", + "javascript": "import OpenAI from \"openai\";\n\nconst client = new OpenAI();\n\nconst stream = await client.images.generate({\n model: \"gpt-image-1.5\",\n prompt: \"A cute baby sea otter\",\n n: 1,\n size: \"1024x1024\",\n stream: true,\n});\n\nfor await (const event of stream) {\n console.log(event);\n}\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst imagesResponse = await client.images.generate({ prompt: 'A cute baby sea otter' });\n\nconsole.log(imagesResponse);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\timagesResponse, err := client.Images.Generate(context.TODO(), openai.ImageGenerateParams{\n\t\tPrompt: \"A cute baby sea otter\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", imagesResponse)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageGenerateParams;\nimport com.openai.models.images.ImagesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageGenerateParams params = ImageGenerateParams.builder()\n .prompt(\"A cute baby sea otter\")\n .build();\n ImagesResponse imagesResponse = client.images().generate(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.generate(prompt: \"A cute baby sea otter\")\n\nputs(images_response)" + }, + "response": "event: image_generation.partial_image\ndata: {\"type\":\"image_generation.partial_image\",\"b64_json\":\"...\",\"partial_image_index\":0}\n\nevent: image_generation.completed\ndata: {\"type\":\"image_generation.completed\",\"b64_json\":\"...\",\"usage\":{\"total_tokens\":100,\"input_tokens\":50,\"output_tokens\":50,\"input_tokens_details\":{\"text_tokens\":10,\"image_tokens\":40}}}\n" + } + ] + } + } + }, + "/images/variations": { + "post": { + "operationId": "createImageVariation", + "tags": [ + "Images" + ], + "summary": "Creates a variation of a given image. This endpoint only supports `dall-e-2`.", + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateImageVariationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImagesResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create image variation", + "group": "images", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/images/variations \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F image=\"@otter.png\" \\\n -F n=2 \\\n -F size=\"1024x1024\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nimages_response = client.images.create_variation(\n image=b\"Example data\",\n)\nprint(images_response.created)", + "javascript": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const image = await openai.images.createVariation({\n image: fs.createReadStream(\"otter.png\"),\n });\n\n console.log(image.data);\n}\nmain();", + "csharp": "using System;\n\nusing OpenAI.Images;\n\nImageClient client = new(\n model: \"dall-e-2\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nGeneratedImage image = client.GenerateImageVariation(imageFilePath: \"otter.png\");\n\nConsole.WriteLine(image.ImageUri);\n", + "node.js": "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst imagesResponse = await client.images.createVariation({\n image: fs.createReadStream('otter.png'),\n});\n\nconsole.log(imagesResponse.created);", + "go": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\timagesResponse, err := client.Images.NewVariation(context.TODO(), openai.ImageNewVariationParams{\n\t\tImage: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", imagesResponse.Created)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageCreateVariationParams;\nimport com.openai.models.images.ImagesResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageCreateVariationParams params = ImageCreateVariationParams.builder()\n .image(new ByteArrayInputStream(\"Example data\".getBytes()))\n .build();\n ImagesResponse imagesResponse = client.images().createVariation(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.create_variation(image: StringIO.new(\"Example data\"))\n\nputs(images_response)" + }, + "response": "{\n \"created\": 1589478378,\n \"data\": [\n {\n \"url\": \"https://...\"\n },\n {\n \"url\": \"https://...\"\n }\n ]\n}\n" + } + } + } + }, + "/models": { + "get": { + "operationId": "listModels", + "tags": [ + "Models" + ], + "summary": "Lists the currently available models, and provides basic information about each one such as the owner and availability.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListModelsResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List models", + "group": "models", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/models \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.models.list()\npage = page.data[0]\nprint(page.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.models.list();\n\n for await (const model of list) {\n console.log(model);\n }\n}\nmain();", + "csharp": "using System;\n\nusing OpenAI.Models;\n\nOpenAIModelClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nforeach (var model in client.GetModels().Value)\n{\n Console.WriteLine(model.Id);\n}\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const model of client.models.list()) {\n console.log(model.id);\n}", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Models.List(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.models.ModelListPage;\nimport com.openai.models.models.ModelListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ModelListPage page = client.models().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.models.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"model-id-0\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"organization-owner\"\n },\n {\n \"id\": \"model-id-1\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"organization-owner\",\n },\n {\n \"id\": \"model-id-2\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n },\n ]\n}\n" + } + } + } + }, + "/models/{model}": { + "get": { + "operationId": "retrieveModel", + "tags": [ + "Models" + ], + "summary": "Retrieves a model instance, providing basic information about the model such as the owner and permissioning.", + "parameters": [ + { + "in": "path", + "name": "model", + "required": true, + "schema": { + "type": "string", + "example": "gpt-4o-mini" + }, + "description": "The ID of the model to use for this request" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Model" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve model", + "group": "models", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/models/VAR_chat_model_id \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nmodel = client.models.retrieve(\n \"gpt-4o-mini\",\n)\nprint(model.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const model = await openai.models.retrieve(\"VAR_chat_model_id\");\n\n console.log(model);\n}\n\nmain();", + "csharp": "using System;\nusing System.ClientModel;\n\nusing OpenAI.Models;\n\n OpenAIModelClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nClientResult model = client.GetModel(\"babbage-002\");\nConsole.WriteLine(model.Value.Id);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst model = await client.models.retrieve('gpt-4o-mini');\n\nconsole.log(model.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmodel, err := client.Models.Get(context.TODO(), \"gpt-4o-mini\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", model.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.models.Model;\nimport com.openai.models.models.ModelRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Model model = client.models().retrieve(\"gpt-4o-mini\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmodel = openai.models.retrieve(\"gpt-4o-mini\")\n\nputs(model)" + }, + "response": "{\n \"id\": \"VAR_chat_model_id\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n}\n" + } + } + }, + "delete": { + "operationId": "deleteModel", + "tags": [ + "Models" + ], + "summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", + "parameters": [ + { + "in": "path", + "name": "model", + "required": true, + "schema": { + "type": "string", + "example": "ft:gpt-4o-mini:acemeco:suffix:abc123" + }, + "description": "The model to delete" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteModelResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete a fine-tuned model", + "group": "models", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/models/ft:gpt-4o-mini:acemeco:suffix:abc123 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nmodel_deleted = client.models.delete(\n \"ft:gpt-4o-mini:acemeco:suffix:abc123\",\n)\nprint(model_deleted.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const model = await openai.models.delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\n \n console.log(model);\n}\nmain();", + "csharp": "using System;\nusing System.ClientModel;\n\nusing OpenAI.Models;\n\nOpenAIModelClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nClientResult success = client.DeleteModel(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\nConsole.WriteLine(success);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst modelDeleted = await client.models.delete('ft:gpt-4o-mini:acemeco:suffix:abc123');\n\nconsole.log(modelDeleted.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmodelDeleted, err := client.Models.Delete(context.TODO(), \"ft:gpt-4o-mini:acemeco:suffix:abc123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", modelDeleted.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.models.ModelDeleteParams;\nimport com.openai.models.models.ModelDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ModelDeleted modelDeleted = client.models().delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmodel_deleted = openai.models.delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\")\n\nputs(model_deleted)" + }, + "response": "{\n \"id\": \"ft:gpt-4o-mini:acemeco:suffix:abc123\",\n \"object\": \"model\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/moderations": { + "post": { + "operationId": "createModeration", + "tags": [ + "Moderations" + ], + "summary": "Classifies if text and/or image inputs are potentially harmful. Learn\nmore in the [moderation guide](/docs/guides/moderation).\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateModerationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateModerationResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create moderation", + "group": "moderations", + "examples": [ + { + "title": "Single string", + "request": { + "curl": "curl https://api.openai.com/v1/moderations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"input\": \"I want to kill them.\"\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nmoderation = client.moderations.create(\n input=\"I want to kill them.\",\n)\nprint(moderation.id)", + "javascript": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const moderation = await openai.moderations.create({ input: \"I want to kill them.\" });\n\n console.log(moderation);\n}\nmain();\n", + "csharp": "using System;\nusing System.ClientModel;\n\nusing OpenAI.Moderations;\n\nModerationClient client = new(\n model: \"omni-moderation-latest\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nClientResult moderation = client.ClassifyText(\"I want to kill them.\");\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst moderation = await client.moderations.create({ input: 'I want to kill them.' });\n\nconsole.log(moderation.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmoderation, err := client.Moderations.New(context.TODO(), openai.ModerationNewParams{\n\t\tInput: openai.ModerationNewParamsInputUnion{\n\t\t\tOfString: openai.String(\"I want to kill them.\"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", moderation.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.moderations.ModerationCreateParams;\nimport com.openai.models.moderations.ModerationCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ModerationCreateParams params = ModerationCreateParams.builder()\n .input(\"I want to kill them.\")\n .build();\n ModerationCreateResponse moderation = client.moderations().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmoderation = openai.moderations.create(input: \"I want to kill them.\")\n\nputs(moderation)" + }, + "response": "{\n \"id\": \"modr-AB8CjOTu2jiq12hp1AQPfeqFWaORR\",\n \"model\": \"text-moderation-007\",\n \"results\": [\n {\n \"flagged\": true,\n \"categories\": {\n \"sexual\": false,\n \"hate\": false,\n \"harassment\": true,\n \"self-harm\": false,\n \"sexual/minors\": false,\n \"hate/threatening\": false,\n \"violence/graphic\": false,\n \"self-harm/intent\": false,\n \"self-harm/instructions\": false,\n \"harassment/threatening\": true,\n \"violence\": true\n },\n \"category_scores\": {\n \"sexual\": 0.000011726012417057063,\n \"hate\": 0.22706663608551025,\n \"harassment\": 0.5215635299682617,\n \"self-harm\": 2.227119921371923e-6,\n \"sexual/minors\": 7.107352217872176e-8,\n \"hate/threatening\": 0.023547329008579254,\n \"violence/graphic\": 0.00003391829886822961,\n \"self-harm/intent\": 1.646940972932498e-6,\n \"self-harm/instructions\": 1.1198755256458526e-9,\n \"harassment/threatening\": 0.5694745779037476,\n \"violence\": 0.9971134662628174\n }\n }\n ]\n}\n" + }, + { + "title": "Image and text", + "request": { + "curl": "curl https://api.openai.com/v1/moderations \\\n -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"omni-moderation-latest\",\n \"input\": [\n { \"type\": \"text\", \"text\": \"...text to classify goes here...\" },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"https://example.com/image.png\"\n }\n }\n ]\n }'\n", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nmoderation = client.moderations.create(\n input=\"I want to kill them.\",\n)\nprint(moderation.id)", + "javascript": "import OpenAI from \"openai\";\nconst openai = new OpenAI();\n\nconst moderation = await openai.moderations.create({\n model: \"omni-moderation-latest\",\n input: [\n { type: \"text\", text: \"...text to classify goes here...\" },\n {\n type: \"image_url\",\n image_url: {\n url: \"https://example.com/image.png\"\n // can also use base64 encoded image URLs\n // url: \"data:image/jpeg;base64,abcdefg...\"\n }\n }\n ],\n});\n\nconsole.log(moderation);\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst moderation = await client.moderations.create({ input: 'I want to kill them.' });\n\nconsole.log(moderation.id);", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmoderation, err := client.Moderations.New(context.TODO(), openai.ModerationNewParams{\n\t\tInput: openai.ModerationNewParamsInputUnion{\n\t\t\tOfString: openai.String(\"I want to kill them.\"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", moderation.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.moderations.ModerationCreateParams;\nimport com.openai.models.moderations.ModerationCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ModerationCreateParams params = ModerationCreateParams.builder()\n .input(\"I want to kill them.\")\n .build();\n ModerationCreateResponse moderation = client.moderations().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmoderation = openai.moderations.create(input: \"I want to kill them.\")\n\nputs(moderation)" + }, + "response": "{\n \"id\": \"modr-0d9740456c391e43c445bf0f010940c7\",\n \"model\": \"omni-moderation-latest\",\n \"results\": [\n {\n \"flagged\": true,\n \"categories\": {\n \"harassment\": true,\n \"harassment/threatening\": true,\n \"sexual\": false,\n \"hate\": false,\n \"hate/threatening\": false,\n \"illicit\": false,\n \"illicit/violent\": false,\n \"self-harm/intent\": false,\n \"self-harm/instructions\": false,\n \"self-harm\": false,\n \"sexual/minors\": false,\n \"violence\": true,\n \"violence/graphic\": true\n },\n \"category_scores\": {\n \"harassment\": 0.8189693396524255,\n \"harassment/threatening\": 0.804985420696006,\n \"sexual\": 1.573112165348997e-6,\n \"hate\": 0.007562942636942845,\n \"hate/threatening\": 0.004208854591835476,\n \"illicit\": 0.030535955153511665,\n \"illicit/violent\": 0.008925306722380033,\n \"self-harm/intent\": 0.00023023930975076432,\n \"self-harm/instructions\": 0.0002293869201073356,\n \"self-harm\": 0.012598046106750154,\n \"sexual/minors\": 2.212566909570261e-8,\n \"violence\": 0.9999992735124786,\n \"violence/graphic\": 0.843064871157054\n },\n \"category_applied_input_types\": {\n \"harassment\": [\n \"text\"\n ],\n \"harassment/threatening\": [\n \"text\"\n ],\n \"sexual\": [\n \"text\",\n \"image\"\n ],\n \"hate\": [\n \"text\"\n ],\n \"hate/threatening\": [\n \"text\"\n ],\n \"illicit\": [\n \"text\"\n ],\n \"illicit/violent\": [\n \"text\"\n ],\n \"self-harm/intent\": [\n \"text\",\n \"image\"\n ],\n \"self-harm/instructions\": [\n \"text\",\n \"image\"\n ],\n \"self-harm\": [\n \"text\",\n \"image\"\n ],\n \"sexual/minors\": [\n \"text\"\n ],\n \"violence\": [\n \"text\",\n \"image\"\n ],\n \"violence/graphic\": [\n \"text\",\n \"image\"\n ]\n }\n }\n ]\n}\n" + } + ] + } + } + }, + "/organization/admin_api_keys": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "List organization API keys", + "operationId": "admin-api-keys-list", + "description": "Retrieve a paginated list of organization admin API keys.", + "parameters": [ + { + "in": "query", + "name": "after", + "required": false, + "schema": { + "type": "string", + "nullable": true, + "description": "Return keys with IDs that come after this ID in the pagination order." + } + }, + { + "in": "query", + "name": "order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc", + "description": "Order results by creation time, ascending or descending." + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "description": "Maximum number of keys to return." + } + } + ], + "responses": { + "200": { + "description": "A list of organization API keys.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKeyList" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List all organization and project API keys.", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/admin_api_keys?after=key_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const adminAPIKey of client.admin.organization.adminAPIKeys.list()) {\n console.log(adminAPIKey.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.admin_api_keys.list()\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.AdminAPIKeys.List(context.TODO(), openai.AdminOrganizationAdminAPIKeyListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.adminapikeys.AdminApiKeyListPage;\nimport com.openai.models.admin.organization.adminapikeys.AdminApiKeyListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AdminApiKeyListPage page = client.admin().organization().adminApiKeys().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.admin_api_keys.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.admin_api_key\",\n \"id\": \"key_abc\",\n \"name\": \"Main Admin Key\",\n \"redacted_value\": \"sk-admin...def\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"owner\": {\n \"type\": \"service_account\",\n \"object\": \"organization.service_account\",\n \"id\": \"sa_456\",\n \"name\": \"My Service Account\",\n \"created_at\": 1711471533,\n \"role\": \"member\"\n }\n }\n ],\n \"first_id\": \"key_abc\",\n \"last_id\": \"key_abc\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Create an organization admin API key", + "operationId": "admin-api-keys-create", + "description": "Create a new admin-level API key for the organization.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "example": "New Admin Key" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The newly created admin API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminApiKeyCreateResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create admin API key", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/admin_api_keys \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"New Admin Key\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst adminAPIKey = await client.admin.organization.adminAPIKeys.create({ name: 'New Admin Key' });\n\nconsole.log(adminAPIKey);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nadmin_api_key = client.admin.organization.admin_api_keys.create(\n name=\"New Admin Key\",\n)\nprint(admin_api_key)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tadminAPIKey, err := client.Admin.Organization.AdminAPIKeys.New(context.TODO(), openai.AdminOrganizationAdminAPIKeyNewParams{\n\t\tName: \"New Admin Key\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", adminAPIKey)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.adminapikeys.AdminApiKeyCreateParams;\nimport com.openai.models.admin.organization.adminapikeys.AdminApiKeyCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AdminApiKeyCreateParams params = AdminApiKeyCreateParams.builder()\n .name(\"New Admin Key\")\n .build();\n AdminApiKeyCreateResponse adminApiKey = client.admin().organization().adminApiKeys().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nadmin_api_key = openai.admin.organization.admin_api_keys.create(name: \"New Admin Key\")\n\nputs(admin_api_key)" + }, + "response": "{\n \"object\": \"organization.admin_api_key\",\n \"id\": \"key_xyz\",\n \"name\": \"New Admin Key\",\n \"redacted_value\": \"sk-admin...xyz\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"owner\": {\n \"type\": \"user\",\n \"object\": \"organization.user\",\n \"id\": \"user_123\",\n \"name\": \"John Doe\",\n \"created_at\": 1711471533,\n \"role\": \"owner\"\n },\n \"value\": \"sk-admin-1234abcd\"\n}\n" + } + } + } + }, + "/organization/admin_api_keys/{key_id}": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Retrieve a single organization API key", + "operationId": "admin-api-keys-get", + "description": "Get details for a specific organization API key by its ID.", + "parameters": [ + { + "in": "path", + "name": "key_id", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the API key." + } + } + ], + "responses": { + "200": { + "description": "Details of the requested API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminApiKey" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve admin API key", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/admin_api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst adminAPIKey = await client.admin.organization.adminAPIKeys.retrieve('key_id');\n\nconsole.log(adminAPIKey.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nadmin_api_key = client.admin.organization.admin_api_keys.retrieve(\n \"key_id\",\n)\nprint(admin_api_key.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tadminAPIKey, err := client.Admin.Organization.AdminAPIKeys.Get(context.TODO(), \"key_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", adminAPIKey.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.adminapikeys.AdminApiKey;\nimport com.openai.models.admin.organization.adminapikeys.AdminApiKeyRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AdminApiKey adminApiKey = client.admin().organization().adminApiKeys().retrieve(\"key_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nadmin_api_key = openai.admin.organization.admin_api_keys.retrieve(\"key_id\")\n\nputs(admin_api_key)" + }, + "response": "{\n \"object\": \"organization.admin_api_key\",\n \"id\": \"key_abc\",\n \"name\": \"Main Admin Key\",\n \"redacted_value\": \"sk-admin...xyz\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"owner\": {\n \"type\": \"user\",\n \"object\": \"organization.user\",\n \"id\": \"user_123\",\n \"name\": \"John Doe\",\n \"created_at\": 1711471533,\n \"role\": \"owner\"\n }\n}\n" + } + } + }, + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Delete an organization admin API key", + "operationId": "admin-api-keys-delete", + "description": "Delete the specified admin API key.", + "parameters": [ + { + "in": "path", + "name": "key_id", + "required": true, + "schema": { + "type": "string", + "description": "The ID of the API key to be deleted." + } + } + ], + "responses": { + "200": { + "description": "Confirmation that the API key was deleted.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "key_abc" + }, + "object": { + "type": "string", + "enum": [ + "organization.admin_api_key.deleted" + ], + "example": "organization.admin_api_key.deleted", + "x-stainless-const": true + }, + "deleted": { + "type": "boolean", + "example": true + } + }, + "required": [ + "id", + "object", + "deleted" + ] + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete admin API key", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/admin_api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst adminAPIKey = await client.admin.organization.adminAPIKeys.delete('key_id');\n\nconsole.log(adminAPIKey.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nadmin_api_key = client.admin.organization.admin_api_keys.delete(\n \"key_id\",\n)\nprint(admin_api_key.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tadminAPIKey, err := client.Admin.Organization.AdminAPIKeys.Delete(context.TODO(), \"key_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", adminAPIKey.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.adminapikeys.AdminApiKeyDeleteParams;\nimport com.openai.models.admin.organization.adminapikeys.AdminApiKeyDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AdminApiKeyDeleteResponse adminApiKey = client.admin().organization().adminApiKeys().delete(\"key_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nadmin_api_key = openai.admin.organization.admin_api_keys.delete(\"key_id\")\n\nputs(admin_api_key)" + }, + "response": "{\n \"id\": \"key_abc\",\n \"object\": \"organization.admin_api_key.deleted\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/audit_logs": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "List user actions and configuration changes within this organization.", + "operationId": "list-audit-logs", + "tags": [ + "Audit Logs" + ], + "parameters": [ + { + "name": "effective_at", + "in": "query", + "description": "Return only events whose `effective_at` (Unix seconds) is in this range.", + "required": false, + "schema": { + "type": "object", + "properties": { + "gt": { + "type": "integer", + "description": "Return only events whose `effective_at` (Unix seconds) is greater than this value." + }, + "gte": { + "type": "integer", + "description": "Return only events whose `effective_at` (Unix seconds) is greater than or equal to this value." + }, + "lt": { + "type": "integer", + "description": "Return only events whose `effective_at` (Unix seconds) is less than this value." + }, + "lte": { + "type": "integer", + "description": "Return only events whose `effective_at` (Unix seconds) is less than or equal to this value." + } + } + } + }, + { + "name": "project_ids[]", + "in": "query", + "description": "Return only events for these projects.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "event_types[]", + "in": "query", + "description": "Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](/docs/api-reference/audit-logs/object).", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLogEventType" + } + } + }, + { + "name": "actor_ids[]", + "in": "query", + "description": "Return only events performed by these actors. Can be a user ID, a service account ID, or an api key tracking ID.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "actor_emails[]", + "in": "query", + "description": "Return only events performed by users with these emails.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "resource_ids[]", + "in": "query", + "description": "Return only events performed on these targets. For example, a project ID updated.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Audit logs listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListAuditLogsResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List audit logs", + "group": "audit-logs", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/audit_logs \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const auditLogListResponse of client.admin.organization.auditLogs.list()) {\n console.log(auditLogListResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.audit_logs.list()\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.AuditLogs.List(context.TODO(), openai.AdminOrganizationAuditLogListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.auditlogs.AuditLogListPage;\nimport com.openai.models.admin.organization.auditlogs.AuditLogListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AuditLogListPage page = client.admin().organization().auditLogs().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.audit_logs.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"audit_log-xxx_yyyymmdd\",\n \"type\": \"project.archived\",\n \"effective_at\": 1722461446,\n \"actor\": {\n \"type\": \"api_key\",\n \"api_key\": {\n \"type\": \"user\",\n \"user\": {\n \"id\": \"user-xxx\",\n \"email\": \"user@example.com\"\n }\n }\n },\n \"project.archived\": {\n \"id\": \"proj_abc\"\n },\n },\n {\n \"id\": \"audit_log-yyy__20240101\",\n \"type\": \"api_key.updated\",\n \"effective_at\": 1720804190,\n \"actor\": {\n \"type\": \"session\",\n \"session\": {\n \"user\": {\n \"id\": \"user-xxx\",\n \"email\": \"user@example.com\"\n },\n \"ip_address\": \"127.0.0.1\",\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\",\n \"ja3\": \"a497151ce4338a12c4418c44d375173e\",\n \"ja4\": \"q13d0313h3_55b375c5d22e_c7319ce65786\",\n \"ip_address_details\": {\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"region\": \"California\",\n \"region_code\": \"CA\",\n \"asn\": \"1234\",\n \"latitude\": \"37.77490\",\n \"longitude\": \"-122.41940\"\n }\n }\n },\n \"api_key.updated\": {\n \"id\": \"key_xxxx\",\n \"data\": {\n \"scopes\": [\"resource_2.operation_2\"]\n }\n },\n }\n ],\n \"first_id\": \"audit_log-xxx__20240101\",\n \"last_id\": \"audit_log_yyy__20240101\",\n \"has_more\": true\n}\n" + } + } + } + }, + "/organization/certificates": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "List uploaded certificates for this organization.", + "operationId": "listOrganizationCertificates", + "tags": [ + "Certificates" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ] + } + } + ], + "responses": { + "200": { + "description": "Certificates listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCertificatesResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List organization certificates", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateListResponse of client.admin.organization.certificates.list()) {\n console.log(certificateListResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.certificates.list()\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Certificates.List(context.TODO(), openai.AdminOrganizationCertificateListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.CertificateListPage;\nimport com.openai.models.admin.organization.certificates.CertificateListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CertificateListPage page = client.admin().organization().certificates().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.certificates.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n \"first_id\": \"cert_abc\",\n \"last_id\": \"cert_abc\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Upload a certificate to the organization. This does **not** automatically activate the certificate.\n\nOrganizations can upload up to 50 certificates.\n", + "operationId": "uploadCertificate", + "tags": [ + "Certificates" + ], + "requestBody": { + "description": "The certificate upload payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadCertificateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Certificate uploaded successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Certificate" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Upload certificate", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"name\": \"My Example Certificate\",\n \"certificate\": \"-----BEGIN CERTIFICATE-----\\\\nMIIDeT...\\\\n-----END CERTIFICATE-----\"\n}'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst certificate = await client.admin.organization.certificates.create({\n certificate: 'certificate',\n});\n\nconsole.log(certificate.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ncertificate = client.admin.organization.certificates.create(\n certificate=\"certificate\",\n)\nprint(certificate.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tcertificate, err := client.Admin.Organization.Certificates.New(context.TODO(), openai.AdminOrganizationCertificateNewParams{\n\t\tCertificate: \"certificate\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", certificate.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.Certificate;\nimport com.openai.models.admin.organization.certificates.CertificateCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CertificateCreateParams params = CertificateCreateParams.builder()\n .certificate(\"certificate\")\n .build();\n Certificate certificate = client.admin().organization().certificates().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ncertificate = openai.admin.organization.certificates.create(certificate: \"certificate\")\n\nputs(certificate)" + }, + "response": "{\n \"object\": \"certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n}\n" + } + } + } + }, + "/organization/certificates/activate": { + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Activate certificates at the organization level.\n\nYou can atomically and idempotently activate up to 10 certificates at a time.\n", + "operationId": "activateOrganizationCertificates", + "tags": [ + "Certificates" + ], + "requestBody": { + "description": "The certificate activation payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToggleCertificatesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Certificates activated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationCertificateActivationResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Activate certificates for organization", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/certificates/activate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"certificate_ids\": [\"cert_abc\", \"cert_def\"]\n}'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateActivateResponse of client.admin.organization.certificates.activate({\n certificate_ids: ['cert_abc'],\n})) {\n console.log(certificateActivateResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.certificates.activate(\n certificate_ids=[\"cert_abc\"],\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Certificates.Activate(context.TODO(), openai.AdminOrganizationCertificateActivateParams{\n\t\tCertificateIDs: []string{\"cert_abc\"},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.CertificateActivatePage;\nimport com.openai.models.admin.organization.certificates.CertificateActivateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CertificateActivateParams params = CertificateActivateParams.builder()\n .addCertificateId(\"cert_abc\")\n .build();\n CertificateActivatePage page = client.admin().organization().certificates().activate(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.certificates.activate(certificate_ids: [\"cert_abc\"])\n\nputs(page)" + }, + "response": "{\n \"object\": \"organization.certificate.activation\",\n \"data\": [\n {\n \"object\": \"organization.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n {\n \"object\": \"organization.certificate\",\n \"id\": \"cert_def\",\n \"name\": \"My Example Certificate 2\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n}\n" + } + } + } + }, + "/organization/certificates/deactivate": { + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Deactivate certificates at the organization level.\n\nYou can atomically and idempotently deactivate up to 10 certificates at a time.\n", + "operationId": "deactivateOrganizationCertificates", + "tags": [ + "Certificates" + ], + "requestBody": { + "description": "The certificate deactivation payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToggleCertificatesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Certificates deactivated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationCertificateDeactivationResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Deactivate certificates for organization", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/certificates/deactivate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"certificate_ids\": [\"cert_abc\", \"cert_def\"]\n}'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateDeactivateResponse of client.admin.organization.certificates.deactivate(\n { certificate_ids: ['cert_abc'] },\n)) {\n console.log(certificateDeactivateResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.certificates.deactivate(\n certificate_ids=[\"cert_abc\"],\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Certificates.Deactivate(context.TODO(), openai.AdminOrganizationCertificateDeactivateParams{\n\t\tCertificateIDs: []string{\"cert_abc\"},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.CertificateDeactivatePage;\nimport com.openai.models.admin.organization.certificates.CertificateDeactivateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CertificateDeactivateParams params = CertificateDeactivateParams.builder()\n .addCertificateId(\"cert_abc\")\n .build();\n CertificateDeactivatePage page = client.admin().organization().certificates().deactivate(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.certificates.deactivate(certificate_ids: [\"cert_abc\"])\n\nputs(page)" + }, + "response": "{\n \"object\": \"organization.certificate.deactivation\",\n \"data\": [\n {\n \"object\": \"organization.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": false,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n {\n \"object\": \"organization.certificate\",\n \"id\": \"cert_def\",\n \"name\": \"My Example Certificate 2\",\n \"active\": false,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n}\n" + } + } + } + }, + "/organization/certificates/{certificate_id}": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Get a certificate that has been uploaded to the organization.\n\nYou can get a certificate regardless of whether it is active or not.\n", + "operationId": "getCertificate", + "tags": [ + "Certificates" + ], + "parameters": [ + { + "name": "certificate_id", + "in": "path", + "description": "Unique ID of the certificate to retrieve.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "include", + "in": "query", + "description": "A list of additional fields to include in the response. Currently the only supported value is `content` to fetch the PEM content of the certificate.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "content" + ] + } + } + } + ], + "responses": { + "200": { + "description": "Certificate retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Certificate" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Get certificate", + "group": "administration", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/organization/certificates/cert_abc?include[]=content\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst certificate = await client.admin.organization.certificates.retrieve('certificate_id');\n\nconsole.log(certificate.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ncertificate = client.admin.organization.certificates.retrieve(\n certificate_id=\"certificate_id\",\n)\nprint(certificate.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tcertificate, err := client.Admin.Organization.Certificates.Get(\n\t\tcontext.TODO(),\n\t\t\"certificate_id\",\n\t\topenai.AdminOrganizationCertificateGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", certificate.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.Certificate;\nimport com.openai.models.admin.organization.certificates.CertificateRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Certificate certificate = client.admin().organization().certificates().retrieve(\"certificate_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ncertificate = openai.admin.organization.certificates.retrieve(\"certificate_id\")\n\nputs(certificate)" + }, + "response": "{\n \"object\": \"certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 1234567,\n \"expires_at\": 12345678,\n \"content\": \"-----BEGIN CERTIFICATE-----MIIDeT...-----END CERTIFICATE-----\"\n }\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Modify a certificate. Note that only the name can be modified.\n", + "operationId": "modifyCertificate", + "tags": [ + "Certificates" + ], + "parameters": [ + { + "name": "certificate_id", + "in": "path", + "description": "Unique ID of the certificate to modify.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The certificate modification payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModifyCertificateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Certificate modified successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Certificate" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Modify certificate", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/certificates/cert_abc \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"name\": \"Renamed Certificate\"\n}'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst certificate = await client.admin.organization.certificates.update('certificate_id');\n\nconsole.log(certificate.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ncertificate = client.admin.organization.certificates.update(\n certificate_id=\"certificate_id\",\n)\nprint(certificate.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tcertificate, err := client.Admin.Organization.Certificates.Update(\n\t\tcontext.TODO(),\n\t\t\"certificate_id\",\n\t\topenai.AdminOrganizationCertificateUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", certificate.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.Certificate;\nimport com.openai.models.admin.organization.certificates.CertificateUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Certificate certificate = client.admin().organization().certificates().update(\"certificate_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ncertificate = openai.admin.organization.certificates.update(\"certificate_id\")\n\nputs(certificate)" + }, + "response": "{\n \"object\": \"certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"Renamed Certificate\",\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n}\n" + } + } + }, + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Delete a certificate from the organization.\n\nThe certificate must be inactive for the organization and all projects.\n", + "operationId": "deleteCertificate", + "tags": [ + "Certificates" + ], + "parameters": [ + { + "name": "certificate_id", + "in": "path", + "description": "Unique ID of the certificate to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Certificate deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCertificateResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete certificate", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/certificates/cert_abc \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst certificate = await client.admin.organization.certificates.delete('certificate_id');\n\nconsole.log(certificate.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ncertificate = client.admin.organization.certificates.delete(\n \"certificate_id\",\n)\nprint(certificate.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tcertificate, err := client.Admin.Organization.Certificates.Delete(context.TODO(), \"certificate_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", certificate.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.certificates.CertificateDeleteParams;\nimport com.openai.models.admin.organization.certificates.CertificateDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CertificateDeleteResponse certificate = client.admin().organization().certificates().delete(\"certificate_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ncertificate = openai.admin.organization.certificates.delete(\"certificate_id\")\n\nputs(certificate)" + }, + "response": "{\n \"object\": \"certificate.deleted\",\n \"id\": \"cert_abc\"\n}\n" + } + } + } + }, + "/organization/costs": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Get costs details for the organization.", + "operationId": "usage-costs", + "tags": [ + "Usage" + ], + "parameters": [ + { + "name": "start_time", + "in": "query", + "description": "Start time (Unix seconds) of the query time range, inclusive.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "end_time", + "in": "query", + "description": "End time (Unix seconds) of the query time range, exclusive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "bucket_width", + "in": "query", + "description": "Width of each time bucket in response. Currently only `1d` is supported, default to `1d`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "1d" + ], + "default": "1d" + } + }, + { + "name": "project_ids", + "in": "query", + "description": "Return only costs for these projects.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "api_key_ids", + "in": "query", + "description": "Return only costs for these API keys.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_by", + "in": "query", + "description": "Group the costs by the specified fields. Support fields include `project_id`, `line_item`, `api_key_id` and any combination of them.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "project_id", + "line_item", + "api_key_id" + ] + } + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the default is 7.\n", + "required": false, + "schema": { + "type": "integer", + "default": 7 + } + }, + { + "name": "page", + "in": "query", + "description": "A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Costs data retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Costs", + "group": "usage-costs", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/organization/costs?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.admin.organization.usage.costs({ start_time: 0 });\n\nconsole.log(response.data);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nresponse = client.admin.organization.usage.costs(\n start_time=0,\n)\nprint(response.data)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tresponse, err := client.Admin.Organization.Usage.Costs(context.TODO(), openai.AdminOrganizationUsageCostsParams{\n\t\tStartTime: 0,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.usage.UsageCostsParams;\nimport com.openai.models.admin.organization.usage.UsageCostsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UsageCostsParams params = UsageCostsParams.builder()\n .startTime(0L)\n .build();\n UsageCostsResponse response = client.admin().organization().usage().costs(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nresponse = openai.admin.organization.usage.costs(start_time: 0)\n\nputs(response)" + }, + "response": "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.costs.result\",\n \"amount\": {\n \"value\": 0.06,\n \"currency\": \"usd\"\n },\n \"line_item\": null,\n \"project_id\": null,\n \"api_key_id\": null,\n \"quantity\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + } + } + } + }, + "/organization/groups": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Lists all groups in the organization.", + "operationId": "list-groups", + "tags": [ + "Groups" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit on the number of groups to be returned. Limit can range between 0 and 1000, and the default is 100.\n", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000, + "default": 100 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is a group ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with group_abc, your subsequent call can include `after=group_abc` in order to fetch the next page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Specifies the sort order of the returned groups.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + } + ], + "responses": { + "200": { + "description": "Groups listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List groups", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/groups?limit=20&order=asc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const group of client.admin.organization.groups.list()) {\n console.log(group.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.groups.list()\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Groups.List(context.TODO(), openai.AdminOrganizationGroupListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.groups.GroupListPage;\nimport com.openai.models.admin.organization.groups.GroupListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GroupListPage page = client.admin().organization().groups().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.groups.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"group\",\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"name\": \"Support Team\",\n \"created_at\": 1711471533,\n \"is_scim_managed\": false\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Creates a new group in the organization.", + "operationId": "create-group", + "tags": [ + "Groups" + ], + "requestBody": { + "description": "Parameters for the group you want to create.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGroupBody" + } + } + } + }, + "responses": { + "200": { + "description": "Group created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create group", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/groups \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Support Team\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst group = await client.admin.organization.groups.create({ name: 'x' });\n\nconsole.log(group.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ngroup = client.admin.organization.groups.create(\n name=\"x\",\n)\nprint(group.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tgroup, err := client.Admin.Organization.Groups.New(context.TODO(), openai.AdminOrganizationGroupNewParams{\n\t\tName: \"x\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", group.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.groups.Group;\nimport com.openai.models.admin.organization.groups.GroupCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GroupCreateParams params = GroupCreateParams.builder()\n .name(\"x\")\n .build();\n Group group = client.admin().organization().groups().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ngroup = openai.admin.organization.groups.create(name: \"x\")\n\nputs(group)" + }, + "response": "{\n \"object\": \"group\",\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"name\": \"Support Team\",\n \"created_at\": 1711471533,\n \"is_scim_managed\": false\n}\n" + } + } + } + }, + "/organization/groups/{group_id}": { + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Updates a group's information.", + "operationId": "update-group", + "tags": [ + "Groups" + ], + "parameters": [ + { + "name": "group_id", + "in": "path", + "description": "The ID of the group to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New attributes to set on the group.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGroupBody" + } + } + } + }, + "responses": { + "200": { + "description": "Group updated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupResourceWithSuccess" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Update group", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Escalations\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst group = await client.admin.organization.groups.update('group_id', { name: 'x' });\n\nconsole.log(group.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ngroup = client.admin.organization.groups.update(\n group_id=\"group_id\",\n name=\"x\",\n)\nprint(group.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tgroup, err := client.Admin.Organization.Groups.Update(\n\t\tcontext.TODO(),\n\t\t\"group_id\",\n\t\topenai.AdminOrganizationGroupUpdateParams{\n\t\t\tName: \"x\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", group.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.groups.GroupUpdateParams;\nimport com.openai.models.admin.organization.groups.GroupUpdateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GroupUpdateParams params = GroupUpdateParams.builder()\n .groupId(\"group_id\")\n .name(\"x\")\n .build();\n GroupUpdateResponse group = client.admin().organization().groups().update(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ngroup = openai.admin.organization.groups.update(\"group_id\", name: \"x\")\n\nputs(group)" + }, + "response": "{\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"name\": \"Escalations\",\n \"created_at\": 1711471533,\n \"is_scim_managed\": false\n}\n" + } + } + }, + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Deletes a group from the organization.", + "operationId": "delete-group", + "tags": [ + "Groups" + ], + "parameters": [ + { + "name": "group_id", + "in": "path", + "description": "The ID of the group to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Group deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupDeletedResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete group", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst group = await client.admin.organization.groups.delete('group_id');\n\nconsole.log(group.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ngroup = client.admin.organization.groups.delete(\n \"group_id\",\n)\nprint(group.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tgroup, err := client.Admin.Organization.Groups.Delete(context.TODO(), \"group_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", group.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.groups.GroupDeleteParams;\nimport com.openai.models.admin.organization.groups.GroupDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GroupDeleteResponse group = client.admin().organization().groups().delete(\"group_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ngroup = openai.admin.organization.groups.delete(\"group_id\")\n\nputs(group)" + }, + "response": "{\n \"object\": \"group.deleted\",\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/groups/{group_id}/roles": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Lists the organization roles assigned to a group within the organization.", + "operationId": "list-group-role-assignments", + "tags": [ + "Group organization role assignments" + ], + "parameters": [ + { + "name": "group_id", + "in": "path", + "description": "The ID of the group whose organization role assignments you want to list.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of organization role assignments to return.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000 + } + }, + { + "name": "after", + "in": "query", + "description": "Cursor for pagination. Provide the value from the previous response's `next` field to continue listing organization roles.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for the returned organization roles.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + } + ], + "responses": { + "200": { + "description": "Group organization role assignments listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List group organization role assignments", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const roleListResponse of client.admin.organization.groups.roles.list('group_id')) {\n console.log(roleListResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.groups.roles.list(\n group_id=\"group_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Groups.Roles.List(\n\t\tcontext.TODO(),\n\t\t\"group_id\",\n\t\topenai.AdminOrganizationGroupRoleListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.groups.roles.RoleListPage;\nimport com.openai.models.admin.organization.groups.roles.RoleListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleListPage page = client.admin().organization().groups().roles().list(\"group_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.groups.roles.list(\"group_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false,\n \"description\": \"Allows managing organization groups\",\n \"created_at\": 1711471533,\n \"updated_at\": 1711472599,\n \"created_by\": \"user_abc123\",\n \"created_by_user_obj\": {\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\"\n },\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Assigns an organization role to a group within the organization.", + "operationId": "assign-group-role", + "tags": [ + "Group organization role assignments" + ], + "parameters": [ + { + "name": "group_id", + "in": "path", + "description": "The ID of the group that should receive the organization role.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Identifies the organization role to assign to the group.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicAssignOrganizationGroupRoleBody" + } + } + } + }, + "responses": { + "200": { + "description": "Organization role assigned to the group successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupRoleAssignment" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Assign organization role to group", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_id\": \"role_01J1F8ROLE01\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.groups.roles.create('group_id', {\n role_id: 'role_id',\n});\n\nconsole.log(role.group);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.groups.roles.create(\n group_id=\"group_id\",\n role_id=\"role_id\",\n)\nprint(role.group)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Groups.Roles.New(\n\t\tcontext.TODO(),\n\t\t\"group_id\",\n\t\topenai.AdminOrganizationGroupRoleNewParams{\n\t\t\tRoleID: \"role_id\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.Group)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.groups.roles.RoleCreateParams;\nimport com.openai.models.admin.organization.groups.roles.RoleCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleCreateParams params = RoleCreateParams.builder()\n .groupId(\"group_id\")\n .roleId(\"role_id\")\n .build();\n RoleCreateResponse role = client.admin().organization().groups().roles().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.groups.roles.create(\"group_id\", role_id: \"role_id\")\n\nputs(role)" + }, + "response": "{\n \"object\": \"group.role\",\n \"group\": {\n \"object\": \"group\",\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"name\": \"Support Team\",\n \"created_at\": 1711471533,\n \"scim_managed\": false\n },\n \"role\": {\n \"object\": \"role\",\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"description\": \"Allows managing organization groups\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false\n }\n}\n" + } + } + } + }, + "/organization/groups/{group_id}/roles/{role_id}": { + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Unassigns an organization role from a group within the organization.", + "operationId": "unassign-group-role", + "tags": [ + "Group organization role assignments" + ], + "parameters": [ + { + "name": "group_id", + "in": "path", + "description": "The ID of the group to modify.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "role_id", + "in": "path", + "description": "The ID of the organization role to remove from the group.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Organization role unassigned from the group successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletedRoleAssignmentResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Unassign organization role from group", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8ROLE01 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.groups.roles.delete('role_id', {\n group_id: 'group_id',\n});\n\nconsole.log(role.deleted);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.groups.roles.delete(\n role_id=\"role_id\",\n group_id=\"group_id\",\n)\nprint(role.deleted)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Groups.Roles.Delete(\n\t\tcontext.TODO(),\n\t\t\"group_id\",\n\t\t\"role_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.Deleted)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.groups.roles.RoleDeleteParams;\nimport com.openai.models.admin.organization.groups.roles.RoleDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleDeleteParams params = RoleDeleteParams.builder()\n .groupId(\"group_id\")\n .roleId(\"role_id\")\n .build();\n RoleDeleteResponse role = client.admin().organization().groups().roles().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.groups.roles.delete(\"role_id\", group_id: \"group_id\")\n\nputs(role)" + }, + "response": "{\n \"object\": \"group.role.deleted\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/groups/{group_id}/users": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Lists the users assigned to a group.", + "operationId": "list-group-users", + "tags": [ + "Group users" + ], + "parameters": [ + { + "name": "group_id", + "in": "path", + "description": "The ID of the group to inspect.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of users to be returned. Limit can range between 0 and 1000, and the default is 100.\n", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000, + "default": 100 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. Provide the ID of the last user from the previous list response to retrieve the next page.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Specifies the sort order of users in the list.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + } + ], + "responses": { + "200": { + "description": "Group users listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List group users", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users?limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const organizationGroupUser of client.admin.organization.groups.users.list('group_id')) {\n console.log(organizationGroupUser.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.groups.users.list(\n group_id=\"group_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Groups.Users.List(\n\t\tcontext.TODO(),\n\t\t\"group_id\",\n\t\topenai.AdminOrganizationGroupUserListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.groups.users.UserListPage;\nimport com.openai.models.admin.organization.groups.users.UserListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UserListPage page = client.admin().organization().groups().users().list(\"group_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.groups.users.list(\"group_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\"\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Adds a user to a group.", + "operationId": "add-group-user", + "tags": [ + "Group users" + ], + "parameters": [ + { + "name": "group_id", + "in": "path", + "description": "The ID of the group to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Identifies the user that should be added to the group.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGroupUserBody" + } + } + } + }, + "responses": { + "200": { + "description": "User added to the group successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupUserAssignment" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Add group user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"user_abc123\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.admin.organization.groups.users.create('group_id', {\n user_id: 'user_id',\n});\n\nconsole.log(user.group_id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nuser = client.admin.organization.groups.users.create(\n group_id=\"group_id\",\n user_id=\"user_id\",\n)\nprint(user.group_id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tuser, err := client.Admin.Organization.Groups.Users.New(\n\t\tcontext.TODO(),\n\t\t\"group_id\",\n\t\topenai.AdminOrganizationGroupUserNewParams{\n\t\t\tUserID: \"user_id\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", user.GroupID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.groups.users.UserCreateParams;\nimport com.openai.models.admin.organization.groups.users.UserCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UserCreateParams params = UserCreateParams.builder()\n .groupId(\"group_id\")\n .userId(\"user_id\")\n .build();\n UserCreateResponse user = client.admin().organization().groups().users().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nuser = openai.admin.organization.groups.users.create(\"group_id\", user_id: \"user_id\")\n\nputs(user)" + }, + "response": "{\n \"object\": \"group.user\",\n \"user_id\": \"user_abc123\",\n \"group_id\": \"group_01J1F8ABCDXYZ\"\n}\n" + } + } + } + }, + "/organization/groups/{group_id}/users/{user_id}": { + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Removes a user from a group.", + "operationId": "remove-group-user", + "tags": [ + "Group users" + ], + "parameters": [ + { + "name": "group_id", + "in": "path", + "description": "The ID of the group to update.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "path", + "description": "The ID of the user to remove from the group.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User removed from the group successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupUserDeletedResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Remove group user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users/user_abc123 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.admin.organization.groups.users.delete('user_id', {\n group_id: 'group_id',\n});\n\nconsole.log(user.deleted);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nuser = client.admin.organization.groups.users.delete(\n user_id=\"user_id\",\n group_id=\"group_id\",\n)\nprint(user.deleted)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tuser, err := client.Admin.Organization.Groups.Users.Delete(\n\t\tcontext.TODO(),\n\t\t\"group_id\",\n\t\t\"user_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", user.Deleted)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.groups.users.UserDeleteParams;\nimport com.openai.models.admin.organization.groups.users.UserDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UserDeleteParams params = UserDeleteParams.builder()\n .groupId(\"group_id\")\n .userId(\"user_id\")\n .build();\n UserDeleteResponse user = client.admin().organization().groups().users().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nuser = openai.admin.organization.groups.users.delete(\"user_id\", group_id: \"group_id\")\n\nputs(user)" + }, + "response": "{\n \"object\": \"group.user.deleted\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/invites": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Returns a list of invites in the organization.", + "operationId": "list-invites", + "tags": [ + "Invites" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Invites listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteListResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List invites", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/invites?after=invite-abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const invite of client.admin.organization.invites.list()) {\n console.log(invite.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.invites.list()\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Invites.List(context.TODO(), openai.AdminOrganizationInviteListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.invites.InviteListPage;\nimport com.openai.models.admin.organization.invites.InviteListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n InviteListPage page = client.admin().organization().invites().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.invites.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.invite\",\n \"id\": \"invite-abc\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"status\": \"accepted\",\n \"created_at\": 1711471533,\n \"expires_at\": 1711471533,\n \"accepted_at\": 1711471533\n }\n ],\n \"first_id\": \"invite-abc\",\n \"last_id\": \"invite-abc\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.", + "operationId": "inviteUser", + "tags": [ + "Invites" + ], + "requestBody": { + "description": "The invite request payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteRequest" + } + } + } + }, + "responses": { + "200": { + "description": "User invited successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invite" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create invite", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/invites \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"email\": \"anotheruser@example.com\",\n \"role\": \"reader\",\n \"projects\": [\n {\n \"id\": \"project-xyz\",\n \"role\": \"member\"\n },\n {\n \"id\": \"project-abc\",\n \"role\": \"owner\"\n }\n ]\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst invite = await client.admin.organization.invites.create({ email: 'email', role: 'reader' });\n\nconsole.log(invite.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ninvite = client.admin.organization.invites.create(\n email=\"email\",\n role=\"reader\",\n)\nprint(invite.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tinvite, err := client.Admin.Organization.Invites.New(context.TODO(), openai.AdminOrganizationInviteNewParams{\n\t\tEmail: \"email\",\n\t\tRole: openai.AdminOrganizationInviteNewParamsRoleReader,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", invite.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.invites.Invite;\nimport com.openai.models.admin.organization.invites.InviteCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n InviteCreateParams params = InviteCreateParams.builder()\n .email(\"email\")\n .role(InviteCreateParams.Role.READER)\n .build();\n Invite invite = client.admin().organization().invites().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ninvite = openai.admin.organization.invites.create(email: \"email\", role: :reader)\n\nputs(invite)" + }, + "response": "{\n \"object\": \"organization.invite\",\n \"id\": \"invite-def\",\n \"email\": \"anotheruser@example.com\",\n \"role\": \"reader\",\n \"status\": \"pending\",\n \"created_at\": 1711471533,\n \"expires_at\": 1711471533,\n \"accepted_at\": null,\n \"projects\": [\n {\n \"id\": \"project-xyz\",\n \"role\": \"member\"\n },\n {\n \"id\": \"project-abc\",\n \"role\": \"owner\"\n }\n ]\n}\n" + } + } + } + }, + "/organization/invites/{invite_id}": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Retrieves an invite.", + "operationId": "retrieve-invite", + "tags": [ + "Invites" + ], + "parameters": [ + { + "in": "path", + "name": "invite_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the invite to retrieve." + } + ], + "responses": { + "200": { + "description": "Invite retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invite" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve invite", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/invites/invite-abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst invite = await client.admin.organization.invites.retrieve('invite_id');\n\nconsole.log(invite.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ninvite = client.admin.organization.invites.retrieve(\n \"invite_id\",\n)\nprint(invite.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tinvite, err := client.Admin.Organization.Invites.Get(context.TODO(), \"invite_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", invite.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.invites.Invite;\nimport com.openai.models.admin.organization.invites.InviteRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Invite invite = client.admin().organization().invites().retrieve(\"invite_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ninvite = openai.admin.organization.invites.retrieve(\"invite_id\")\n\nputs(invite)" + }, + "response": "{\n \"object\": \"organization.invite\",\n \"id\": \"invite-abc\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"status\": \"accepted\",\n \"created_at\": 1711471533,\n \"expires_at\": 1711471533,\n \"accepted_at\": 1711471533\n}\n" + } + } + }, + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Delete an invite. If the invite has already been accepted, it cannot be deleted.", + "operationId": "delete-invite", + "tags": [ + "Invites" + ], + "parameters": [ + { + "in": "path", + "name": "invite_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the invite to delete." + } + ], + "responses": { + "200": { + "description": "Invite deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteDeleteResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete invite", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/invites/invite-abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst invite = await client.admin.organization.invites.delete('invite_id');\n\nconsole.log(invite.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ninvite = client.admin.organization.invites.delete(\n \"invite_id\",\n)\nprint(invite.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tinvite, err := client.Admin.Organization.Invites.Delete(context.TODO(), \"invite_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", invite.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.invites.InviteDeleteParams;\nimport com.openai.models.admin.organization.invites.InviteDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n InviteDeleteResponse invite = client.admin().organization().invites().delete(\"invite_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ninvite = openai.admin.organization.invites.delete(\"invite_id\")\n\nputs(invite)" + }, + "response": "{\n \"object\": \"organization.invite.deleted\",\n \"id\": \"invite-abc\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/projects": { + "get": { + "summary": "Returns a list of projects.", + "operationId": "list-projects", + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "include_archived", + "in": "query", + "schema": { + "type": "boolean", + "default": false + }, + "description": "If `true` returns all projects including those that have been `archived`. Archived projects are not included by default." + } + ], + "responses": { + "200": { + "description": "Projects listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectListResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List projects", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects?after=proj_abc&limit=20&include_archived=false \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const project of client.admin.organization.projects.list()) {\n console.log(project.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.list()\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.List(context.TODO(), openai.AdminOrganizationProjectListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.ProjectListPage;\nimport com.openai.models.admin.organization.projects.ProjectListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ProjectListPage page = client.admin().organization().projects().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project example\",\n \"created_at\": 1711471533,\n \"archived_at\": null,\n \"status\": \"active\"\n }\n ],\n \"first_id\": \"proj-abc\",\n \"last_id\": \"proj-xyz\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "summary": "Create a new project in the organization. Projects can be created and archived, but cannot be deleted.", + "operationId": "create-project", + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "tags": [ + "Projects" + ], + "requestBody": { + "description": "The project create request payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectCreateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Project created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create project", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/projects \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Project ABC\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.admin.organization.projects.create({ name: 'name' });\n\nconsole.log(project.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject = client.admin.organization.projects.create(\n name=\"name\",\n)\nprint(project.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tproject, err := client.Admin.Organization.Projects.New(context.TODO(), openai.AdminOrganizationProjectNewParams{\n\t\tName: \"name\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", project.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.Project;\nimport com.openai.models.admin.organization.projects.ProjectCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ProjectCreateParams params = ProjectCreateParams.builder()\n .name(\"name\")\n .build();\n Project project = client.admin().organization().projects().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject = openai.admin.organization.projects.create(name: \"name\")\n\nputs(project)" + }, + "response": "{\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project ABC\",\n \"created_at\": 1711471533,\n \"archived_at\": null,\n \"status\": \"active\"\n}\n" + } + } + } + }, + "/organization/projects/{project_id}": { + "get": { + "summary": "Retrieves a project.", + "operationId": "retrieve-project", + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve project", + "group": "administration", + "description": "Retrieve a project.", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.admin.organization.projects.retrieve('project_id');\n\nconsole.log(project.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject = client.admin.organization.projects.retrieve(\n \"project_id\",\n)\nprint(project.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tproject, err := client.Admin.Organization.Projects.Get(context.TODO(), \"project_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", project.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.Project;\nimport com.openai.models.admin.organization.projects.ProjectRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Project project = client.admin().organization().projects().retrieve(\"project_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject = openai.admin.organization.projects.retrieve(\"project_id\")\n\nputs(project)" + }, + "response": "{\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project example\",\n \"created_at\": 1711471533,\n \"archived_at\": null,\n \"status\": \"active\"\n}\n" + } + } + }, + "post": { + "summary": "Modifies a project in the organization.", + "operationId": "modify-project", + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The project update request payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Project updated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + }, + "400": { + "description": "Error response when updating the default project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Modify project", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Project DEF\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.admin.organization.projects.update('project_id');\n\nconsole.log(project.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject = client.admin.organization.projects.update(\n project_id=\"project_id\",\n)\nprint(project.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tproject, err := client.Admin.Organization.Projects.Update(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", project.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.Project;\nimport com.openai.models.admin.organization.projects.ProjectUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Project project = client.admin().organization().projects().update(\"project_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject = openai.admin.organization.projects.update(\"project_id\")\n\nputs(project)" + }, + "response": "" + } + } + } + }, + "/organization/projects/{project_id}/api_keys": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Returns a list of API keys in the project.", + "operationId": "list-project-api-keys", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project API keys listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectApiKeyListResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List project API keys", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys?after=key_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const projectAPIKey of client.admin.organization.projects.apiKeys.list('project_id')) {\n console.log(projectAPIKey.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.api_keys.list(\n project_id=\"project_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.APIKeys.List(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectAPIKeyListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.apikeys.ApiKeyListPage;\nimport com.openai.models.admin.organization.projects.apikeys.ApiKeyListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ApiKeyListPage page = client.admin().organization().projects().apiKeys().list(\"project_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.api_keys.list(\"project_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.api_key\",\n \"redacted_value\": \"sk-abc...def\",\n \"name\": \"My API Key\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"id\": \"key_abc\",\n \"owner\": {\n \"type\": \"user\",\n \"user\": {\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"created_at\": 1711471533\n }\n }\n }\n ],\n \"first_id\": \"key_abc\",\n \"last_id\": \"key_xyz\",\n \"has_more\": false\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/api_keys/{api_key_id}": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Retrieves an API key in the project.", + "operationId": "retrieve-project-api-key", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key_id", + "in": "path", + "description": "The ID of the API key.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project API key retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectApiKey" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve project API key", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst projectAPIKey = await client.admin.organization.projects.apiKeys.retrieve('api_key_id', {\n project_id: 'project_id',\n});\n\nconsole.log(projectAPIKey.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject_api_key = client.admin.organization.projects.api_keys.retrieve(\n api_key_id=\"api_key_id\",\n project_id=\"project_id\",\n)\nprint(project_api_key.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tprojectAPIKey, err := client.Admin.Organization.Projects.APIKeys.Get(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"api_key_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", projectAPIKey.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.apikeys.ApiKeyRetrieveParams;\nimport com.openai.models.admin.organization.projects.apikeys.ProjectApiKey;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ApiKeyRetrieveParams params = ApiKeyRetrieveParams.builder()\n .projectId(\"project_id\")\n .apiKeyId(\"api_key_id\")\n .build();\n ProjectApiKey projectApiKey = client.admin().organization().projects().apiKeys().retrieve(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject_api_key = openai.admin.organization.projects.api_keys.retrieve(\"api_key_id\", project_id: \"project_id\")\n\nputs(project_api_key)" + }, + "response": "{\n \"object\": \"organization.project.api_key\",\n \"redacted_value\": \"sk-abc...def\",\n \"name\": \"My API Key\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"id\": \"key_abc\",\n \"owner\": {\n \"type\": \"user\",\n \"user\": {\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"created_at\": 1711471533\n }\n }\n}\n" + } + } + }, + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Deletes an API key from the project.\n\nReturns confirmation of the key deletion, or an error if the key belonged to\na service account.\n", + "operationId": "delete-project-api-key", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api_key_id", + "in": "path", + "description": "The ID of the API key.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project API key deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectApiKeyDeleteResponse" + } + } + } + }, + "400": { + "description": "Error response for various conditions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete project API key", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.admin.organization.projects.apiKeys.delete('api_key_id', {\n project_id: 'project_id',\n});\n\nconsole.log(apiKey.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\napi_key = client.admin.organization.projects.api_keys.delete(\n api_key_id=\"api_key_id\",\n project_id=\"project_id\",\n)\nprint(api_key.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tapiKey, err := client.Admin.Organization.Projects.APIKeys.Delete(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"api_key_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", apiKey.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.apikeys.ApiKeyDeleteParams;\nimport com.openai.models.admin.organization.projects.apikeys.ApiKeyDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ApiKeyDeleteParams params = ApiKeyDeleteParams.builder()\n .projectId(\"project_id\")\n .apiKeyId(\"api_key_id\")\n .build();\n ApiKeyDeleteResponse apiKey = client.admin().organization().projects().apiKeys().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\napi_key = openai.admin.organization.projects.api_keys.delete(\"api_key_id\", project_id: \"project_id\")\n\nputs(api_key)" + }, + "response": "{\n \"object\": \"organization.project.api_key.deleted\",\n \"id\": \"key_abc\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/archive": { + "post": { + "summary": "Archives a project in the organization. Archived projects cannot be used or updated.", + "operationId": "archive-project", + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project archived successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Archive project", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/archive \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.admin.organization.projects.archive('project_id');\n\nconsole.log(project.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject = client.admin.organization.projects.archive(\n \"project_id\",\n)\nprint(project.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tproject, err := client.Admin.Organization.Projects.Archive(context.TODO(), \"project_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", project.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.Project;\nimport com.openai.models.admin.organization.projects.ProjectArchiveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Project project = client.admin().organization().projects().archive(\"project_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject = openai.admin.organization.projects.archive(\"project_id\")\n\nputs(project)" + }, + "response": "{\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project DEF\",\n \"created_at\": 1711471533,\n \"archived_at\": 1711471533,\n \"status\": \"archived\"\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/certificates": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "List certificates for this project.", + "operationId": "listProjectCertificates", + "tags": [ + "Certificates" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ] + } + } + ], + "responses": { + "200": { + "description": "Certificates listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListProjectCertificatesResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List project certificates", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateListResponse of client.admin.organization.projects.certificates.list(\n 'project_id',\n)) {\n console.log(certificateListResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.certificates.list(\n project_id=\"project_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.Certificates.List(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectCertificateListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.certificates.CertificateListPage;\nimport com.openai.models.admin.organization.projects.certificates.CertificateListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CertificateListPage page = client.admin().organization().projects().certificates().list(\"project_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.certificates.list(\"project_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n \"first_id\": \"cert_abc\",\n \"last_id\": \"cert_abc\",\n \"has_more\": false\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/certificates/activate": { + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Activate certificates at the project level.\n\nYou can atomically and idempotently activate up to 10 certificates at a time.\n", + "operationId": "activateProjectCertificates", + "tags": [ + "Certificates" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The certificate activation payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToggleCertificatesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Certificates activated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProjectCertificateActivationResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Activate certificates for project", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/activate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"certificate_ids\": [\"cert_abc\", \"cert_def\"]\n}'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateActivateResponse of client.admin.organization.projects.certificates.activate(\n 'project_id',\n { certificate_ids: ['cert_abc'] },\n)) {\n console.log(certificateActivateResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.certificates.activate(\n project_id=\"project_id\",\n certificate_ids=[\"cert_abc\"],\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.Certificates.Activate(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectCertificateActivateParams{\n\t\t\tCertificateIDs: []string{\"cert_abc\"},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.certificates.CertificateActivatePage;\nimport com.openai.models.admin.organization.projects.certificates.CertificateActivateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CertificateActivateParams params = CertificateActivateParams.builder()\n .projectId(\"project_id\")\n .addCertificateId(\"cert_abc\")\n .build();\n CertificateActivatePage page = client.admin().organization().projects().certificates().activate(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.certificates.activate(\"project_id\", certificate_ids: [\"cert_abc\"])\n\nputs(page)" + }, + "response": "{\n \"object\": \"organization.project.certificate.activation\",\n \"data\": [\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_def\",\n \"name\": \"My Example Certificate 2\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/certificates/deactivate": { + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Deactivate certificates at the project level. You can atomically and \nidempotently deactivate up to 10 certificates at a time.\n", + "operationId": "deactivateProjectCertificates", + "tags": [ + "Certificates" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The certificate deactivation payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToggleCertificatesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Certificates deactivated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProjectCertificateDeactivationResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Deactivate certificates for project", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/deactivate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"certificate_ids\": [\"cert_abc\", \"cert_def\"]\n}'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const certificateDeactivateResponse of client.admin.organization.projects.certificates.deactivate(\n 'project_id',\n { certificate_ids: ['cert_abc'] },\n)) {\n console.log(certificateDeactivateResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.certificates.deactivate(\n project_id=\"project_id\",\n certificate_ids=[\"cert_abc\"],\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.Certificates.Deactivate(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectCertificateDeactivateParams{\n\t\t\tCertificateIDs: []string{\"cert_abc\"},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.certificates.CertificateDeactivatePage;\nimport com.openai.models.admin.organization.projects.certificates.CertificateDeactivateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CertificateDeactivateParams params = CertificateDeactivateParams.builder()\n .projectId(\"project_id\")\n .addCertificateId(\"cert_abc\")\n .build();\n CertificateDeactivatePage page = client.admin().organization().projects().certificates().deactivate(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.certificates.deactivate(\"project_id\", certificate_ids: [\"cert_abc\"])\n\nputs(page)" + }, + "response": "{\n \"object\": \"organization.project.certificate.deactivation\",\n \"data\": [\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": false,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_def\",\n \"name\": \"My Example Certificate 2\",\n \"active\": false,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/groups": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Lists the groups that have access to a project.", + "operationId": "list-project-groups", + "tags": [ + "Project groups" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to inspect.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of project groups to return. Defaults to 20.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "default": 20 + } + }, + { + "name": "after", + "in": "query", + "description": "Cursor for pagination. Provide the ID of the last group from the previous response to fetch the next page.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for the returned groups.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + } + ], + "responses": { + "200": { + "description": "Project groups listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectGroupListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List project groups", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc123/groups?limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const projectGroup of client.admin.organization.projects.groups.list('project_id')) {\n console.log(projectGroup.group_id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.groups.list(\n project_id=\"project_id\",\n)\npage = page.data[0]\nprint(page.group_id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.Groups.List(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectGroupListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.groups.GroupListPage;\nimport com.openai.models.admin.organization.projects.groups.GroupListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GroupListPage page = client.admin().organization().projects().groups().list(\"project_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.groups.list(\"project_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"project.group\",\n \"project_id\": \"proj_abc123\",\n \"group_id\": \"group_01J1F8ABCDXYZ\",\n \"group_name\": \"Support Team\",\n \"created_at\": 1711471533\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Grants a group access to a project.", + "operationId": "add-project-group", + "tags": [ + "Project groups" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Identifies the group and role to assign to the project.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteProjectGroupBody" + } + } + } + }, + "responses": { + "200": { + "description": "Group granted access to the project successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectGroup" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Add project group", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc123/groups \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"group_id\": \"group_01J1F8ABCDXYZ\",\n \"role\": \"role_01J1F8PROJ\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst projectGroup = await client.admin.organization.projects.groups.create('project_id', {\n group_id: 'group_id',\n role: 'role',\n});\n\nconsole.log(projectGroup.group_id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject_group = client.admin.organization.projects.groups.create(\n project_id=\"project_id\",\n group_id=\"group_id\",\n role=\"role\",\n)\nprint(project_group.group_id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tprojectGroup, err := client.Admin.Organization.Projects.Groups.New(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectGroupNewParams{\n\t\t\tGroupID: \"group_id\",\n\t\t\tRole: \"role\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", projectGroup.GroupID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.groups.GroupCreateParams;\nimport com.openai.models.admin.organization.projects.groups.ProjectGroup;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GroupCreateParams params = GroupCreateParams.builder()\n .projectId(\"project_id\")\n .groupId(\"group_id\")\n .role(\"role\")\n .build();\n ProjectGroup projectGroup = client.admin().organization().projects().groups().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject_group = openai.admin.organization.projects.groups.create(\"project_id\", group_id: \"group_id\", role: \"role\")\n\nputs(project_group)" + }, + "response": "{\n \"object\": \"project.group\",\n \"project_id\": \"proj_abc123\",\n \"group_id\": \"group_01J1F8ABCDXYZ\",\n \"group_name\": \"Support Team\",\n \"created_at\": 1711471533\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/groups/{group_id}": { + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Revokes a group's access to a project.", + "operationId": "remove-project-group", + "tags": [ + "Project groups" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to update.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "group_id", + "in": "path", + "description": "The ID of the group to remove from the project.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Group removed from the project successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectGroupDeletedResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Remove project group", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc123/groups/group_01J1F8ABCDXYZ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst group = await client.admin.organization.projects.groups.delete('group_id', {\n project_id: 'project_id',\n});\n\nconsole.log(group.deleted);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\ngroup = client.admin.organization.projects.groups.delete(\n group_id=\"group_id\",\n project_id=\"project_id\",\n)\nprint(group.deleted)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tgroup, err := client.Admin.Organization.Projects.Groups.Delete(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"group_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", group.Deleted)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.groups.GroupDeleteParams;\nimport com.openai.models.admin.organization.projects.groups.GroupDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GroupDeleteParams params = GroupDeleteParams.builder()\n .projectId(\"project_id\")\n .groupId(\"group_id\")\n .build();\n GroupDeleteResponse group = client.admin().organization().projects().groups().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\ngroup = openai.admin.organization.projects.groups.delete(\"group_id\", project_id: \"project_id\")\n\nputs(group)" + }, + "response": "{\n \"object\": \"project.group.deleted\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/rate_limits": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Returns the rate limits per model for a project.", + "operationId": "list-project-rate-limits", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. The default is 100.\n", + "required": false, + "schema": { + "type": "integer", + "default": 100 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, beginning with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project rate limits listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectRateLimitListResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List project rate limits", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc/rate_limits?after=rl_xxx&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const projectRateLimit of client.admin.organization.projects.rateLimits.listRateLimits(\n 'project_id',\n)) {\n console.log(projectRateLimit.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.rate_limits.list_rate_limits(\n project_id=\"project_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.RateLimits.ListRateLimits(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectRateLimitListRateLimitsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.ratelimits.RateLimitListRateLimitsPage;\nimport com.openai.models.admin.organization.projects.ratelimits.RateLimitListRateLimitsParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RateLimitListRateLimitsPage page = client.admin().organization().projects().rateLimits().listRateLimits(\"project_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.rate_limits.list_rate_limits(\"project_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"project.rate_limit\",\n \"id\": \"rl-ada\",\n \"model\": \"ada\",\n \"max_requests_per_1_minute\": 600,\n \"max_tokens_per_1_minute\": 150000,\n \"max_images_per_1_minute\": 10\n }\n ],\n \"first_id\": \"rl-ada\",\n \"last_id\": \"rl-ada\",\n \"has_more\": false\n}\n", + "error_response": "{\n \"code\": 404,\n \"message\": \"The project {project_id} was not found\"\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/rate_limits/{rate_limit_id}": { + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Updates a project rate limit.", + "operationId": "update-project-rate-limits", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "rate_limit_id", + "in": "path", + "description": "The ID of the rate limit.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The project rate limit update request payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectRateLimitUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Project rate limit updated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectRateLimit" + } + } + } + }, + "400": { + "description": "Error response for various conditions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Modify project rate limit", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/rate_limits/rl_xxx \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"max_requests_per_1_minute\": 500\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst projectRateLimit = await client.admin.organization.projects.rateLimits.updateRateLimit(\n 'rate_limit_id',\n { project_id: 'project_id' },\n);\n\nconsole.log(projectRateLimit.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject_rate_limit = client.admin.organization.projects.rate_limits.update_rate_limit(\n rate_limit_id=\"rate_limit_id\",\n project_id=\"project_id\",\n)\nprint(project_rate_limit.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tprojectRateLimit, err := client.Admin.Organization.Projects.RateLimits.UpdateRateLimit(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"rate_limit_id\",\n\t\topenai.AdminOrganizationProjectRateLimitUpdateRateLimitParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", projectRateLimit.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.ratelimits.ProjectRateLimit;\nimport com.openai.models.admin.organization.projects.ratelimits.RateLimitUpdateRateLimitParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RateLimitUpdateRateLimitParams params = RateLimitUpdateRateLimitParams.builder()\n .projectId(\"project_id\")\n .rateLimitId(\"rate_limit_id\")\n .build();\n ProjectRateLimit projectRateLimit = client.admin().organization().projects().rateLimits().updateRateLimit(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject_rate_limit = openai.admin.organization.projects.rate_limits.update_rate_limit(\n \"rate_limit_id\",\n project_id: \"project_id\"\n)\n\nputs(project_rate_limit)" + }, + "response": "{\n \"object\": \"project.rate_limit\",\n \"id\": \"rl-ada\",\n \"model\": \"ada\",\n \"max_requests_per_1_minute\": 600,\n \"max_tokens_per_1_minute\": 150000,\n \"max_images_per_1_minute\": 10\n }\n", + "error_response": "{\n \"code\": 404,\n \"message\": \"The project {project_id} was not found\"\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/service_accounts": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Returns a list of service accounts in the project.", + "operationId": "list-project-service-accounts", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project service accounts listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectServiceAccountListResponse" + } + } + } + }, + "400": { + "description": "Error response when project is archived.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List project service accounts", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts?after=custom_id&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const projectServiceAccount of client.admin.organization.projects.serviceAccounts.list(\n 'project_id',\n)) {\n console.log(projectServiceAccount.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.service_accounts.list(\n project_id=\"project_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.ServiceAccounts.List(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectServiceAccountListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.serviceaccounts.ServiceAccountListPage;\nimport com.openai.models.admin.organization.projects.serviceaccounts.ServiceAccountListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ServiceAccountListPage page = client.admin().organization().projects().serviceAccounts().list(\"project_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.service_accounts.list(\"project_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.service_account\",\n \"id\": \"svc_acct_abc\",\n \"name\": \"Service Account\",\n \"role\": \"owner\",\n \"created_at\": 1711471533\n }\n ],\n \"first_id\": \"svc_acct_abc\",\n \"last_id\": \"svc_acct_xyz\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Creates a new service account in the project. This also returns an unredacted API key for the service account.", + "operationId": "create-project-service-account", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The project service account create request payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectServiceAccountCreateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Project service account created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectServiceAccountCreateResponse" + } + } + } + }, + "400": { + "description": "Error response when project is archived.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create project service account", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Production App\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst serviceAccount = await client.admin.organization.projects.serviceAccounts.create(\n 'project_id',\n { name: 'name' },\n);\n\nconsole.log(serviceAccount.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nservice_account = client.admin.organization.projects.service_accounts.create(\n project_id=\"project_id\",\n name=\"name\",\n)\nprint(service_account.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tserviceAccount, err := client.Admin.Organization.Projects.ServiceAccounts.New(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectServiceAccountNewParams{\n\t\t\tName: \"name\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", serviceAccount.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.serviceaccounts.ServiceAccountCreateParams;\nimport com.openai.models.admin.organization.projects.serviceaccounts.ServiceAccountCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ServiceAccountCreateParams params = ServiceAccountCreateParams.builder()\n .projectId(\"project_id\")\n .name(\"name\")\n .build();\n ServiceAccountCreateResponse serviceAccount = client.admin().organization().projects().serviceAccounts().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nservice_account = openai.admin.organization.projects.service_accounts.create(\"project_id\", name: \"name\")\n\nputs(service_account)" + }, + "response": "{\n \"object\": \"organization.project.service_account\",\n \"id\": \"svc_acct_abc\",\n \"name\": \"Production App\",\n \"role\": \"member\",\n \"created_at\": 1711471533,\n \"api_key\": {\n \"object\": \"organization.project.service_account.api_key\",\n \"value\": \"sk-abcdefghijklmnop123\",\n \"name\": \"Secret Key\",\n \"created_at\": 1711471533,\n \"id\": \"key_abc\"\n }\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/service_accounts/{service_account_id}": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Retrieves a service account in the project.", + "operationId": "retrieve-project-service-account", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "service_account_id", + "in": "path", + "description": "The ID of the service account.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project service account retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectServiceAccount" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve project service account", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst projectServiceAccount = await client.admin.organization.projects.serviceAccounts.retrieve(\n 'service_account_id',\n { project_id: 'project_id' },\n);\n\nconsole.log(projectServiceAccount.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject_service_account = client.admin.organization.projects.service_accounts.retrieve(\n service_account_id=\"service_account_id\",\n project_id=\"project_id\",\n)\nprint(project_service_account.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tprojectServiceAccount, err := client.Admin.Organization.Projects.ServiceAccounts.Get(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"service_account_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", projectServiceAccount.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.serviceaccounts.ProjectServiceAccount;\nimport com.openai.models.admin.organization.projects.serviceaccounts.ServiceAccountRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ServiceAccountRetrieveParams params = ServiceAccountRetrieveParams.builder()\n .projectId(\"project_id\")\n .serviceAccountId(\"service_account_id\")\n .build();\n ProjectServiceAccount projectServiceAccount = client.admin().organization().projects().serviceAccounts().retrieve(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject_service_account = openai.admin.organization.projects.service_accounts.retrieve(\n \"service_account_id\",\n project_id: \"project_id\"\n)\n\nputs(project_service_account)" + }, + "response": "{\n \"object\": \"organization.project.service_account\",\n \"id\": \"svc_acct_abc\",\n \"name\": \"Service Account\",\n \"role\": \"owner\",\n \"created_at\": 1711471533\n}\n" + } + } + }, + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Deletes a service account from the project.\n\nReturns confirmation of service account deletion, or an error if the project\nis archived (archived projects have no service accounts).\n", + "operationId": "delete-project-service-account", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "service_account_id", + "in": "path", + "description": "The ID of the service account.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project service account deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectServiceAccountDeleteResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete project service account", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst serviceAccount = await client.admin.organization.projects.serviceAccounts.delete(\n 'service_account_id',\n { project_id: 'project_id' },\n);\n\nconsole.log(serviceAccount.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nservice_account = client.admin.organization.projects.service_accounts.delete(\n service_account_id=\"service_account_id\",\n project_id=\"project_id\",\n)\nprint(service_account.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tserviceAccount, err := client.Admin.Organization.Projects.ServiceAccounts.Delete(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"service_account_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", serviceAccount.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.serviceaccounts.ServiceAccountDeleteParams;\nimport com.openai.models.admin.organization.projects.serviceaccounts.ServiceAccountDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ServiceAccountDeleteParams params = ServiceAccountDeleteParams.builder()\n .projectId(\"project_id\")\n .serviceAccountId(\"service_account_id\")\n .build();\n ServiceAccountDeleteResponse serviceAccount = client.admin().organization().projects().serviceAccounts().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nservice_account = openai.admin.organization.projects.service_accounts.delete(\"service_account_id\", project_id: \"project_id\")\n\nputs(service_account)" + }, + "response": "{\n \"object\": \"organization.project.service_account.deleted\",\n \"id\": \"svc_acct_abc\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/users": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Returns a list of users in the project.", + "operationId": "list-project-users", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project users listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUserListResponse" + } + } + } + }, + "400": { + "description": "Error response when project is archived.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List project users", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc/users?after=user_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const projectUser of client.admin.organization.projects.users.list('project_id')) {\n console.log(projectUser.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.users.list(\n project_id=\"project_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.Users.List(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectUserListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.users.UserListPage;\nimport com.openai.models.admin.organization.projects.users.UserListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UserListPage page = client.admin().organization().projects().users().list(\"project_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.users.list(\"project_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n ],\n \"first_id\": \"user-abc\",\n \"last_id\": \"user-xyz\",\n \"has_more\": false\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Adds a user to the project. Users must already be members of the organization to be added to a project.", + "operationId": "create-project-user", + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Projects" + ], + "requestBody": { + "description": "The project user create request payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUserCreateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "User added to project successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUser" + } + } + } + }, + "400": { + "description": "Error response for various conditions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create project user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"user_abc\",\n \"role\": \"member\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst projectUser = await client.admin.organization.projects.users.create('project_id', {\n role: 'role',\n});\n\nconsole.log(projectUser.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject_user = client.admin.organization.projects.users.create(\n project_id=\"project_id\",\n role=\"role\",\n)\nprint(project_user.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tprojectUser, err := client.Admin.Organization.Projects.Users.New(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectUserNewParams{\n\t\t\tRole: \"role\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", projectUser.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.users.ProjectUser;\nimport com.openai.models.admin.organization.projects.users.UserCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UserCreateParams params = UserCreateParams.builder()\n .projectId(\"project_id\")\n .role(\"role\")\n .build();\n ProjectUser projectUser = client.admin().organization().projects().users().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject_user = openai.admin.organization.projects.users.create(\"project_id\", role: \"role\")\n\nputs(project_user)" + }, + "response": "{\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" + } + } + } + }, + "/organization/projects/{project_id}/users/{user_id}": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Retrieves a user in the project.", + "operationId": "retrieve-project-user", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "path", + "description": "The ID of the user.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project user retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUser" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve project user", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst projectUser = await client.admin.organization.projects.users.retrieve('user_id', {\n project_id: 'project_id',\n});\n\nconsole.log(projectUser.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject_user = client.admin.organization.projects.users.retrieve(\n user_id=\"user_id\",\n project_id=\"project_id\",\n)\nprint(project_user.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tprojectUser, err := client.Admin.Organization.Projects.Users.Get(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"user_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", projectUser.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.users.ProjectUser;\nimport com.openai.models.admin.organization.projects.users.UserRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UserRetrieveParams params = UserRetrieveParams.builder()\n .projectId(\"project_id\")\n .userId(\"user_id\")\n .build();\n ProjectUser projectUser = client.admin().organization().projects().users().retrieve(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject_user = openai.admin.organization.projects.users.retrieve(\"user_id\", project_id: \"project_id\")\n\nputs(project_user)" + }, + "response": "{\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Modifies a user's role in the project.", + "operationId": "modify-project-user", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "path", + "description": "The ID of the user.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The project user update request payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUserUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Project user's role updated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUser" + } + } + } + }, + "400": { + "description": "Error response for various conditions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Modify project user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role\": \"owner\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst projectUser = await client.admin.organization.projects.users.update('user_id', {\n project_id: 'project_id',\n});\n\nconsole.log(projectUser.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nproject_user = client.admin.organization.projects.users.update(\n user_id=\"user_id\",\n project_id=\"project_id\",\n)\nprint(project_user.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tprojectUser, err := client.Admin.Organization.Projects.Users.Update(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"user_id\",\n\t\topenai.AdminOrganizationProjectUserUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", projectUser.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.users.ProjectUser;\nimport com.openai.models.admin.organization.projects.users.UserUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UserUpdateParams params = UserUpdateParams.builder()\n .projectId(\"project_id\")\n .userId(\"user_id\")\n .build();\n ProjectUser projectUser = client.admin().organization().projects().users().update(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nproject_user = openai.admin.organization.projects.users.update(\"user_id\", project_id: \"project_id\")\n\nputs(project_user)" + }, + "response": "{\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" + } + } + }, + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Deletes a user from the project.\n\nReturns confirmation of project user deletion, or an error if the project is\narchived (archived projects have no users).\n", + "operationId": "delete-project-user", + "tags": [ + "Projects" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "path", + "description": "The ID of the user.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project user deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUserDeleteResponse" + } + } + } + }, + "400": { + "description": "Error response for various conditions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete project user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.admin.organization.projects.users.delete('user_id', {\n project_id: 'project_id',\n});\n\nconsole.log(user.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nuser = client.admin.organization.projects.users.delete(\n user_id=\"user_id\",\n project_id=\"project_id\",\n)\nprint(user.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tuser, err := client.Admin.Organization.Projects.Users.Delete(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"user_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", user.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.users.UserDeleteParams;\nimport com.openai.models.admin.organization.projects.users.UserDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UserDeleteParams params = UserDeleteParams.builder()\n .projectId(\"project_id\")\n .userId(\"user_id\")\n .build();\n UserDeleteResponse user = client.admin().organization().projects().users().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nuser = openai.admin.organization.projects.users.delete(\"user_id\", project_id: \"project_id\")\n\nputs(user)" + }, + "response": "{\n \"object\": \"organization.project.user.deleted\",\n \"id\": \"user_abc\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/roles": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Lists the roles configured for the organization.", + "operationId": "list-roles", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit on the number of roles to return. Defaults to 1000.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000, + "default": 1000 + } + }, + { + "name": "after", + "in": "query", + "description": "Cursor for pagination. Provide the value from the previous response's `next` field to continue listing roles.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for the returned roles.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + } + ], + "responses": { + "200": { + "description": "Roles listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicRoleListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List organization roles", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/roles?limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const role of client.admin.organization.roles.list()) {\n console.log(role.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.roles.list()\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Roles.List(context.TODO(), openai.AdminOrganizationRoleListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.roles.RoleListPage;\nimport com.openai.models.admin.organization.roles.RoleListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleListPage page = client.admin().organization().roles().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.roles.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"role\",\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"description\": \"Allows managing organization groups\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Creates a custom role for the organization.", + "operationId": "create-role", + "tags": [ + "Roles" + ], + "requestBody": { + "description": "Parameters for the role you want to create.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicCreateOrganizationRoleBody" + } + } + } + }, + "responses": { + "200": { + "description": "Role created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create organization role", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_name\": \"API Group Manager\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"description\": \"Allows managing organization groups\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.roles.create({\n permissions: ['string'],\n role_name: 'role_name',\n});\n\nconsole.log(role.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.roles.create(\n permissions=[\"string\"],\n role_name=\"role_name\",\n)\nprint(role.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Roles.New(context.TODO(), openai.AdminOrganizationRoleNewParams{\n\t\tPermissions: []string{\"string\"},\n\t\tRoleName: \"role_name\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.roles.Role;\nimport com.openai.models.admin.organization.roles.RoleCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleCreateParams params = RoleCreateParams.builder()\n .addPermission(\"string\")\n .roleName(\"role_name\")\n .build();\n Role role = client.admin().organization().roles().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.roles.create(permissions: [\"string\"], role_name: \"role_name\")\n\nputs(role)" + }, + "response": "{\n \"object\": \"role\",\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"description\": \"Allows managing organization groups\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false\n}\n" + } + } + } + }, + "/organization/roles/{role_id}": { + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Updates an existing organization role.", + "operationId": "update-role", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "role_id", + "in": "path", + "description": "The ID of the role to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Fields to update on the role.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicUpdateOrganizationRoleBody" + } + } + } + }, + "responses": { + "200": { + "description": "Role updated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Update organization role", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/roles/role_01J1F8ROLE01 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_name\": \"API Group Manager\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"description\": \"Allows managing organization groups\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.roles.update('role_id');\n\nconsole.log(role.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.roles.update(\n role_id=\"role_id\",\n)\nprint(role.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Roles.Update(\n\t\tcontext.TODO(),\n\t\t\"role_id\",\n\t\topenai.AdminOrganizationRoleUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.roles.Role;\nimport com.openai.models.admin.organization.roles.RoleUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Role role = client.admin().organization().roles().update(\"role_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.roles.update(\"role_id\")\n\nputs(role)" + }, + "response": "{\n \"object\": \"role\",\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"description\": \"Allows managing organization groups\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false\n}\n" + } + } + }, + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Deletes a custom role from the organization.", + "operationId": "delete-role", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "role_id", + "in": "path", + "description": "The ID of the role to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Role deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleDeletedResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete organization role", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/roles/role_01J1F8ROLE01 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.roles.delete('role_id');\n\nconsole.log(role.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.roles.delete(\n \"role_id\",\n)\nprint(role.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Roles.Delete(context.TODO(), \"role_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.roles.RoleDeleteParams;\nimport com.openai.models.admin.organization.roles.RoleDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleDeleteResponse role = client.admin().organization().roles().delete(\"role_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.roles.delete(\"role_id\")\n\nputs(role)" + }, + "response": "{\n \"object\": \"role.deleted\",\n \"id\": \"role_01J1F8ROLE01\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/usage/audio_speeches": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Get audio speeches usage details for the organization.", + "operationId": "usage-audio-speeches", + "tags": [ + "Usage" + ], + "parameters": [ + { + "name": "start_time", + "in": "query", + "description": "Start time (Unix seconds) of the query time range, inclusive.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "end_time", + "in": "query", + "description": "End time (Unix seconds) of the query time range, exclusive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "bucket_width", + "in": "query", + "description": "Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "1m", + "1h", + "1d" + ], + "default": "1d" + } + }, + { + "name": "project_ids", + "in": "query", + "description": "Return only usage for these projects.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "user_ids", + "in": "query", + "description": "Return only usage for these users.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "api_key_ids", + "in": "query", + "description": "Return only usage for these API keys.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "models", + "in": "query", + "description": "Return only usage for these models.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_by", + "in": "query", + "description": "Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "project_id", + "user_id", + "api_key_id", + "model" + ] + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Usage data retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Audio speeches", + "group": "usage-audio-speeches", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/organization/usage/audio_speeches?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.admin.organization.usage.audioSpeeches({ start_time: 0 });\n\nconsole.log(response.data);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nresponse = client.admin.organization.usage.audio_speeches(\n start_time=0,\n)\nprint(response.data)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tresponse, err := client.Admin.Organization.Usage.AudioSpeeches(context.TODO(), openai.AdminOrganizationUsageAudioSpeechesParams{\n\t\tStartTime: 0,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.usage.UsageAudioSpeechesParams;\nimport com.openai.models.admin.organization.usage.UsageAudioSpeechesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UsageAudioSpeechesParams params = UsageAudioSpeechesParams.builder()\n .startTime(0L)\n .build();\n UsageAudioSpeechesResponse response = client.admin().organization().usage().audioSpeeches(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nresponse = openai.admin.organization.usage.audio_speeches(start_time: 0)\n\nputs(response)" + }, + "response": "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.audio_speeches.result\",\n \"characters\": 45,\n \"num_model_requests\": 1,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + } + } + } + }, + "/organization/usage/audio_transcriptions": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Get audio transcriptions usage details for the organization.", + "operationId": "usage-audio-transcriptions", + "tags": [ + "Usage" + ], + "parameters": [ + { + "name": "start_time", + "in": "query", + "description": "Start time (Unix seconds) of the query time range, inclusive.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "end_time", + "in": "query", + "description": "End time (Unix seconds) of the query time range, exclusive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "bucket_width", + "in": "query", + "description": "Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "1m", + "1h", + "1d" + ], + "default": "1d" + } + }, + { + "name": "project_ids", + "in": "query", + "description": "Return only usage for these projects.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "user_ids", + "in": "query", + "description": "Return only usage for these users.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "api_key_ids", + "in": "query", + "description": "Return only usage for these API keys.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "models", + "in": "query", + "description": "Return only usage for these models.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_by", + "in": "query", + "description": "Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "project_id", + "user_id", + "api_key_id", + "model" + ] + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Usage data retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Audio transcriptions", + "group": "usage-audio-transcriptions", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/organization/usage/audio_transcriptions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.admin.organization.usage.audioTranscriptions({ start_time: 0 });\n\nconsole.log(response.data);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nresponse = client.admin.organization.usage.audio_transcriptions(\n start_time=0,\n)\nprint(response.data)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tresponse, err := client.Admin.Organization.Usage.AudioTranscriptions(context.TODO(), openai.AdminOrganizationUsageAudioTranscriptionsParams{\n\t\tStartTime: 0,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.usage.UsageAudioTranscriptionsParams;\nimport com.openai.models.admin.organization.usage.UsageAudioTranscriptionsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UsageAudioTranscriptionsParams params = UsageAudioTranscriptionsParams.builder()\n .startTime(0L)\n .build();\n UsageAudioTranscriptionsResponse response = client.admin().organization().usage().audioTranscriptions(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nresponse = openai.admin.organization.usage.audio_transcriptions(start_time: 0)\n\nputs(response)" + }, + "response": "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.audio_transcriptions.result\",\n \"seconds\": 20,\n \"num_model_requests\": 1,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + } + } + } + }, + "/organization/usage/code_interpreter_sessions": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Get code interpreter sessions usage details for the organization.", + "operationId": "usage-code-interpreter-sessions", + "tags": [ + "Usage" + ], + "parameters": [ + { + "name": "start_time", + "in": "query", + "description": "Start time (Unix seconds) of the query time range, inclusive.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "end_time", + "in": "query", + "description": "End time (Unix seconds) of the query time range, exclusive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "bucket_width", + "in": "query", + "description": "Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "1m", + "1h", + "1d" + ], + "default": "1d" + } + }, + { + "name": "project_ids", + "in": "query", + "description": "Return only usage for these projects.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_by", + "in": "query", + "description": "Group the usage data by the specified fields. Support fields include `project_id`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "project_id" + ] + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Usage data retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Code interpreter sessions", + "group": "usage-code-interpreter-sessions", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/organization/usage/code_interpreter_sessions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.admin.organization.usage.codeInterpreterSessions({ start_time: 0 });\n\nconsole.log(response.data);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nresponse = client.admin.organization.usage.code_interpreter_sessions(\n start_time=0,\n)\nprint(response.data)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tresponse, err := client.Admin.Organization.Usage.CodeInterpreterSessions(context.TODO(), openai.AdminOrganizationUsageCodeInterpreterSessionsParams{\n\t\tStartTime: 0,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.usage.UsageCodeInterpreterSessionsParams;\nimport com.openai.models.admin.organization.usage.UsageCodeInterpreterSessionsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UsageCodeInterpreterSessionsParams params = UsageCodeInterpreterSessionsParams.builder()\n .startTime(0L)\n .build();\n UsageCodeInterpreterSessionsResponse response = client.admin().organization().usage().codeInterpreterSessions(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nresponse = openai.admin.organization.usage.code_interpreter_sessions(start_time: 0)\n\nputs(response)" + }, + "response": "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.code_interpreter_sessions.result\",\n \"num_sessions\": 1,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + } + } + } + }, + "/organization/usage/completions": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Get completions usage details for the organization.", + "operationId": "usage-completions", + "tags": [ + "Usage" + ], + "parameters": [ + { + "name": "start_time", + "in": "query", + "description": "Start time (Unix seconds) of the query time range, inclusive.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "end_time", + "in": "query", + "description": "End time (Unix seconds) of the query time range, exclusive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "bucket_width", + "in": "query", + "description": "Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "1m", + "1h", + "1d" + ], + "default": "1d" + } + }, + { + "name": "project_ids", + "in": "query", + "description": "Return only usage for these projects.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "user_ids", + "in": "query", + "description": "Return only usage for these users.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "api_key_ids", + "in": "query", + "description": "Return only usage for these API keys.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "models", + "in": "query", + "description": "Return only usage for these models.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "batch", + "in": "query", + "description": "If `true`, return batch jobs only. If `false`, return non-batch jobs only. By default, return both.\n", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "group_by", + "in": "query", + "description": "Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier` or any combination of them.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "project_id", + "user_id", + "api_key_id", + "model", + "batch", + "service_tier" + ] + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Usage data retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Completions", + "group": "usage-completions", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/organization/usage/completions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.admin.organization.usage.completions({ start_time: 0 });\n\nconsole.log(response.data);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nresponse = client.admin.organization.usage.completions(\n start_time=0,\n)\nprint(response.data)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tresponse, err := client.Admin.Organization.Usage.Completions(context.TODO(), openai.AdminOrganizationUsageCompletionsParams{\n\t\tStartTime: 0,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.usage.UsageCompletionsParams;\nimport com.openai.models.admin.organization.usage.UsageCompletionsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UsageCompletionsParams params = UsageCompletionsParams.builder()\n .startTime(0L)\n .build();\n UsageCompletionsResponse response = client.admin().organization().usage().completions(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nresponse = openai.admin.organization.usage.completions(start_time: 0)\n\nputs(response)" + }, + "response": "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.completions.result\",\n \"input_tokens\": 1000,\n \"output_tokens\": 500,\n \"input_cached_tokens\": 800,\n \"input_audio_tokens\": 0,\n \"output_audio_tokens\": 0,\n \"num_model_requests\": 5,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null,\n \"batch\": null,\n \"service_tier\": null\n }\n ]\n }\n ],\n \"has_more\": true,\n \"next_page\": \"page_AAAAAGdGxdEiJdKOAAAAAGcqsYA=\"\n}\n" + } + } + } + }, + "/organization/usage/embeddings": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Get embeddings usage details for the organization.", + "operationId": "usage-embeddings", + "tags": [ + "Usage" + ], + "parameters": [ + { + "name": "start_time", + "in": "query", + "description": "Start time (Unix seconds) of the query time range, inclusive.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "end_time", + "in": "query", + "description": "End time (Unix seconds) of the query time range, exclusive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "bucket_width", + "in": "query", + "description": "Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "1m", + "1h", + "1d" + ], + "default": "1d" + } + }, + { + "name": "project_ids", + "in": "query", + "description": "Return only usage for these projects.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "user_ids", + "in": "query", + "description": "Return only usage for these users.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "api_key_ids", + "in": "query", + "description": "Return only usage for these API keys.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "models", + "in": "query", + "description": "Return only usage for these models.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_by", + "in": "query", + "description": "Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "project_id", + "user_id", + "api_key_id", + "model" + ] + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Usage data retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Embeddings", + "group": "usage-embeddings", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/organization/usage/embeddings?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.admin.organization.usage.embeddings({ start_time: 0 });\n\nconsole.log(response.data);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nresponse = client.admin.organization.usage.embeddings(\n start_time=0,\n)\nprint(response.data)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tresponse, err := client.Admin.Organization.Usage.Embeddings(context.TODO(), openai.AdminOrganizationUsageEmbeddingsParams{\n\t\tStartTime: 0,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.usage.UsageEmbeddingsParams;\nimport com.openai.models.admin.organization.usage.UsageEmbeddingsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UsageEmbeddingsParams params = UsageEmbeddingsParams.builder()\n .startTime(0L)\n .build();\n UsageEmbeddingsResponse response = client.admin().organization().usage().embeddings(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nresponse = openai.admin.organization.usage.embeddings(start_time: 0)\n\nputs(response)" + }, + "response": "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.embeddings.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + } + } + } + }, + "/organization/usage/images": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Get images usage details for the organization.", + "operationId": "usage-images", + "tags": [ + "Usage" + ], + "parameters": [ + { + "name": "start_time", + "in": "query", + "description": "Start time (Unix seconds) of the query time range, inclusive.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "end_time", + "in": "query", + "description": "End time (Unix seconds) of the query time range, exclusive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "bucket_width", + "in": "query", + "description": "Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "1m", + "1h", + "1d" + ], + "default": "1d" + } + }, + { + "name": "sources", + "in": "query", + "description": "Return only usages for these sources. Possible values are `image.generation`, `image.edit`, `image.variation` or any combination of them.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "image.generation", + "image.edit", + "image.variation" + ] + } + } + }, + { + "name": "sizes", + "in": "query", + "description": "Return only usages for these image sizes. Possible values are `256x256`, `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "256x256", + "512x512", + "1024x1024", + "1792x1792", + "1024x1792" + ] + } + } + }, + { + "name": "project_ids", + "in": "query", + "description": "Return only usage for these projects.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "user_ids", + "in": "query", + "description": "Return only usage for these users.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "api_key_ids", + "in": "query", + "description": "Return only usage for these API keys.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "models", + "in": "query", + "description": "Return only usage for these models.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_by", + "in": "query", + "description": "Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any combination of them.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "project_id", + "user_id", + "api_key_id", + "model", + "size", + "source" + ] + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Usage data retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Images", + "group": "usage-images", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/organization/usage/images?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.admin.organization.usage.images({ start_time: 0 });\n\nconsole.log(response.data);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nresponse = client.admin.organization.usage.images(\n start_time=0,\n)\nprint(response.data)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tresponse, err := client.Admin.Organization.Usage.Images(context.TODO(), openai.AdminOrganizationUsageImagesParams{\n\t\tStartTime: 0,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.usage.UsageImagesParams;\nimport com.openai.models.admin.organization.usage.UsageImagesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UsageImagesParams params = UsageImagesParams.builder()\n .startTime(0L)\n .build();\n UsageImagesResponse response = client.admin().organization().usage().images(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nresponse = openai.admin.organization.usage.images(start_time: 0)\n\nputs(response)" + }, + "response": "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.images.result\",\n \"images\": 2,\n \"num_model_requests\": 2,\n \"size\": null,\n \"source\": null,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + } + } + } + }, + "/organization/usage/moderations": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Get moderations usage details for the organization.", + "operationId": "usage-moderations", + "tags": [ + "Usage" + ], + "parameters": [ + { + "name": "start_time", + "in": "query", + "description": "Start time (Unix seconds) of the query time range, inclusive.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "end_time", + "in": "query", + "description": "End time (Unix seconds) of the query time range, exclusive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "bucket_width", + "in": "query", + "description": "Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "1m", + "1h", + "1d" + ], + "default": "1d" + } + }, + { + "name": "project_ids", + "in": "query", + "description": "Return only usage for these projects.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "user_ids", + "in": "query", + "description": "Return only usage for these users.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "api_key_ids", + "in": "query", + "description": "Return only usage for these API keys.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "models", + "in": "query", + "description": "Return only usage for these models.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_by", + "in": "query", + "description": "Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "project_id", + "user_id", + "api_key_id", + "model" + ] + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Usage data retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Moderations", + "group": "usage-moderations", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/organization/usage/moderations?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.admin.organization.usage.moderations({ start_time: 0 });\n\nconsole.log(response.data);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nresponse = client.admin.organization.usage.moderations(\n start_time=0,\n)\nprint(response.data)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tresponse, err := client.Admin.Organization.Usage.Moderations(context.TODO(), openai.AdminOrganizationUsageModerationsParams{\n\t\tStartTime: 0,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.usage.UsageModerationsParams;\nimport com.openai.models.admin.organization.usage.UsageModerationsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UsageModerationsParams params = UsageModerationsParams.builder()\n .startTime(0L)\n .build();\n UsageModerationsResponse response = client.admin().organization().usage().moderations(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nresponse = openai.admin.organization.usage.moderations(start_time: 0)\n\nputs(response)" + }, + "response": "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.moderations.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + } + } + } + }, + "/organization/usage/vector_stores": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Get vector stores usage details for the organization.", + "operationId": "usage-vector-stores", + "tags": [ + "Usage" + ], + "parameters": [ + { + "name": "start_time", + "in": "query", + "description": "Start time (Unix seconds) of the query time range, inclusive.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "end_time", + "in": "query", + "description": "End time (Unix seconds) of the query time range, exclusive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "bucket_width", + "in": "query", + "description": "Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "1m", + "1h", + "1d" + ], + "default": "1d" + } + }, + { + "name": "project_ids", + "in": "query", + "description": "Return only usage for these projects.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_by", + "in": "query", + "description": "Group the usage data by the specified fields. Support fields include `project_id`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "project_id" + ] + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Usage data retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Vector stores", + "group": "usage-vector-stores", + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/organization/usage/vector_stores?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.admin.organization.usage.vectorStores({ start_time: 0 });\n\nconsole.log(response.data);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nresponse = client.admin.organization.usage.vector_stores(\n start_time=0,\n)\nprint(response.data)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tresponse, err := client.Admin.Organization.Usage.VectorStores(context.TODO(), openai.AdminOrganizationUsageVectorStoresParams{\n\t\tStartTime: 0,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.usage.UsageVectorStoresParams;\nimport com.openai.models.admin.organization.usage.UsageVectorStoresResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UsageVectorStoresParams params = UsageVectorStoresParams.builder()\n .startTime(0L)\n .build();\n UsageVectorStoresResponse response = client.admin().organization().usage().vectorStores(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nresponse = openai.admin.organization.usage.vector_stores(start_time: 0)\n\nputs(response)" + }, + "response": "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.vector_stores.result\",\n \"usage_bytes\": 1024,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + } + } + } + }, + "/organization/users": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Lists all of the users in the organization.", + "operationId": "list-users", + "tags": [ + "Users" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "emails", + "in": "query", + "description": "Filter by the email address of users.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Users listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserListResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List users", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/users?after=user_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const organizationUser of client.admin.organization.users.list()) {\n console.log(organizationUser.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.users.list()\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Users.List(context.TODO(), openai.AdminOrganizationUserListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.users.UserListPage;\nimport com.openai.models.admin.organization.users.UserListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UserListPage page = client.admin().organization().users().list();\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.users.list\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n ],\n \"first_id\": \"user-abc\",\n \"last_id\": \"user-xyz\",\n \"has_more\": false\n}\n" + } + } + } + }, + "/organization/users/{user_id}": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Retrieves a user by their identifier.", + "operationId": "retrieve-user", + "tags": [ + "Users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "The ID of the user.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Retrieve user", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst organizationUser = await client.admin.organization.users.retrieve('user_id');\n\nconsole.log(organizationUser.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\norganization_user = client.admin.organization.users.retrieve(\n \"user_id\",\n)\nprint(organization_user.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\torganizationUser, err := client.Admin.Organization.Users.Get(context.TODO(), \"user_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", organizationUser.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.users.OrganizationUser;\nimport com.openai.models.admin.organization.users.UserRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n OrganizationUser organizationUser = client.admin().organization().users().retrieve(\"user_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\norganization_user = openai.admin.organization.users.retrieve(\"user_id\")\n\nputs(organization_user)" + }, + "response": "{\n \"object\": \"organization.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Modifies a user's role in the organization.", + "operationId": "modify-user", + "tags": [ + "Users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "The ID of the user.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The new user role to modify. This must be one of `owner` or `member`.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "User role updated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Modify user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role\": \"owner\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst organizationUser = await client.admin.organization.users.update('user_id');\n\nconsole.log(organizationUser.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\norganization_user = client.admin.organization.users.update(\n user_id=\"user_id\",\n)\nprint(organization_user.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\torganizationUser, err := client.Admin.Organization.Users.Update(\n\t\tcontext.TODO(),\n\t\t\"user_id\",\n\t\topenai.AdminOrganizationUserUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", organizationUser.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.users.OrganizationUser;\nimport com.openai.models.admin.organization.users.UserUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n OrganizationUser organizationUser = client.admin().organization().users().update(\"user_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\norganization_user = openai.admin.organization.users.update(\"user_id\")\n\nputs(organization_user)" + }, + "response": "{\n \"object\": \"organization.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" + } + } + }, + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Deletes a user from the organization.", + "operationId": "delete-user", + "tags": [ + "Users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "The ID of the user.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDeleteResponse" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.admin.organization.users.delete('user_id');\n\nconsole.log(user.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nuser = client.admin.organization.users.delete(\n \"user_id\",\n)\nprint(user.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tuser, err := client.Admin.Organization.Users.Delete(context.TODO(), \"user_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", user.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.users.UserDeleteParams;\nimport com.openai.models.admin.organization.users.UserDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UserDeleteResponse user = client.admin().organization().users().delete(\"user_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nuser = openai.admin.organization.users.delete(\"user_id\")\n\nputs(user)" + }, + "response": "{\n \"object\": \"organization.user.deleted\",\n \"id\": \"user_abc\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/organization/users/{user_id}/roles": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Lists the organization roles assigned to a user within the organization.", + "operationId": "list-user-role-assignments", + "tags": [ + "User organization role assignments" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "The ID of the user to inspect.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of organization role assignments to return.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000 + } + }, + { + "name": "after", + "in": "query", + "description": "Cursor for pagination. Provide the value from the previous response's `next` field to continue listing organization roles.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for the returned organization roles.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + } + ], + "responses": { + "200": { + "description": "User organization role assignments listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List user organization role assignments", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/organization/users/user_abc123/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const roleListResponse of client.admin.organization.users.roles.list('user_id')) {\n console.log(roleListResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.users.roles.list(\n user_id=\"user_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Users.Roles.List(\n\t\tcontext.TODO(),\n\t\t\"user_id\",\n\t\topenai.AdminOrganizationUserRoleListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.users.roles.RoleListPage;\nimport com.openai.models.admin.organization.users.roles.RoleListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleListPage page = client.admin().organization().users().roles().list(\"user_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.users.roles.list(\"user_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false,\n \"description\": \"Allows managing organization groups\",\n \"created_at\": 1711471533,\n \"updated_at\": 1711472599,\n \"created_by\": \"user_abc123\",\n \"created_by_user_obj\": {\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\"\n },\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Assigns an organization role to a user within the organization.", + "operationId": "assign-user-role", + "tags": [ + "User organization role assignments" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "The ID of the user that should receive the organization role.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Identifies the organization role to assign to the user.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicAssignOrganizationGroupRoleBody" + } + } + } + }, + "responses": { + "200": { + "description": "Organization role assigned to the user successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleAssignment" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Assign organization role to user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/organization/users/user_abc123/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_id\": \"role_01J1F8ROLE01\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.users.roles.create('user_id', { role_id: 'role_id' });\n\nconsole.log(role.object);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.users.roles.create(\n user_id=\"user_id\",\n role_id=\"role_id\",\n)\nprint(role.object)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Users.Roles.New(\n\t\tcontext.TODO(),\n\t\t\"user_id\",\n\t\topenai.AdminOrganizationUserRoleNewParams{\n\t\t\tRoleID: \"role_id\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.Object)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.users.roles.RoleCreateParams;\nimport com.openai.models.admin.organization.users.roles.RoleCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleCreateParams params = RoleCreateParams.builder()\n .userId(\"user_id\")\n .roleId(\"role_id\")\n .build();\n RoleCreateResponse role = client.admin().organization().users().roles().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.users.roles.create(\"user_id\", role_id: \"role_id\")\n\nputs(role)" + }, + "response": "{\n \"object\": \"user.role\",\n \"user\": {\n \"object\": \"organization.user\",\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711470000\n },\n \"role\": {\n \"object\": \"role\",\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"description\": \"Allows managing organization groups\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false\n }\n}\n" + } + } + } + }, + "/organization/users/{user_id}/roles/{role_id}": { + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Unassigns an organization role from a user within the organization.", + "operationId": "unassign-user-role", + "tags": [ + "User organization role assignments" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "The ID of the user to modify.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "role_id", + "in": "path", + "description": "The ID of the organization role to remove from the user.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Organization role unassigned from the user successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletedRoleAssignmentResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Unassign organization role from user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/organization/users/user_abc123/roles/role_01J1F8ROLE01 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.users.roles.delete('role_id', { user_id: 'user_id' });\n\nconsole.log(role.deleted);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.users.roles.delete(\n role_id=\"role_id\",\n user_id=\"user_id\",\n)\nprint(role.deleted)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Users.Roles.Delete(\n\t\tcontext.TODO(),\n\t\t\"user_id\",\n\t\t\"role_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.Deleted)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.users.roles.RoleDeleteParams;\nimport com.openai.models.admin.organization.users.roles.RoleDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleDeleteParams params = RoleDeleteParams.builder()\n .userId(\"user_id\")\n .roleId(\"role_id\")\n .build();\n RoleDeleteResponse role = client.admin().organization().users().roles().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.users.roles.delete(\"role_id\", user_id: \"user_id\")\n\nputs(role)" + }, + "response": "{\n \"object\": \"user.role.deleted\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/projects/{project_id}/groups/{group_id}/roles": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Lists the project roles assigned to a group within a project.", + "operationId": "list-project-group-role-assignments", + "tags": [ + "Project group role assignments" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to inspect.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "group_id", + "in": "path", + "description": "The ID of the group to inspect.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of project role assignments to return.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000 + } + }, + { + "name": "after", + "in": "query", + "description": "Cursor for pagination. Provide the value from the previous response's `next` field to continue listing project roles.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for the returned project roles.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + } + ], + "responses": { + "200": { + "description": "Project group role assignments listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List project group role assignments", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const roleListResponse of client.admin.organization.projects.groups.roles.list(\n 'group_id',\n { project_id: 'project_id' },\n)) {\n console.log(roleListResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.groups.roles.list(\n group_id=\"group_id\",\n project_id=\"project_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.Groups.Roles.List(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"group_id\",\n\t\topenai.AdminOrganizationProjectGroupRoleListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.groups.roles.RoleListPage;\nimport com.openai.models.admin.organization.projects.groups.roles.RoleListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleListParams params = RoleListParams.builder()\n .projectId(\"project_id\")\n .groupId(\"group_id\")\n .build();\n RoleListPage page = client.admin().organization().projects().groups().roles().list(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.groups.roles.list(\"group_id\", project_id: \"project_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false,\n \"description\": \"Allows managing API keys for the project\",\n \"created_at\": 1711471533,\n \"updated_at\": 1711472599,\n \"created_by\": \"user_abc123\",\n \"created_by_user_obj\": {\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\"\n },\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Assigns a project role to a group within a project.", + "operationId": "assign-project-group-role", + "tags": [ + "Project group role assignments" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to update.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "group_id", + "in": "path", + "description": "The ID of the group that should receive the project role.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Identifies the project role to assign to the group.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicAssignOrganizationGroupRoleBody" + } + } + } + }, + "responses": { + "200": { + "description": "Project role assigned to the group successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupRoleAssignment" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Assign project role to group", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_id\": \"role_01J1F8PROJ\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.projects.groups.roles.create('group_id', {\n project_id: 'project_id',\n role_id: 'role_id',\n});\n\nconsole.log(role.group);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.projects.groups.roles.create(\n group_id=\"group_id\",\n project_id=\"project_id\",\n role_id=\"role_id\",\n)\nprint(role.group)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Projects.Groups.Roles.New(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"group_id\",\n\t\topenai.AdminOrganizationProjectGroupRoleNewParams{\n\t\t\tRoleID: \"role_id\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.Group)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.groups.roles.RoleCreateParams;\nimport com.openai.models.admin.organization.projects.groups.roles.RoleCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleCreateParams params = RoleCreateParams.builder()\n .projectId(\"project_id\")\n .groupId(\"group_id\")\n .roleId(\"role_id\")\n .build();\n RoleCreateResponse role = client.admin().organization().projects().groups().roles().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.projects.groups.roles.create(\n \"group_id\",\n project_id: \"project_id\",\n role_id: \"role_id\"\n)\n\nputs(role)" + }, + "response": "{\n \"object\": \"group.role\",\n \"group\": {\n \"object\": \"group\",\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"name\": \"Support Team\",\n \"created_at\": 1711471533,\n \"scim_managed\": false\n },\n \"role\": {\n \"object\": \"role\",\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"description\": \"Allows managing API keys for the project\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false\n }\n}\n" + } + } + } + }, + "/projects/{project_id}/groups/{group_id}/roles/{role_id}": { + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Unassigns a project role from a group within a project.", + "operationId": "unassign-project-group-role", + "tags": [ + "Project group role assignments" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to modify.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "group_id", + "in": "path", + "description": "The ID of the group whose project role assignment should be removed.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "role_id", + "in": "path", + "description": "The ID of the project role to remove from the group.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project role unassigned from the group successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletedRoleAssignmentResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Unassign project role from group", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8PROJ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.projects.groups.roles.delete('role_id', {\n project_id: 'project_id',\n group_id: 'group_id',\n});\n\nconsole.log(role.deleted);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.projects.groups.roles.delete(\n role_id=\"role_id\",\n project_id=\"project_id\",\n group_id=\"group_id\",\n)\nprint(role.deleted)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Projects.Groups.Roles.Delete(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"group_id\",\n\t\t\"role_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.Deleted)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.groups.roles.RoleDeleteParams;\nimport com.openai.models.admin.organization.projects.groups.roles.RoleDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleDeleteParams params = RoleDeleteParams.builder()\n .projectId(\"project_id\")\n .groupId(\"group_id\")\n .roleId(\"role_id\")\n .build();\n RoleDeleteResponse role = client.admin().organization().projects().groups().roles().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.projects.groups.roles.delete(\n \"role_id\",\n project_id: \"project_id\",\n group_id: \"group_id\"\n)\n\nputs(role)" + }, + "response": "{\n \"object\": \"group.role.deleted\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/projects/{project_id}/roles": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Lists the roles configured for a project.", + "operationId": "list-project-roles", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to inspect.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of roles to return. Defaults to 1000.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000, + "default": 1000 + } + }, + { + "name": "after", + "in": "query", + "description": "Cursor for pagination. Provide the value from the previous response's `next` field to continue listing roles.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for the returned roles.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + } + ], + "responses": { + "200": { + "description": "Project roles listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicRoleListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List project roles", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/projects/proj_abc123/roles?limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const role of client.admin.organization.projects.roles.list('project_id')) {\n console.log(role.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.roles.list(\n project_id=\"project_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.Roles.List(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectRoleListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.roles.RoleListPage;\nimport com.openai.models.admin.organization.projects.roles.RoleListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleListPage page = client.admin().organization().projects().roles().list(\"project_id\");\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.roles.list(\"project_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"role\",\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"description\": \"Allows managing API keys for the project\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Creates a custom role for a project.", + "operationId": "create-project-role", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Parameters for the project role you want to create.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicCreateOrganizationRoleBody" + } + } + } + }, + "responses": { + "200": { + "description": "Project role created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create project role", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/projects/proj_abc123/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_name\": \"API Project Key Manager\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"description\": \"Allows managing API keys for the project\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.projects.roles.create('project_id', {\n permissions: ['string'],\n role_name: 'role_name',\n});\n\nconsole.log(role.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.projects.roles.create(\n project_id=\"project_id\",\n permissions=[\"string\"],\n role_name=\"role_name\",\n)\nprint(role.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Projects.Roles.New(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\topenai.AdminOrganizationProjectRoleNewParams{\n\t\t\tPermissions: []string{\"string\"},\n\t\t\tRoleName: \"role_name\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.roles.RoleCreateParams;\nimport com.openai.models.admin.organization.roles.Role;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleCreateParams params = RoleCreateParams.builder()\n .projectId(\"project_id\")\n .addPermission(\"string\")\n .roleName(\"role_name\")\n .build();\n Role role = client.admin().organization().projects().roles().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.projects.roles.create(\n \"project_id\",\n permissions: [\"string\"],\n role_name: \"role_name\"\n)\n\nputs(role)" + }, + "response": "{\n \"object\": \"role\",\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"description\": \"Allows managing API keys for the project\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false\n}\n" + } + } + } + }, + "/projects/{project_id}/roles/{role_id}": { + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Updates an existing project role.", + "operationId": "update-project-role", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to update.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "role_id", + "in": "path", + "description": "The ID of the role to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Fields to update on the project role.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicUpdateOrganizationRoleBody" + } + } + } + }, + "responses": { + "200": { + "description": "Project role updated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Update project role", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/projects/proj_abc123/roles/role_01J1F8PROJ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_name\": \"API Project Key Manager\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"description\": \"Allows managing API keys for the project\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.projects.roles.update('role_id', {\n project_id: 'project_id',\n});\n\nconsole.log(role.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.projects.roles.update(\n role_id=\"role_id\",\n project_id=\"project_id\",\n)\nprint(role.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Projects.Roles.Update(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"role_id\",\n\t\topenai.AdminOrganizationProjectRoleUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.roles.RoleUpdateParams;\nimport com.openai.models.admin.organization.roles.Role;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleUpdateParams params = RoleUpdateParams.builder()\n .projectId(\"project_id\")\n .roleId(\"role_id\")\n .build();\n Role role = client.admin().organization().projects().roles().update(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.projects.roles.update(\"role_id\", project_id: \"project_id\")\n\nputs(role)" + }, + "response": "{\n \"object\": \"role\",\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"description\": \"Allows managing API keys for the project\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false\n}\n" + } + } + }, + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Deletes a custom role from a project.", + "operationId": "delete-project-role", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to update.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "role_id", + "in": "path", + "description": "The ID of the role to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project role deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleDeletedResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Delete project role", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/roles/role_01J1F8PROJ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.projects.roles.delete('role_id', {\n project_id: 'project_id',\n});\n\nconsole.log(role.id);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.projects.roles.delete(\n role_id=\"role_id\",\n project_id=\"project_id\",\n)\nprint(role.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Projects.Roles.Delete(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"role_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.ID)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.roles.RoleDeleteParams;\nimport com.openai.models.admin.organization.projects.roles.RoleDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleDeleteParams params = RoleDeleteParams.builder()\n .projectId(\"project_id\")\n .roleId(\"role_id\")\n .build();\n RoleDeleteResponse role = client.admin().organization().projects().roles().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.projects.roles.delete(\"role_id\", project_id: \"project_id\")\n\nputs(role)" + }, + "response": "{\n \"object\": \"role.deleted\",\n \"id\": \"role_01J1F8PROJ\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/projects/{project_id}/users/{user_id}/roles": { + "get": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Lists the project roles assigned to a user within a project.", + "operationId": "list-project-user-role-assignments", + "tags": [ + "Project user role assignments" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to inspect.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "path", + "description": "The ID of the user to inspect.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of project role assignments to return.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000 + } + }, + { + "name": "after", + "in": "query", + "description": "Cursor for pagination. Provide the value from the previous response's `next` field to continue listing project roles.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order for the returned project roles.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + } + ], + "responses": { + "200": { + "description": "Project user role assignments listed successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleListResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "List project user role assignments", + "group": "administration", + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const roleListResponse of client.admin.organization.projects.users.roles.list(\n 'user_id',\n { project_id: 'project_id' },\n)) {\n console.log(roleListResponse.id);\n}", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\npage = client.admin.organization.projects.users.roles.list(\n user_id=\"user_id\",\n project_id=\"project_id\",\n)\npage = page.data[0]\nprint(page.id)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\tpage, err := client.Admin.Organization.Projects.Users.Roles.List(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"user_id\",\n\t\topenai.AdminOrganizationProjectUserRoleListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.users.roles.RoleListPage;\nimport com.openai.models.admin.organization.projects.users.roles.RoleListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleListParams params = RoleListParams.builder()\n .projectId(\"project_id\")\n .userId(\"user_id\")\n .build();\n RoleListPage page = client.admin().organization().projects().users().roles().list(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\npage = openai.admin.organization.projects.users.roles.list(\"user_id\", project_id: \"project_id\")\n\nputs(page)" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false,\n \"description\": \"Allows managing API keys for the project\",\n \"created_at\": 1711471533,\n \"updated_at\": 1711472599,\n \"created_by\": \"user_abc123\",\n \"created_by_user_obj\": {\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\"\n },\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" + } + } + }, + "post": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Assigns a project role to a user within a project.", + "operationId": "assign-project-user-role", + "tags": [ + "Project user role assignments" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to update.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "path", + "description": "The ID of the user that should receive the project role.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Identifies the project role to assign to the user.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicAssignOrganizationGroupRoleBody" + } + } + } + }, + "responses": { + "200": { + "description": "Project role assigned to the user successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleAssignment" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Assign project role to user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_id\": \"role_01J1F8PROJ\"\n }'\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.projects.users.roles.create('user_id', {\n project_id: 'project_id',\n role_id: 'role_id',\n});\n\nconsole.log(role.object);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.projects.users.roles.create(\n user_id=\"user_id\",\n project_id=\"project_id\",\n role_id=\"role_id\",\n)\nprint(role.object)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Projects.Users.Roles.New(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"user_id\",\n\t\topenai.AdminOrganizationProjectUserRoleNewParams{\n\t\t\tRoleID: \"role_id\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.Object)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.users.roles.RoleCreateParams;\nimport com.openai.models.admin.organization.projects.users.roles.RoleCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleCreateParams params = RoleCreateParams.builder()\n .projectId(\"project_id\")\n .userId(\"user_id\")\n .roleId(\"role_id\")\n .build();\n RoleCreateResponse role = client.admin().organization().projects().users().roles().create(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.projects.users.roles.create(\n \"user_id\",\n project_id: \"project_id\",\n role_id: \"role_id\"\n)\n\nputs(role)" + }, + "response": "{\n \"object\": \"user.role\",\n \"user\": {\n \"object\": \"organization.user\",\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711470000\n },\n \"role\": {\n \"object\": \"role\",\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"description\": \"Allows managing API keys for the project\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false\n }\n}\n" + } + } + } + }, + "/projects/{project_id}/users/{user_id}/roles/{role_id}": { + "delete": { + "security": [ + { + "AdminApiKeyAuth": [] + } + ], + "summary": "Unassigns a project role from a user within a project.", + "operationId": "unassign-project-user-role", + "tags": [ + "Project user role assignments" + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "description": "The ID of the project to modify.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "path", + "description": "The ID of the user whose project role assignment should be removed.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "role_id", + "in": "path", + "description": "The ID of the project role to remove from the user.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project role unassigned from the user successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletedRoleAssignmentResource" + } + } + } + } + }, + "x-oaiMeta": { + "name": "Unassign project role from user", + "group": "administration", + "examples": { + "request": { + "curl": "curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles/role_01J1F8PROJ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n", + "node.js": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted\n});\n\nconst role = await client.admin.organization.projects.users.roles.delete('role_id', {\n project_id: 'project_id',\n user_id: 'user_id',\n});\n\nconsole.log(role.deleted);", + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n admin_api_key=os.environ.get(\"OPENAI_ADMIN_KEY\"), # This is the default and can be omitted\n)\nrole = client.admin.organization.projects.users.roles.delete(\n role_id=\"role_id\",\n project_id=\"project_id\",\n user_id=\"user_id\",\n)\nprint(role.deleted)", + "go": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAdminAPIKey(\"My Admin API Key\"),\n\t)\n\trole, err := client.Admin.Organization.Projects.Users.Roles.Delete(\n\t\tcontext.TODO(),\n\t\t\"project_id\",\n\t\t\"user_id\",\n\t\t\"role_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", role.Deleted)\n}\n", + "java": "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.admin.organization.projects.users.roles.RoleDeleteParams;\nimport com.openai.models.admin.organization.projects.users.roles.RoleDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RoleDeleteParams params = RoleDeleteParams.builder()\n .projectId(\"project_id\")\n .userId(\"user_id\")\n .roleId(\"role_id\")\n .build();\n RoleDeleteResponse role = client.admin().organization().projects().users().roles().delete(params);\n }\n}", + "ruby": "require \"openai\"\n\nopenai = OpenAI::Client.new(admin_api_key: \"My Admin API Key\")\n\nrole = openai.admin.organization.projects.users.roles.delete(\n \"role_id\",\n project_id: \"project_id\",\n user_id: \"user_id\"\n)\n\nputs(role)" + }, + "response": "{\n \"object\": \"user.role.deleted\",\n \"deleted\": true\n}\n" + } + } + } + }, + "/realtime/calls": { + "post": { + "summary": "Create a new Realtime API call over WebRTC and receive the SDP answer needed\nto complete the peer connection.", + "operationId": "create-realtime-call", + "tags": [ + "Realtime" + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/RealtimeCallCreateRequest" + }, + "encoding": { + "sdp": { + "contentType": "application/sdp" + }, + "session": { + "contentType": "application/json" + } + } + }, + "application/sdp": { + "schema": { + "type": "string", + "description": "WebRTC SDP offer. Use this variant when you have previously created an\nephemeral **session token** and are authenticating the request with it.\nRealtime session parameters will be retrieved from the session token." + } + } + } + }, + "responses": { + "201": { + "description": "Realtime call created successfully.", + "headers": { + "Location": { + "description": "Relative URL containing the call ID for subsequent control requests.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/sdp": { + "schema": { + "type": "string", + "description": "SDP answer produced by OpenAI for the peer connection." + } + } + } + } + }, + "x-oaiMeta": { + "name": "Create call", + "group": "realtime", + "returns": "Returns `201 Created` with the SDP answer in the response body. The\n`Location` response header includes the call ID for follow-up requests,\ne.g., establishing a monitoring WebSocket or hanging up the call.", + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/realtime/calls \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"sdp=